driver/src/sick_scan_common_nw.cpp
void SickScanCommonNw::copyFrameToResposeBuffer(UINT32 frameLength)
{
  printInfoMessage("SickScanCommonNw::copyFrameToResposeBuffer: Copying a frame of " + ::toString(frameLength) +
                   " bytes to response buffer.", m_beVerbose);

  if (frameLength <= sizeof(m_responseBuffer))
  {
    // Wir duerfen kopieren
    memcpy(m_responseBuffer, m_receiveBuffer, frameLength);
    m_numberOfBytesInResponseBuffer = frameLength;
  }
  else
  {
    // Der respose-Buffer ist zu klein
    printError("SickScanCommonNw::copyFrameToResposeBuffer: Failed to copy frame (Length=" + ::toString(frameLength) +
               " bytes) to response buffer because the response buffer is too small (buffer size=" +
               ::toString(sizeof(m_responseBuffer)) + " bytes).");
    m_numberOfBytesInResponseBuffer = 0;
  }
}
//
// Copies a complete frame - in any protocol - from the main input buffer to
// the response buffer.
// The frame is *not* removed from the main input buffer.
//
Copies a complete frame - in any protocol - from the main input buffer to
the response buffer.
The frame is *not* removed from the main input buffer.
Copies a complete frame - in any protocol - from the main input buffer to the response buffer . The frame is * not * removed from the main input buffer .
void SickScanCommonNw::copyFrameToResposeBuffer(UINT32 frameLength)
{
  printInfoMessage("SickScanCommonNw::copyFrameToResposeBuffer: Copying a frame of " + ::toString(frameLength) +
                   " bytes to response buffer.", m_beVerbose);
  if (frameLength <= sizeof(m_responseBuffer))
  {
    memcpy(m_responseBuffer, m_receiveBuffer, frameLength);
    m_numberOfBytesInResponseBuffer = frameLength;
  }
  else
  {
    printError("SickScanCommonNw::copyFrameToResposeBuffer: Failed to copy frame (Length=" + ::toString(frameLength) +
               " bytes) to response buffer because the response buffer is too small (buffer size=" +
               ::toString(sizeof(m_responseBuffer)) + " bytes).");
    m_numberOfBytesInResponseBuffer = 0;
  }
}
void SickScanCommonNw :: copyFrameToResposeBuffer ( UINT32 frameLength ) { printInfoMessage ( " " + :: toString ( frameLength ) + " " , m_beVerbose ) ; if ( frameLength <= sizeof ( m_responseBuffer ) ) { memcpy ( m_responseBuffer , m_receiveBuffer , frameLength ) ; m_numberOfBytesInResponseBuffer = frameLength ; } else { printError ( " " + :: toString ( frameLength ) + " " + :: toString ( sizeof ( m_responseBuffer ) ) + " " ) ; m_numberOfBytesInResponseBuffer = 0 ; } }
Copies a complete frame - in any protocol - from the main input buffer to
the response buffer.
Copies a complete frame - in any protocol - from the main input buffer to the response buffer .
// Wir duerfen kopieren // Der respose-Buffer ist zu klein