41   : m_async_tcp_client_ptr(async_tcp_client)
    43   , m_last_request_id(0)
    47   m_tcp_parser_ptr    = std::make_shared<sick::data_processing::ParseTCPPacket>();
    52   CommandPtr command_ptr = std::make_shared<CreateSession>(boost::ref(*
this));
    58   CommandPtr command_ptr = std::make_shared<CloseSession>(boost::ref(*
this));
    76   command->lockExecutionMutex(); 
    78   command->constructTelegram(telegram);
    80   command->waitForCompletion(); 
   132     pendingCommand->processReplyBase(packet.
getBuffer());
 bool checkIfPacketIsCompleteAndOtherwiseListenForMorePackets()
 
bool close()
Closes a session with the sensor. Executes the close session command. 
 
std::shared_ptr< sick::data_processing::TCPPacketMerger > m_packet_merger_ptr
 
A packetbuffer for the raw data from the sensor. 
 
std::shared_ptr< sick::cola2::Command > CommandPtr
Typedef for a pointer containing a command to be executed. 
 
void processPacket(const sick::datastructure::PacketBuffer &packet)
 
std::shared_ptr< sick::data_processing::ParseTCPPacket > m_tcp_parser_ptr
 
uint16_t m_last_request_id
 
bool addPacketToMerger(const sick::datastructure::PacketBuffer &packet)
 
bool executeCommand(const CommandPtr &command)
Executes the command passed to the function. 
 
Cola2Session(const std::shared_ptr< communication::AsyncTCPClient > &async_tcp_client)
Constructor of the cola2 session. 
 
bool findCommand(const uint16_t &request_id, CommandPtr &command)
 
void doDisconnect()
Triggers the disconnection of the tcp socket. 
 
std::shared_ptr< sick::communication::AsyncTCPClient > m_async_tcp_client_ptr
 
bool open()
Opens a session with the sensor. Executes the create session command. 
 
const VectorBuffer & getBuffer() const 
Getter to return the VectorBuffer saved in the PacketBuffer. 
 
bool sendTelegramAndListenForAnswer(const CommandPtr &command)
 
bool addCommand(const uint16_t &request_id, const CommandPtr &command)
 
void setSessionID(const uint32_t &session_id)
Sets the current session ID. 
 
uint16_t getNextRequestID()
Returns the next request ID. The request ID is used to match the return packages of the sensor to the...
 
bool removeCommand(const uint16_t &request_id)
 
bool startProcessingAndRemovePendingCommandAfterwards(const sick::datastructure::PacketBuffer &packet)
 
uint32_t getSessionID() const 
Returns the current session ID. 
 
std::vector< uint8_t > VectorBuffer
Typedef for a vector buffer, to sort the incoming packets. 
 
std::map< uint16_t, CommandPtr > m_pending_commands_map