MonitoringCaseVariableCommand.cpp
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 
36 
39 
40 namespace sick {
41 namespace cola2 {
42 
43 
45  Cola2Session& session,
46  datastructure::MonitoringCaseData& monitoring_case_data,
47  const uint16_t index)
48  : VariableCommand(session, 2101 + index)
49  , m_monitoring_case_data(monitoring_case_data)
50 {
51  m_writer_ptr = std::make_shared<sick::data_processing::ReadWriteHelper>();
52  m_monitoring_case_parser_ptr = std::make_shared<sick::data_processing::ParseMonitoringCaseData>();
53 }
54 
57 {
59 }
60 
62 {
63  return true;
64 }
65 
67 {
69  {
70  return false;
71  }
73  return true;
74 }
75 
76 
77 } // namespace cola2
78 } // namespace sick
std::shared_ptr< sick::data_processing::ParseMonitoringCaseData > m_monitoring_case_parser_ptr
std::vector< uint8_t > getDataVector() const
Returns the data vector.
Definition: Command.cpp:137
MonitoringCaseVariableCommand(Cola2Session &session, datastructure::MonitoringCaseData &monitoring_case_data, const uint16_t index)
Constructor of the command.
void addTelegramData(sick::datastructure::PacketBuffer::VectorBuffer &telegram) const
Adds the data to the telegram.
void addTelegramData(sick::datastructure::PacketBuffer::VectorBuffer &telegram) const
Adds the data to the telegram.
bool processReply()
Processes the return from the sensor.
Command to read a variable from the sensor.
sick::datastructure::MonitoringCaseData & m_monitoring_case_data
bool processReply()
Processes the return from the sensor.
Stores the data for the different monitoring cases.
std::shared_ptr< sick::data_processing::ReadWriteHelper > m_writer_ptr
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
bool canBeExecutedWithoutSessionID() const
Returns if the command can be executed without a session ID. Will return false for most commands exce...


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