Class MethodCommand
Defined in File MethodCommand.h
Inheritance Relationships
Base Type
public sick::cola2::Command
(Class Command)
Derived Types
public sick::cola2::ChangeCommSettingsCommand
(Class ChangeCommSettingsCommand)public sick::cola2::FindMeCommand
(Class FindMeCommand)
Class Documentation
-
class MethodCommand : public sick::cola2::Command
Command for method calls to the sensor.
Subclassed by sick::cola2::ChangeCommSettingsCommand, sick::cola2::FindMeCommand
Public Functions
-
MethodCommand(Cola2Session &session, const uint16_t &method_index)
Constructor of the method command.
- Parameters:
session – The current cola2 session.
method_index – The index of the method to call in the sensor.
-
virtual std::vector<uint8_t> addTelegramData(const std::vector<uint8_t> &telegram) const
Adds the data to the telegram.
- Parameters:
telegram – The telegram which will be modified by the data.
- Returns:
Completed telegram
-
bool canBeExecutedWithoutSessionID() const
Returns if the command can be executed without a session ID. Will return false for most commands except the commands to establish a connection.
- Returns:
If the command needs a session ID to be executed.
-
virtual bool processReply()
Processes the return from the sensor.
- Returns:
If processing of the returned data was successful.
-
uint16_t getMethodIndex() const
-
void setMethodIndex(const uint16_t &method_index)
-
MethodCommand(Cola2Session &session, const uint16_t &method_index)