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  std::vector<uint8_t> addTelegramData(const std::vector<uint8_t>& telegram) const;
64 
70  bool canBeExecutedWithoutSessionID() const;
71 
77  bool processReply();
78 
79 private:
80  /*std::vector<uint8_t>
81  prepareTelegramAndGetDataPtr(const std::vector<uint8_t>& telegram) const;*/
82  void writeHeartbeatTimeoutToDataPtr(std::vector<uint8_t>::iterator it) const;
83  void writeClientIdToDataPtr(std::vector<uint8_t>::iterator it) const;
84 };
85 
86 } // namespace cola2
87 } // namespace sick
88 
89 #endif // SICK_SAFETYSCANNERS_COLA2_CREATESESSION_H
bool processReply()
Processes the return from the sensor. Checks if the request was successful.
Base class for commands. Defines the base interface and does the common tasks.
Definition: Command.h:61
void writeClientIdToDataPtr(std::vector< uint8_t >::iterator it) const
bool canBeExecutedWithoutSessionID() const
Returns true since creating a new session is possible without a session ID.
std::vector< uint8_t > addTelegramData(const std::vector< uint8_t > &telegram) const
Adds the data to the telegram.
Command to create a new cola2 session.
Definition: CreateSession.h:47
Establishes a cola2 session with a sensor and enables execution of commands in this session...
Definition: Cola2Session.h:72
void writeHeartbeatTimeoutToDataPtr(std::vector< uint8_t >::iterator it) const
CreateSession(Cola2Session &session)
Constructor to create a new command to set up a new session.


sick_safetyscanners
Author(s): Lennart Puck
autogenerated on Fri Apr 2 2021 02:45:41