Public Member Functions | Private Member Functions | Private Attributes
SopasEventMessage Class Reference

Class that represents a message that was sent by a sensor. (Event message) More...

#include <sick_scan_common_nw.h>

List of all members.

Public Member Functions

std::string getCommandString () const
 Returns two character long command.
BYTEgetPayLoad ()
 contains 's' + command string(2 byte) + content(payload length - 3)
UINT32 getPayLoadLength () const
 contains 's' + command string(2 byte) + content(payload length - 3)
SopasProtocol getProtocolType () const
BYTEgetRawData ()
 get SOPAS raw data include header and CRC
INT32 getVariableIndex ()
 Returns the index of a variable (answer to read variable by index). In case of error a negative value will be returned.
std::string getVariableName ()
 Returns the name of a variable (answer to read variable by name). In case of error an empty value will be returned.
bool isValid () const
UINT32 size () const
 SopasEventMessage ()
 Default constructor.
 SopasEventMessage (BYTE *buffer, SopasProtocol protocol, UINT32 frameLength)
 Constructor. This class will only store a pointer to the byte buffer. It will not deallocate the memory. Please make sure that the buffer is not deallocated while you are working with this class.
 ~SopasEventMessage ()
 Destructor.

Private Member Functions

void detectEncoding ()
void detectMessageType ()

Private Attributes

BYTEm_buffer
UINT32 m_frameLength
SopasProtocol m_protocol

Detailed Description

Class that represents a message that was sent by a sensor. (Event message)

Definition at line 123 of file sick_scan_common_nw.h.


Constructor & Destructor Documentation

Default constructor.

Definition at line 509 of file sick_scan_common_nw.cpp.

Destructor.

Definition at line 130 of file sick_scan_common_nw.h.

SopasEventMessage::SopasEventMessage ( BYTE buffer,
SopasProtocol  protocol,
UINT32  frameLength 
)

Constructor. This class will only store a pointer to the byte buffer. It will not deallocate the memory. Please make sure that the buffer is not deallocated while you are working with this class.

Parameters:
bufferbyte buffer with the message (Sopas frame)
protocoltype of protocol (Cola-A, Cola-B)
frameLengthlength of the frame

Definition at line 516 of file sick_scan_common_nw.cpp.


Member Function Documentation

std::string SopasEventMessage::getCommandString ( ) const

Returns two character long command.

Returns:
string container command

Returns the core command of a sopas message (e.g. "WN") for ..sWN <whatever>

Definition at line 547 of file sick_scan_common_nw.cpp.

contains 's' + command string(2 byte) + content(payload length - 3)

Returns a pointer to the first payload byte.

Returns:
Pointer to payload part of message

Returns a pointer to the first payload byte. CoLa-A: Points beyond the leading "0x02" to the "s..." data. CoLa-B: Points beyond the magic word and length bytes, to the "s..." data.

Definition at line 572 of file sick_scan_common_nw.cpp.

contains 's' + command string(2 byte) + content(payload length - 3)

Definition at line 524 of file sick_scan_common_nw.cpp.

Definition at line 141 of file sick_scan_common_nw.h.

get SOPAS raw data include header and CRC

Returns:
Pointer to raw data message

The raw data is stored in m_buffer. This function returns a pointer to this buffer.

Definition at line 596 of file sick_scan_common_nw.cpp.

Returns the index of a variable (answer to read variable by index). In case of error a negative value will be returned.

Definition at line 605 of file sick_scan_common_nw.cpp.

Returns the name of a variable (answer to read variable by name). In case of error an empty value will be returned.

bool SopasEventMessage::isValid ( ) const [inline]

Definition at line 167 of file sick_scan_common_nw.h.

UINT32 SopasEventMessage::size ( ) const [inline]

Definition at line 147 of file sick_scan_common_nw.h.


Member Data Documentation

Definition at line 175 of file sick_scan_common_nw.h.

Definition at line 177 of file sick_scan_common_nw.h.

Definition at line 176 of file sick_scan_common_nw.h.


The documentation for this class was generated from the following files:


sick_scan
Author(s): Michael Lehning , Jochen Sprickerhof , Martin Günther
autogenerated on Tue Jul 9 2019 05:05:35