Classes | Functions
toolbox.cpp File Reference
#include <stdio.h>
#include <winsock2.h>
#include <stdlib.h>
#include <string.h>
#include "sick_scan/tcp/toolbox.hpp"
#include <iostream>
#include <iomanip>
#include <sstream>
#include "sick_scan/tcp/errorhandler.hpp"
Include dependency graph for toolbox.cpp:

Go to the source code of this file.

Classes

union  FloatInt
 Internal: Structure for reading/writing a float as an UINT32. More...
 

Functions

std::string convertMeterToFeetAndInch (double m)
 
char convertNibbleToHexChar (int value, bool useLowerCaseLetters)
 
void convertRGBtoHexString (UINT8 r, UINT8 g, UINT8 b, char *buffer)
 
void convertUINT8toHexString (UINT8 byte, char *buffer)
 
std::string doubleToString (double val, std::string::size_type digits_before_decimal_point, std::string::size_type digits_after_decimal_point)
 
std::string doubleToString (double val, 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 (UINT32 val)
 
std::string toHexString (UINT16 val)
 
std::string toHexString (UINT8 val)
 
std::string toHexStringNibble (UINT8 val)
 
std::string toLower (const std::string &text)
 
std::string toString (INT32 value)
 
std::string toString (UINT32 value)
 
std::string toString (double val, int digits_after_decimal_point)
 
void traceBuffer (std::string headerText, BYTE *buffer, UINT32 len)
 

Function Documentation

std::string convertMeterToFeetAndInch ( double  m)

Definition at line 133 of file toolbox.cpp.

char convertNibbleToHexChar ( int  value,
bool  useLowerCaseLetters 
)

Konvertierung Zahlenwert -> Hex-Zeichen

Definition at line 205 of file toolbox.cpp.

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.

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.

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

Definition at line 315 of file toolbox.cpp.

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

Konvertiere Double-Zahl in String.

Definition at line 352 of file toolbox.cpp.

UINT16 fromString ( const std::string &  text)

Definition at line 166 of file toolbox.cpp.

int hexCharToValue ( char  c)

Konvertierung eines Hex-Zeichens -> Zahlenwert.

Definition at line 181 of file toolbox.cpp.

std::string ipAdrToString ( UINT32  ipAddress)

Definition at line 432 of file toolbox.cpp.

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

Definition at line 415 of file toolbox.cpp.

double makeAngleValid ( double  angle)

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

Definition at line 260 of file toolbox.cpp.

float memread_float ( BYTE *&  buffer)

Definition at line 531 of file toolbox.cpp.

INT16 memread_INT16 ( BYTE *&  buffer)

Definition at line 482 of file toolbox.cpp.

INT32 memread_INT32 ( BYTE *&  buffer)

Definition at line 493 of file toolbox.cpp.

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

Definition at line 506 of file toolbox.cpp.

UINT16 memread_UINT16 ( BYTE *&  buffer)

Definition at line 461 of file toolbox.cpp.

UINT32 memread_UINT32 ( BYTE *&  buffer)

Definition at line 447 of file toolbox.cpp.

UINT8 memread_UINT8 ( BYTE *&  buffer)

Definition at line 472 of file toolbox.cpp.

void memwrite_float ( BYTE *&  buffer,
float  value 
)

Definition at line 542 of file toolbox.cpp.

void memwrite_INT16 ( BYTE *&  buffer,
INT16  value 
)

Definition at line 575 of file toolbox.cpp.

void memwrite_INT32 ( BYTE *&  buffer,
INT32  value 
)

Definition at line 553 of file toolbox.cpp.

void memwrite_INT8 ( BYTE *&  buffer,
INT8  value 
)

Definition at line 603 of file toolbox.cpp.

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

Definition at line 612 of file toolbox.cpp.

void memwrite_UINT16 ( BYTE *&  buffer,
UINT16  value 
)

Definition at line 584 of file toolbox.cpp.

void memwrite_UINT32 ( BYTE *&  buffer,
UINT32  value 
)

Definition at line 562 of file toolbox.cpp.

void memwrite_UINT8 ( BYTE *&  buffer,
UINT8  value 
)

Definition at line 594 of file toolbox.cpp.

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

Definition at line 373 of file toolbox.cpp.

std::string toHexString ( UINT32  val)

Definition at line 79 of file toolbox.cpp.

std::string toHexString ( UINT16  val)

Definition at line 87 of file toolbox.cpp.

std::string toHexString ( UINT8  val)

Definition at line 97 of file toolbox.cpp.

std::string toHexStringNibble ( UINT8  val)

Definition at line 60 of file toolbox.cpp.

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

Definition at line 109 of file toolbox.cpp.

std::string toString ( INT32  value)

Definition at line 279 of file toolbox.cpp.

std::string toString ( UINT32  value)

Definition at line 289 of file toolbox.cpp.

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

Definition at line 362 of file toolbox.cpp.

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 Wed May 5 2021 03:05:48