TypeCodeVariableCommand.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 
45  : VariableCommand(session, 0x000d)
46  , m_type_code(type_code)
47 {
48  m_writer_ptr = std::make_shared<sick::data_processing::ReadWriteHelper>();
49  m_type_code_parser_ptr = std::make_shared<sick::data_processing::ParseTypeCodeData>();
50 }
51 
54 {
56 }
57 
59 {
60  return true;
61 }
62 
64 {
66  {
67  return false;
68  }
69  m_type_code_parser_ptr->parseTCPSequence(getDataVector(), m_type_code);
70  return true;
71 }
72 
73 
74 } // namespace cola2
75 } // namespace sick
std::vector< uint8_t > getDataVector() const
Returns the data vector.
Definition: Command.cpp:137
void addTelegramData(sick::datastructure::PacketBuffer::VectorBuffer &telegram) const
Adds the data to the telegram.
std::shared_ptr< sick::data_processing::ReadWriteHelper > m_writer_ptr
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.
TypeCodeVariableCommand(Cola2Session &session, datastructure::TypeCode &type_code)
Constructor of the Command.
Class containing the type code of a laser scanner.
Definition: TypeCode.h:62
bool processReply()
Processes the return from the sensor.
bool canBeExecutedWithoutSessionID() const
Returns if the command can be executed without a session ID. Will return false for most commands exce...
std::vector< uint8_t > VectorBuffer
Typedef for a vector buffer, to sort the incoming packets.
Definition: PacketBuffer.h:71
std::shared_ptr< sick::data_processing::ParseTypeCodeData > m_type_code_parser_ptr
Establishes a cola2 session with a sensor and enables execution of commands in this session...
Definition: Cola2Session.h:72
sick::datastructure::TypeCode & m_type_code


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