MeasurementPersistentConfigVariableCommand.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/MeasurementPersistentConfigVariableCommand.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 MeasurementPersistentConfigVariableCommand::MeasurementPersistentConfigVariableCommand(
00044   Cola2Session& session, datastructure::ConfigData& config_data)
00045   : VariableCommand(session, 177)
00046   , m_config_data(config_data)
00047 {
00048   m_writer_ptr = std::make_shared<sick::data_processing::ReadWriteHelper>();
00049   m_measurement_persistent_config_parser_ptr =
00050     std::make_shared<sick::data_processing::ParseMeasurementPersistentConfigData>();
00051 }
00052 
00053 void MeasurementPersistentConfigVariableCommand::addTelegramData(
00054   sick::datastructure::PacketBuffer::VectorBuffer& telegram) const
00055 {
00056   base_class::addTelegramData(telegram);
00057 }
00058 
00059 bool MeasurementPersistentConfigVariableCommand::canBeExecutedWithoutSessionID() const
00060 {
00061   return true;
00062 }
00063 
00064 bool MeasurementPersistentConfigVariableCommand::processReply()
00065 {
00066   if (!base_class::processReply())
00067   {
00068     return false;
00069   }
00070   m_measurement_persistent_config_parser_ptr->parseTCPSequence(getDataVector(), m_config_data);
00071   return true;
00072 }
00073 
00074 
00075 } // namespace cola2
00076 } // namespace sick


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