00001 // this is for emacs file handling -*- mode: c++; indent-tabs-mode: nil -*- 00002 00003 // -- BEGIN LICENSE BLOCK ---------------------------------------------- 00004 00024 // -- END LICENSE BLOCK ------------------------------------------------ 00025 00026 //---------------------------------------------------------------------- 00033 //---------------------------------------------------------------------- 00034 00035 #ifndef SICK_SAFETYSCANNERS_COLA2_CREATESESSION_H 00036 #define SICK_SAFETYSCANNERS_COLA2_CREATESESSION_H 00037 00038 00039 #include <sick_safetyscanners/cola2/Command.h> 00040 00041 namespace sick { 00042 namespace cola2 { 00043 00047 class CreateSession : public Command 00048 { 00049 public: 00055 explicit CreateSession(Cola2Session& session); 00056 00062 void addTelegramData(sick::datastructure::PacketBuffer::VectorBuffer& telegram) const; 00063 00069 bool canBeExecutedWithoutSessionID() const; 00070 00076 bool processReply(); 00077 00078 private: 00079 std::shared_ptr<sick::data_processing::ReadWriteHelper> m_writer_ptr; 00080 00081 uint8_t* 00082 prepareTelegramAndGetDataPtr(sick::datastructure::PacketBuffer::VectorBuffer& telegram) const; 00083 void writeHeartbeatTimeoutToDataPtr(uint8_t*& data_ptr) const; 00084 void writeClientIdToDataPtr(uint8_t*& data_ptr) const; 00085 }; 00086 00087 } // namespace cola2 00088 } // namespace sick 00089 00090 #endif // SICK_SAFETYSCANNERS_COLA2_CREATESESSION_H