Public Member Functions | Private Member Functions | Private Attributes | List of all members
devices::SopasEventMessage Class Reference

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

#include <SopasBase.hpp>

Public Member Functions

std::string getCommandString () const
 
SopasBase::SopasEncoding getEncodingType () const
 
SopasBase::SopasMessageType getMessageType () const
 
BYTEgetPayLoad ()
 contains 's' + command string(2 byte) + content(payload length - 3) More...
 
UINT32 getPayLoadLength () const
 contains 's' + command string(2 byte) + content(payload length - 3) More...
 
SopasBase::SopasProtocol getProtocolType () const
 
INT32 getVariableIndex ()
 Returns the index of a variable (answer to read variable by index). In case of error a negative value will be returned. More...
 
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. More...
 
bool isValid () const
 
UINT32 size () const
 
 SopasEventMessage ()
 Default constructor. More...
 
 SopasEventMessage (BYTE *buffer, SopasBase::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. More...
 
 ~SopasEventMessage ()
 Destructor. More...
 

Private Member Functions

void detectEncoding ()
 
void detectMessageType ()
 

Private Attributes

BYTEm_buffer
 
SopasBase::SopasEncoding m_encoding
 
UINT32 m_frameLength
 
SopasBase::SopasMessageType m_messageType
 
SopasBase::SopasProtocol m_protocol
 

Detailed Description

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

Definition at line 420 of file SopasBase.hpp.

Constructor & Destructor Documentation

◆ SopasEventMessage() [1/2]

SopasEventMessage::SopasEventMessage ( )

Default constructor.

Definition at line 2203 of file SopasBase.cpp.

◆ ~SopasEventMessage()

devices::SopasEventMessage::~SopasEventMessage ( )
inline

Destructor.

Definition at line 427 of file SopasBase.hpp.

◆ SopasEventMessage() [2/2]

SopasEventMessage::SopasEventMessage ( BYTE buffer,
SopasBase::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 2210 of file SopasBase.cpp.

Member Function Documentation

◆ detectEncoding()

void SopasEventMessage::detectEncoding ( )
private

Definition at line 2346 of file SopasBase.cpp.

◆ detectMessageType()

void SopasEventMessage::detectMessageType ( )
private

Definition at line 2358 of file SopasBase.cpp.

◆ getCommandString()

std::string SopasEventMessage::getCommandString ( ) const

Definition at line 2237 of file SopasBase.cpp.

◆ getEncodingType()

SopasBase::SopasEncoding devices::SopasEventMessage::getEncodingType ( ) const
inline

Definition at line 443 of file SopasBase.hpp.

◆ getMessageType()

SopasBase::SopasMessageType devices::SopasEventMessage::getMessageType ( ) const
inline

Definition at line 448 of file SopasBase.hpp.

◆ getPayLoad()

BYTE * SopasEventMessage::getPayLoad ( )

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

Definition at line 2259 of file SopasBase.cpp.

◆ getPayLoadLength()

UINT32 SopasEventMessage::getPayLoadLength ( ) const

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

Definition at line 2219 of file SopasBase.cpp.

◆ getProtocolType()

SopasBase::SopasProtocol devices::SopasEventMessage::getProtocolType ( ) const
inline

Definition at line 438 of file SopasBase.hpp.

◆ getVariableIndex()

INT32 SopasEventMessage::getVariableIndex ( )

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 2278 of file SopasBase.cpp.

◆ getVariableName()

std::string SopasEventMessage::getVariableName ( )

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

Definition at line 2308 of file SopasBase.cpp.

◆ isValid()

bool devices::SopasEventMessage::isValid ( ) const
inline

Definition at line 472 of file SopasBase.hpp.

◆ size()

UINT32 devices::SopasEventMessage::size ( ) const
inline

Definition at line 453 of file SopasBase.hpp.

Member Data Documentation

◆ m_buffer

BYTE* devices::SopasEventMessage::m_buffer
private

Definition at line 480 of file SopasBase.hpp.

◆ m_encoding

SopasBase::SopasEncoding devices::SopasEventMessage::m_encoding
private

Definition at line 483 of file SopasBase.hpp.

◆ m_frameLength

UINT32 devices::SopasEventMessage::m_frameLength
private

Definition at line 482 of file SopasBase.hpp.

◆ m_messageType

SopasBase::SopasMessageType devices::SopasEventMessage::m_messageType
private

Definition at line 484 of file SopasBase.hpp.

◆ m_protocol

SopasBase::SopasProtocol devices::SopasEventMessage::m_protocol
private

Definition at line 481 of file SopasBase.hpp.


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


sick_scan_xd
Author(s): Michael Lehning , Jochen Sprickerhof , Martin Günther
autogenerated on Fri Oct 25 2024 02:47:15