35 #ifndef SICK_SAFETYSCANNERS_COLA2_COLA2SESSION_H    36 #define SICK_SAFETYSCANNERS_COLA2_COLA2SESSION_H    49 #include <boost/bind.hpp>    78   typedef std::shared_ptr<sick::cola2::Command> 
CommandPtr;
    86   explicit Cola2Session(
const std::shared_ptr<communication::AsyncTCPClient>& async_tcp_client);
   157   bool addCommand(
const uint16_t& request_id, 
const CommandPtr& command);
   158   bool findCommand(
const uint16_t& request_id, CommandPtr& command);
   172 #endif // SICK_SAFETYSCANNERS_COLA2_COLA2SESSION_H 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. 
 
boost::mutex m_execution_mutex
 
std::shared_ptr< sick::communication::AsyncTCPClient > m_async_tcp_client_ptr
 
bool open()
Opens a session with the sensor. Executes the create session command. 
 
bool sendTelegramAndListenForAnswer(const CommandPtr &command)
 
std::shared_ptr< sick::data_processing::ParseTCPPacket > m_parser_ptr
 
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. 
 
Establishes a cola2 session with a sensor and enables execution of commands in this session...
 
std::map< uint16_t, CommandPtr > m_pending_commands_map