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
sick::cola2::CreateSession::writeHeartbeatTimeoutToDataPtr
void writeHeartbeatTimeoutToDataPtr(std::vector< uint8_t >::iterator it) const
Definition: CreateSession.cpp:80
sick
Definition: ApplicationNameVariableCommand.h:43
Command.h
sick::cola2::CreateSession
Command to create a new cola2 session.
Definition: CreateSession.h:47
sick::cola2::Cola2Session
Establishes a cola2 session with a sensor and enables execution of commands in this session.
Definition: Cola2Session.h:72
sick::cola2::CreateSession::CreateSession
CreateSession(Cola2Session &session)
Constructor to create a new command to set up a new session.
Definition: CreateSession.cpp:43
sick::cola2::CreateSession::canBeExecutedWithoutSessionID
bool canBeExecutedWithoutSessionID() const
Returns true since creating a new session is possible without a session ID.
Definition: CreateSession.cpp:58
sick::cola2::CreateSession::addTelegramData
std::vector< uint8_t > addTelegramData(const std::vector< uint8_t > &telegram) const
Adds the data to the telegram.
Definition: CreateSession.cpp:48
sick::cola2::Command
Base class for commands. Defines the base interface and does the common tasks.
Definition: Command.h:61
sick::cola2::CreateSession::writeClientIdToDataPtr
void writeClientIdToDataPtr(std::vector< uint8_t >::iterator it) const
Definition: CreateSession.cpp:86
sick::cola2::CreateSession::processReply
bool processReply()
Processes the return from the sensor. Checks if the request was successful.
Definition: CreateSession.cpp:63


sick_safetyscanners
Author(s): Lennart Puck
autogenerated on Fri Jun 21 2024 02:40:51