Functions
toolbox.hpp File Reference
#include <stdio.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <stdlib.h>
#include <string.h>
#include "sick_scan/tcp/BasicDatatypes.hpp"
Include dependency graph for toolbox.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

std::string convertMeterToFeetAndInch (double m)
 
char convertNibbleToHexChar (int value, bool useLowerCaseLetters=false)
 
void convertRGBtoHexString (UINT8 r, UINT8 g, UINT8 b, char *buffer)
 
void convertUINT8toHexString (UINT8 byte, char *buffer)
 
std::string doubleToString (double val, int digits_after_decimal_point)
 
std::string doubleToString (double val, int digits_before_decimal_point, int digits_after_decimal_point)
 
UINT16 fromString (const std::string &text)
 
int hexCharToValue (char c)
 
std::string ipAdrToString (UINT32 ipAddress)
 
std::string ipTargetToString (UINT32 ipAddress, UINT16 port)
 
double makeAngleValid (double angle)
 
float memread_float (BYTE *&buffer)
 
INT16 memread_INT16 (BYTE *&buffer)
 
INT32 memread_INT32 (BYTE *&buffer)
 
std::string memread_string (BYTE *&buffer, UINT16 length)
 
UINT16 memread_UINT16 (BYTE *&buffer)
 
UINT32 memread_UINT32 (BYTE *&buffer)
 
UINT8 memread_UINT8 (BYTE *&buffer)
 
void memwrite_float (BYTE *&buffer, float value)
 
void memwrite_INT16 (BYTE *&buffer, INT16 value)
 
void memwrite_INT32 (BYTE *&buffer, INT32 value)
 
void memwrite_INT8 (BYTE *&buffer, INT8 value)
 
void memwrite_string (BYTE *&buffer, std::string text)
 
void memwrite_UINT16 (BYTE *&buffer, UINT16 value)
 
void memwrite_UINT32 (BYTE *&buffer, UINT32 value)
 
void memwrite_UINT8 (BYTE *&buffer, UINT8 value)
 
void stringToIpTarget (std::string ipAdrStr, UINT32 &ipAddress, UINT16 &port)
 
std::string toHexString (UINT16 val)
 
std::string toHexString (UINT32 val)
 
std::string toHexString (UINT8 val)
 
std::string toHexStringNbble (UINT8 val)
 
std::string toLower (const std::string &text)
 
std::string toString (double val, int digits_after_decimal_point)
 
std::string toString (INT32 val)
 
std::string toString (UINT32 val)
 
void traceBuffer (std::string headerText, BYTE *buffer, UINT32 len)
 

Function Documentation

◆ convertMeterToFeetAndInch()

std::string convertMeterToFeetAndInch ( double  m)

Definition at line 133 of file toolbox.cpp.

◆ convertNibbleToHexChar()

char convertNibbleToHexChar ( int  value,
bool  useLowerCaseLetters 
)

Konvertierung Zahlenwert -> Hex-Zeichen

Definition at line 205 of file toolbox.cpp.

◆ convertRGBtoHexString()

void convertRGBtoHexString ( UINT8  r,
UINT8  g,
UINT8  b,
char *  buffer 
)

Konvertiert drei UINT8-Werte (R, G, B) in einen HEX-String, z.B.: R = 0x12, G=0x34, B=0x56 --> String = "123456" Buffer muss mindestens 6 Byte gross sein.

Definition at line 248 of file toolbox.cpp.

◆ convertUINT8toHexString()

void convertUINT8toHexString ( UINT8  byte,
char *  buffer 
)

Konvertiert einen UINT8-Wert in einen 2-Byte-Hex-Wert, z.B.: b = 0x07, String = "07" Buffer muss mindestens 2 Byte gross sein.

Definition at line 235 of file toolbox.cpp.

◆ doubleToString() [1/2]

std::string doubleToString ( double  val,
int  digits_after_decimal_point 
)

Konvertiere Double-Zahl in String.

Definition at line 352 of file toolbox.cpp.

◆ doubleToString() [2/2]

std::string doubleToString ( double  val,
int  digits_before_decimal_point,
int  digits_after_decimal_point 
)

◆ fromString()

UINT16 fromString ( const std::string &  text)

Definition at line 166 of file toolbox.cpp.

◆ hexCharToValue()

int hexCharToValue ( char  c)

Toolbox. Some useful functions.

Konvertierung eines Hex-Zeichens -> Zahlenwert.

