Class VariableCommand

Inheritance Relationships

Base Type

Derived Types

Class Documentation

class VariableCommand : public sick::cola2::Command

Command to read a variable from the sensor.

Subclassed by sick::cola2::ApplicationNameVariableCommand, sick::cola2::ConfigMetadataVariableCommand, sick::cola2::DeviceNameVariableCommand, sick::cola2::DeviceStatusVariableCommand, sick::cola2::FieldGeometryVariableCommand, sick::cola2::FieldHeaderVariableCommand, sick::cola2::FieldSetsVariableCommand, sick::cola2::FirmwareVersionVariableCommand, sick::cola2::LatestTelegramVariableCommand, sick::cola2::MeasurementCurrentConfigVariableCommand, sick::cola2::MeasurementPersistentConfigVariableCommand, sick::cola2::MonitoringCaseTableHeaderVariableCommand, sick::cola2::MonitoringCaseVariableCommand, sick::cola2::OrderNumberVariableCommand, sick::cola2::ProjectNameVariableCommand, sick::cola2::RequiredUserActionVariableCommand, sick::cola2::SerialNumberVariableCommand, sick::cola2::StatusOverviewVariableCommand, sick::cola2::TypeCodeVariableCommand, sick::cola2::UserNameVariableCommand

Public Functions

VariableCommand(Cola2Session &session, const uint16_t &variable_index)

Constructor of the command.

Parameters:
  • session – The current cola2 session.

  • method_index – The index of the variable.

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 getVariableIndex() const
void setVariableIndex(const uint16_t &variable_index)