Class MethodCommand

Inheritance Relationships

Base Type

Derived Types

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)