CreateSession.h
Go to the documentation of this file.
1 // this is for emacs file handling -*- mode: c++; indent-tabs-mode: nil -*-
2 
3 // -- BEGIN LICENSE BLOCK ----------------------------------------------
4 
24 // -- END LICENSE BLOCK ------------------------------------------------
25 
26 //----------------------------------------------------------------------
33 //----------------------------------------------------------------------
34 
35 #ifndef SICK_SAFETYSCANNERS_COLA2_CREATESESSION_H
36 #define SICK_SAFETYSCANNERS_COLA2_CREATESESSION_H
37 
38 
40 
41 namespace sick {
42 namespace cola2 {
43 
47 class CreateSession : public Command
48 {
49 public:
55  explicit CreateSession(Cola2Session& session);
56 
63 
69  bool canBeExecutedWithoutSessionID() const;
70 
76  bool processReply();
77 
78 private:
79  std::shared_ptr<sick::data_processing::ReadWriteHelper> m_writer_ptr;
80 
81  uint8_t*
83  void writeHeartbeatTimeoutToDataPtr(uint8_t*& data_ptr) const;
84  void writeClientIdToDataPtr(uint8_t*& data_ptr) const;
85 };
86 
87 } // namespace cola2
88 } // namespace sick
89 
90 #endif // SICK_SAFETYSCANNERS_COLA2_CREATESESSION_H
bool processReply()
Processes the return from the sensor. Checks if the request was successful.
std::shared_ptr< sick::data_processing::ReadWriteHelper > m_writer_ptr
Definition: CreateSession.h:79
Base class for commands. Defines the base interface and does the common tasks.
Definition: Command.h:61
void addTelegramData(sick::datastructure::PacketBuffer::VectorBuffer &telegram) const
Adds the data to the telegram.
void writeClientIdToDataPtr(uint8_t *&data_ptr) const
uint8_t * prepareTelegramAndGetDataPtr(sick::datastructure::PacketBuffer::VectorBuffer &telegram) const
bool canBeExecutedWithoutSessionID() const
Returns true since creating a new session is possible without a session ID.
void writeHeartbeatTimeoutToDataPtr(uint8_t *&data_ptr) const
Command to create a new cola2 session.
Definition: CreateSession.h:47
std::vector< uint8_t > VectorBuffer
Typedef for a vector buffer, to sort the incoming packets.
Definition: PacketBuffer.h:71
Establishes a cola2 session with a sensor and enables execution of commands in this session...
Definition: Cola2Session.h:72
CreateSession(Cola2Session &session)
Constructor to create a new command to set up a new session.


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