Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
visionary::CoLaCommand Class Reference

#include <CoLaCommand.h>

Public Types

using ByteBuffer = std::vector< std::uint8_t >
 

Public Member Functions

 CoLaCommand ()
 
 CoLaCommand (const ByteBuffer &buffer)
 
const ByteBuffergetBuffer () const
 Get the binary data buffer. More...
 
CoLaError::Enum getError () const
 Get error. More...
 
const char * getName () const
 Get the name of command. More...
 
std::size_t getParameterOffset () const
 Get offset in bytes to where first parameter starts. More...
 
CoLaCommandType::Enum getType () const
 Get the type of command. More...
 
 ~CoLaCommand ()
 

Static Public Member Functions

static CoLaCommand errorCommand ()
 Create a command for network errors. More...
 
static CoLaCommand networkErrorCommand ()
 Create a command for network errors. More...
 

Private Member Functions

 CoLaCommand (CoLaCommandType::Enum commandType, CoLaError::Enum error, const std::string &name)
 Construct a new CoLaCommand with the given command type, error, and name, but without any data. More...
 
bool fromBuffer (const ByteBuffer &buffer)
 Decode a CoLa command from a given buffer. More...
 

Private Attributes

ByteBuffer m_buffer
 
CoLaError::Enum m_error
 
std::string m_name
 
std::size_t m_parameterOffset
 
CoLaCommandType::Enum m_type
 

Detailed Description

Definition at line 17 of file CoLaCommand.h.

Member Typedef Documentation

◆ ByteBuffer

using visionary::CoLaCommand::ByteBuffer = std::vector<std::uint8_t>

Definition at line 20 of file CoLaCommand.h.

Constructor & Destructor Documentation

◆ CoLaCommand() [1/3]

visionary::CoLaCommand::CoLaCommand ( )

◆ ~CoLaCommand()

visionary::CoLaCommand::~CoLaCommand ( )
default

◆ CoLaCommand() [2/3]

visionary::CoLaCommand::CoLaCommand ( const ByteBuffer buffer)

Construct a new CoLaCommand from the given data buffer

Definition at line 126 of file CoLaCommand.cpp.

◆ CoLaCommand() [3/3]

visionary::CoLaCommand::CoLaCommand ( CoLaCommandType::Enum  commandType,
CoLaError::Enum  error,
const std::string &  name 
)
private

Construct a new CoLaCommand with the given command type, error, and name, but without any data.

Definition at line 121 of file CoLaCommand.cpp.

Member Function Documentation

◆ errorCommand()

static CoLaCommand visionary::CoLaCommand::errorCommand ( )
static

Create a command for network errors.

◆ fromBuffer()

bool visionary::CoLaCommand::fromBuffer ( const ByteBuffer buffer)
private

Decode a CoLa command from a given buffer.

Definition at line 15 of file CoLaCommand.cpp.

◆ getBuffer()

const CoLaCommand::ByteBuffer & visionary::CoLaCommand::getBuffer ( ) const

Get the binary data buffer.

Definition at line 139 of file CoLaCommand.cpp.

◆ getError()

CoLaError::Enum visionary::CoLaCommand::getError ( ) const

Get error.

Definition at line 159 of file CoLaCommand.cpp.

◆ getName()

const char * visionary::CoLaCommand::getName ( ) const

Get the name of command.

Definition at line 149 of file CoLaCommand.cpp.

◆ getParameterOffset()

std::size_t visionary::CoLaCommand::getParameterOffset ( ) const

Get offset in bytes to where first parameter starts.

Definition at line 154 of file CoLaCommand.cpp.

◆ getType()

CoLaCommandType::Enum visionary::CoLaCommand::getType ( ) const

Get the type of command.

Definition at line 144 of file CoLaCommand.cpp.

◆ networkErrorCommand()

CoLaCommand visionary::CoLaCommand::networkErrorCommand ( )
static

Create a command for network errors.

Definition at line 164 of file CoLaCommand.cpp.

Member Data Documentation

◆ m_buffer

ByteBuffer visionary::CoLaCommand::m_buffer
private

Definition at line 51 of file CoLaCommand.h.

◆ m_error

CoLaError::Enum visionary::CoLaCommand::m_error
private

Definition at line 55 of file CoLaCommand.h.

◆ m_name

std::string visionary::CoLaCommand::m_name
private

Definition at line 53 of file CoLaCommand.h.

◆ m_parameterOffset

std::size_t visionary::CoLaCommand::m_parameterOffset
private

Definition at line 54 of file CoLaCommand.h.

◆ m_type

CoLaCommandType::Enum visionary::CoLaCommand::m_type
private

Definition at line 52 of file CoLaCommand.h.


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


sick_visionary_ros
Author(s): SICK AG TechSupport 3D Snapshot
autogenerated on Thu Feb 8 2024 04:38:18