driver/src/sick_scan_common.cpp
void swap_endian(unsigned char *ptr, int numBytes)
{
  unsigned char *buf = (ptr);
  unsigned char tmpChar;
  for (int i = 0; i < numBytes / 2; i++)
  {
    tmpChar = buf[numBytes - 1 - i];
    buf[numBytes - 1 - i] = buf[i];
    buf[i] = tmpChar;
  }
}
/*!
\brief Universal swapping function
\param ptr: Pointer to datablock
\param numBytes : size of variable in bytes
*/
\brief Universal swapping function
\param ptr: Pointer to datablock
\param numBytes : size of variable in bytes
\ brief Universal swapping function \ param ptr : Pointer to datablock \ param numBytes : size of variable in bytes
void swap_endian(unsigned char *ptr, int numBytes)
{
  unsigned char *buf = (ptr);
  unsigned char tmpChar;
  for (int i = 0; i < numBytes / 2; i++)
  {
    tmpChar = buf[numBytes - 1 - i];
    buf[numBytes - 1 - i] = buf[i];
    buf[i] = tmpChar;
  }
}
void swap_endian ( unsigned char * ptr , int numBytes ) { unsigned char * buf = ( ptr ) ; unsigned char tmpChar ; for ( int i = 0 ; i < numBytes / 2 ; i ++ ) { tmpChar = buf [ numBytes - 1 - i ] ; buf [ numBytes - 1 - i ] = buf [ i ] ; buf [ i ] = tmpChar ; } }
\brief Universal swapping function
\param ptr: Pointer to datablock
\param numBytes : size of variable in bytes
\ brief Universal swapping function \ param ptr : Pointer to datablock \ param numBytes : size of variable in bytes