MonitoringCaseVariableCommand.cpp
Go to the documentation of this file.
00001 // this is for emacs file handling -*- mode: c++; indent-tabs-mode: nil -*-
00002 
00003 // -- BEGIN LICENSE BLOCK ----------------------------------------------
00004 
00024 // -- END LICENSE BLOCK ------------------------------------------------
00025 
00026 //----------------------------------------------------------------------
00033 //----------------------------------------------------------------------
00034 
00035 #include <sick_safetyscanners/cola2/MonitoringCaseVariableCommand.h>
00036 
00037 #include <sick_safetyscanners/cola2/Cola2Session.h>
00038 #include <sick_safetyscanners/cola2/Command.h>
00039 
00040 namespace sick {
00041 namespace cola2 {
00042 
00043 
00044 MonitoringCaseVariableCommand::MonitoringCaseVariableCommand(
00045   Cola2Session& session,
00046   datastructure::MonitoringCaseData& monitoring_case_data,
00047   const uint16_t index)
00048   : VariableCommand(session, 2101 + index)
00049   , m_monitoring_case_data(monitoring_case_data)
00050 {
00051   m_writer_ptr                 = std::make_shared<sick::data_processing::ReadWriteHelper>();
00052   m_monitoring_case_parser_ptr = std::make_shared<sick::data_processing::ParseMonitoringCaseData>();
00053 }
00054 
00055 void MonitoringCaseVariableCommand::addTelegramData(
00056   sick::datastructure::PacketBuffer::VectorBuffer& telegram) const
00057 {
00058   base_class::addTelegramData(telegram);
00059 }
00060 
00061 bool MonitoringCaseVariableCommand::canBeExecutedWithoutSessionID() const
00062 {
00063   return true;
00064 }
00065 
00066 bool MonitoringCaseVariableCommand::processReply()
00067 {
00068   if (!base_class::processReply())
00069   {
00070     return false;
00071   }
00072   m_monitoring_case_parser_ptr->parseTCPSequence(getDataVector(), m_monitoring_case_data);
00073   return true;
00074 }
00075 
00076 
00077 } // namespace cola2
00078 } // namespace sick


sick_safetyscanners
Author(s): Lennart Puck
autogenerated on Tue May 7 2019 03:27:36