Public Member Functions | Private Attributes | List of all members
sick::cola2::MethodCommand Class Reference

Command for method calls to the sensor. More...

#include <MethodCommand.h>

Inheritance diagram for sick::cola2::MethodCommand:
Inheritance graph
[legend]

Public Member Functions

void addTelegramData (sick::datastructure::PacketBuffer::VectorBuffer &telegram) const
 Adds the data to the telegram. More...
 
bool canBeExecutedWithoutSessionID () const
 Returns if the command can be executed without a session ID. Will return false for most commands except the commands to establish a connection. More...
 
uint16_t getMethodIndex () const
 
 MethodCommand (Cola2Session &session, const uint16_t &method_index)
 Constructor of the method command. More...
 
bool processReply ()
 Processes the return from the sensor. More...
 
void setMethodIndex (const uint16_t &method_index)
 
- Public Member Functions inherited from sick::cola2::Command
 Command (sick::cola2::Cola2Session &session, const uint16_t &command_type, const uint16_t &command_mode)
 Constructor of the command. Sets the common variables for a command to the sensor. More...
 
void constructTelegram (sick::datastructure::PacketBuffer::VectorBuffer &telegram) const
 Adds the data to the telegram and afterwards the header with the correct length. More...
 
uint8_t getCommandMode () const
 Returns the command mode. More...
 
uint8_t getCommandType () const
 Returns the command type. More...
 
std::vector< uint8_t > getDataVector () const
 Returns the data vector. More...
 
uint16_t getRequestID () const
 Returns the request id of the command. More...
 
uint32_t getSessionID () const
 Returns the current session ID. More...
 
void lockExecutionMutex ()
 Locks a mutex to prevent other commands being executed in parallel. More...
 
void processReplyBase (const sick::datastructure::PacketBuffer::VectorBuffer &packet)
 Parses the da incoming data package and then processes it with the inherited processReply. Afterwards the mutex will be unlocked to allow new commands to be send. More...
 
void setCommandMode (const uint8_t &command_mode)
 Sets the command mode. More...
 
void setCommandType (const uint8_t &command_type)
 Sets the command type. More...
 
void setDataVector (const std::vector< uint8_t > &data)
 Sets the data vector. More...
 
void setRequestID (const uint16_t &request_id)
 Sets the request ID of the command. More...
 
void setSessionID (const uint32_t &session_id)
 Sets the session ID. More...
 
void waitForCompletion ()
 Scooped call to the mutex, which will block until the reply was processed. More...
 
bool wasSuccessful () const
 Returns if the command was successfully parsed. More...
 
virtual ~Command ()
 We have virtual member functions, so a virtual destructor is needed. More...
 

Private Attributes

uint16_t m_method_index
 
std::shared_ptr< sick::data_processing::ReadWriteHelperm_writer_ptr
 

Additional Inherited Members

- Protected Attributes inherited from sick::cola2::Command
sick::cola2::Cola2Sessionm_session
 

Detailed Description

Command for method calls to the sensor.

Definition at line 46 of file MethodCommand.h.

Constructor & Destructor Documentation

sick::cola2::MethodCommand::MethodCommand ( Cola2Session session,
const uint16_t &  method_index 
)

Constructor of the method command.

Parameters
sessionThe current cola2 session.
method_indexThe index of the method to call in the sensor.

Definition at line 43 of file MethodCommand.cpp.

Member Function Documentation

void sick::cola2::MethodCommand::addTelegramData ( sick::datastructure::PacketBuffer::VectorBuffer telegram) const
virtual

Adds the data to the telegram.

Parameters
telegramThe telegram which will be modified by the data.

Implements sick::cola2::Command.

Definition at line 50 of file MethodCommand.cpp.

bool sick::cola2::MethodCommand::canBeExecutedWithoutSessionID ( ) const

Returns if the command can be executed without a session ID. Will return false for most commands except the commands to establish a connection.

Returns
If the command needs a session ID to be executed.

Definition at line 58 of file MethodCommand.cpp.

uint16_t sick::cola2::MethodCommand::getMethodIndex ( ) const

Definition at line 78 of file MethodCommand.cpp.

bool sick::cola2::MethodCommand::processReply ( )
virtual

Processes the return from the sensor.

Returns
If processing of the returned data was successful.

Implements sick::cola2::Command.

Definition at line 63 of file MethodCommand.cpp.

void sick::cola2::MethodCommand::setMethodIndex ( const uint16_t &  method_index)

Definition at line 83 of file MethodCommand.cpp.

Member Data Documentation

uint16_t sick::cola2::MethodCommand::m_method_index
private

Definition at line 83 of file MethodCommand.h.

std::shared_ptr<sick::data_processing::ReadWriteHelper> sick::cola2::MethodCommand::m_writer_ptr
private

Definition at line 84 of file MethodCommand.h.


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


sick_safetyscanners
Author(s): Lennart Puck
autogenerated on Thu May 9 2019 02:41:08