MethodCommand.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_METHODCOMMAND_H
36 #define SICK_SAFETYSCANNERS_COLA2_METHODCOMMAND_H
37 
39 
40 namespace sick {
41 namespace cola2 {
42 
46 class MethodCommand : public Command
47 {
48 public:
55  MethodCommand(Cola2Session& session, const uint16_t& method_index);
56 
63  std::vector<uint8_t> addTelegramData(const std::vector<uint8_t>& telegram) const;
64 
71  bool canBeExecutedWithoutSessionID() const;
72 
78  bool processReply();
79 
80  uint16_t getMethodIndex() const;
81  void setMethodIndex(const uint16_t& method_index);
82 
83 private:
84  uint16_t m_method_index;
85 };
86 
87 } // namespace cola2
88 } // namespace sick
89 
90 #endif // SICK_SAFETYSCANNERS_COLA2_METHODCOMMAND_H
sick::cola2::MethodCommand::canBeExecutedWithoutSessionID
bool canBeExecutedWithoutSessionID() const
Returns if the command can be executed without a session ID. Will return false for most commands exce...
Definition: MethodCommand.cpp:58
sick::cola2::MethodCommand::processReply
bool processReply()
Processes the return from the sensor.
Definition: MethodCommand.cpp:63
sick
Definition: ApplicationNameVariableCommand.h:43
sick::cola2::MethodCommand::getMethodIndex
uint16_t getMethodIndex() const
Definition: MethodCommand.cpp:79
Command.h
sick::cola2::MethodCommand::m_method_index
uint16_t m_method_index
Definition: MethodCommand.h:84
sick::cola2::Cola2Session
Establishes a cola2 session with a sensor and enables execution of commands in this session.
Definition: Cola2Session.h:72
sick::cola2::MethodCommand::MethodCommand
MethodCommand(Cola2Session &session, const uint16_t &method_index)
Constructor of the method command.
Definition: MethodCommand.cpp:43
sick::cola2::MethodCommand::setMethodIndex
void setMethodIndex(const uint16_t &method_index)
Definition: MethodCommand.cpp:84
sick::cola2::MethodCommand::addTelegramData
std::vector< uint8_t > addTelegramData(const std::vector< uint8_t > &telegram) const
Adds the data to the telegram.
Definition: MethodCommand.cpp:49
sick::cola2::Command
Base class for commands. Defines the base interface and does the common tasks.
Definition: Command.h:61
sick::cola2::MethodCommand
Command for method calls to the sensor.
Definition: MethodCommand.h:46


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