src
cola2
ApplicationNameVariableCommand.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
35
#include <
sick_safetyscanners/cola2/ApplicationNameVariableCommand.h
>
36
37
#include <
sick_safetyscanners/cola2/Cola2Session.h
>
38
#include <
sick_safetyscanners/cola2/Command.h
>
39
40
namespace
sick
{
41
namespace
cola2 {
42
43
ApplicationNameVariableCommand::ApplicationNameVariableCommand
(
44
Cola2Session
& session,
sick::datastructure::ApplicationName
& application_name)
45
:
VariableCommand
(session, 33)
46
, m_application_name(application_name)
47
{
48
m_application_name_parser_ptr
=
49
std::make_shared<sick::data_processing::ParseApplicationNameData>();
50
}
51
52
bool
ApplicationNameVariableCommand::canBeExecutedWithoutSessionID
()
const
53
{
54
return
true
;
55
}
56
57
bool
ApplicationNameVariableCommand::processReply
()
58
{
59
if
(!
base_class::processReply
())
60
{
61
return
false
;
62
}
63
m_application_name_parser_ptr
->parseTCPSequence(
getDataVector
(),
m_application_name
);
64
return
true
;
65
}
66
67
68
}
// namespace cola2
69
}
// namespace sick
sick::cola2::ApplicationNameVariableCommand::canBeExecutedWithoutSessionID
bool canBeExecutedWithoutSessionID() const
Returns if the command can be executed without a session ID. Will return false for most commands exce...
Definition:
ApplicationNameVariableCommand.cpp:52
sick::cola2::ApplicationNameVariableCommand::m_application_name
sick::datastructure::ApplicationName & m_application_name
Definition:
ApplicationNameVariableCommand.h:86
sick
Definition:
ApplicationNameVariableCommand.h:43
sick::cola2::ApplicationNameVariableCommand::ApplicationNameVariableCommand
ApplicationNameVariableCommand(Cola2Session &session, datastructure::ApplicationName &application_name)
Constructor of the Command.
Definition:
ApplicationNameVariableCommand.cpp:43
Command.h
sick::cola2::Cola2Session
Establishes a cola2 session with a sensor and enables execution of commands in this session.
Definition:
Cola2Session.h:72
sick::cola2::ApplicationNameVariableCommand::m_application_name_parser_ptr
std::shared_ptr< sick::data_processing::ParseApplicationNameData > m_application_name_parser_ptr
Definition:
ApplicationNameVariableCommand.h:84
sick::cola2::VariableCommand::processReply
bool processReply()
Processes the return from the sensor.
Definition:
VariableCommand.cpp:63
sick::datastructure::ApplicationName
Class containing the application name of a laser scanner.
Definition:
ApplicationName.h:47
Cola2Session.h
sick::cola2::ApplicationNameVariableCommand::processReply
bool processReply()
Processes the return from the sensor.
Definition:
ApplicationNameVariableCommand.cpp:57
sick::cola2::Command::getDataVector
std::vector< uint8_t > getDataVector() const
Returns the data vector.
Definition:
Command.cpp:147
ApplicationNameVariableCommand.h
sick::cola2::VariableCommand
Command to read a variable from the sensor.
Definition:
VariableCommand.h:46
sick_safetyscanners
Author(s): Lennart Puck
autogenerated on Fri Aug 2 2024 08:28:38