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

Command to create a new cola2 session. More...

#include <CreateSession.h>

Inheritance diagram for sick::cola2::CreateSession:
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 true since creating a new session is possible without a session ID. More...
 
 CreateSession (Cola2Session &session)
 Constructor to create a new command to set up a new session. More...
 
bool processReply ()
 Processes the return from the sensor. Checks if the request was successful. More...
 
- 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 Member Functions

uint8_t * prepareTelegramAndGetDataPtr (sick::datastructure::PacketBuffer::VectorBuffer &telegram) const
 
void writeClientIdToDataPtr (uint8_t *&data_ptr) const
 
void writeHeartbeatTimeoutToDataPtr (uint8_t *&data_ptr) const
 

Private Attributes

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 to create a new cola2 session.

Definition at line 47 of file CreateSession.h.

Constructor & Destructor Documentation

sick::cola2::CreateSession::CreateSession ( Cola2Session session)
explicit

Constructor to create a new command to set up a new session.

Parameters
sessionThe new session which will be setup.

Definition at line 43 of file CreateSession.cpp.

Member Function Documentation

void sick::cola2::CreateSession::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 49 of file CreateSession.cpp.

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

Returns true since creating a new session is possible without a session ID.

Returns
true.

Definition at line 64 of file CreateSession.cpp.

uint8_t * sick::cola2::CreateSession::prepareTelegramAndGetDataPtr ( sick::datastructure::PacketBuffer::VectorBuffer telegram) const
private

Definition at line 56 of file CreateSession.cpp.

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

Processes the return from the sensor. Checks if the request was successful.

Returns
If processing of the returned data was successful.

Implements sick::cola2::Command.

Definition at line 69 of file CreateSession.cpp.

void sick::cola2::CreateSession::writeClientIdToDataPtr ( uint8_t *&  data_ptr) const
private

Definition at line 91 of file CreateSession.cpp.

void sick::cola2::CreateSession::writeHeartbeatTimeoutToDataPtr ( uint8_t *&  data_ptr) const
private

Definition at line 85 of file CreateSession.cpp.

Member Data Documentation

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

Definition at line 79 of file CreateSession.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