Definition at line 181 of file toolbox.cpp.

◆ ipAdrToString()

std::string ipAdrToString ( UINT32  ipAddress)

Definition at line 432 of file toolbox.cpp.

◆ ipTargetToString()

std::string ipTargetToString ( UINT32  ipAddress,
UINT16  port 
)

Definition at line 415 of file toolbox.cpp.

◆ makeAngleValid()

double makeAngleValid ( double  angle)

Bringt den Winkel in den Bereich ]PI..-PI]

Definition at line 260 of file toolbox.cpp.

◆ memread_float()

float memread_float ( BYTE *&  buffer)

Definition at line 531 of file toolbox.cpp.

◆ memread_INT16()

INT16 memread_INT16 ( BYTE *&  buffer)

Definition at line 482 of file toolbox.cpp.

◆ memread_INT32()

INT32 memread_INT32 ( BYTE *&  buffer)

Definition at line 493 of file toolbox.cpp.

◆ memread_string()

std::string memread_string ( BYTE *&  buffer,
UINT16  length 
)

Definition at line 506 of file toolbox.cpp.

◆ memread_UINT16()

UINT16 memread_UINT16 ( BYTE *&  buffer)

Definition at line 461 of file toolbox.cpp.

◆ memread_UINT32()

UINT32 memread_UINT32 ( BYTE *&  buffer)

Definition at line 447 of file toolbox.cpp.

◆ memread_UINT8()

UINT8 memread_UINT8 ( BYTE *&  buffer)

Definition at line 472 of file toolbox.cpp.

◆ memwrite_float()

void memwrite_float ( BYTE *&  buffer,
float  value 
)

Definition at line 542 of file toolbox.cpp.

◆ memwrite_INT16()

void memwrite_INT16 ( BYTE *&  buffer,
INT16  value 
)

Definition at line 575 of file toolbox.cpp.

◆ memwrite_INT32()

void memwrite_INT32 ( BYTE *&  buffer,
INT32  value 
)

Definition at line 553 of file toolbox.cpp.

◆ memwrite_INT8()

void memwrite_INT8 ( BYTE *&  buffer,
INT8  value 
)

Definition at line 603 of file toolbox.cpp.

◆ memwrite_string()

void memwrite_string ( BYTE *&  buffer,
std::string  text 
)

Definition at line 612 of file toolbox.cpp.

◆ memwrite_UINT16()

void memwrite_UINT16 ( BYTE *&  buffer,
UINT16  value 
)

Definition at line 584 of file toolbox.cpp.

◆ memwrite_UINT32()

void memwrite_UINT32 ( BYTE *&  buffer,
UINT32  value 
)

Definition at line 562 of file toolbox.cpp.

◆ memwrite_UINT8()

void memwrite_UINT8 ( BYTE *&  buffer,
UINT8  value 
)

Definition at line 594 of file toolbox.cpp.

◆ stringToIpTarget()

void stringToIpTarget ( std::string  ipAdrStr,
UINT32 ipAddress,
UINT16 port 
)

Definition at line 373 of file toolbox.cpp.

◆ toHexString() [1/3]

std::string toHexString ( UINT16  val)

Definition at line 87 of file toolbox.cpp.

◆ toHexString() [2/3]

std::string toHexString ( UINT32  val)

Definition at line 79 of file toolbox.cpp.

◆ toHexString() [3/3]

std::string toHexString ( UINT8  val)

Definition at line 97 of file toolbox.cpp.

◆ toHexStringNbble()

std::string toHexStringNbble ( UINT8  val)

◆ toLower()

std::string toLower ( const std::string &  text)

Definition at line 109 of file toolbox.cpp.

◆ toString() [1/3]

std::string toString ( double  val,
int  digits_after_decimal_point 
)

Definition at line 362 of file toolbox.cpp.

◆ toString() [2/3]

std::string toString ( INT32  val)

Definition at line 279 of file toolbox.cpp.

◆ toString() [3/3]

std::string toString ( UINT32  val)

Definition at line 289 of file toolbox.cpp.

◆ traceBuffer()

void traceBuffer ( std::string  headerText,
BYTE buffer,
UINT32  len 
)

Toolbox. Some useful functions.

Definition at line 28 of file toolbox.cpp.



sick_scan
Author(s): Michael Lehning , Jochen Sprickerhof , Martin Günther
autogenerated on Thu Sep 8 2022 02:30:19