class Command

August 13, 2019 ยท View on GitHub

Member values

Member nameData typeDescription
frame_iduint32Frame ID
actuatorsActuatorCommandActuator command (repeated)
interconnectCommandInterface command

Member functions

Function nameReturn typeInput typeDescription
frame_id()uint32voidReturns the current value of frame_id. If the frame_id is not set, returns 0.
set_frame_id()voiduint32Sets the value of frame_id. After calling this, frame_id() will return value.
clear_frame_id()voidvoidClears the value of frame_id. After calling this, frame_id() will return 0.
actuators_size() constintvoidReturns the number of elements currently in the field.
actuators() constconst ActuatorCommandint indexReturns the element at the given zero-based index. Calling this method with index outside of [0, actuators_size()) yields undefined behavior.
mutable_actuators()ActuatorCommand*int indexReturns a pointer to the mutable ActuatorCommand object that stores the value of the element at the given zero-based index. Calling this method with index outside of [0, actuators_size()) yields undefined behavior.
add_actuators()ActuatorCommand*voidAdds a new element and returns a pointer to it. The returned ActuatorCommand is mutable and will have none of its fields set (i.e. it will be identical to a newly-allocated ActuatorCommand).
clear_actuators()voidvoidRemoves all elements from the field. After calling this, actuators_size() will return zero.
actuators() constconst RepeatedPtrField< ActuatorCommand>&voidReturns the underlying RepeatedPtrField that stores the field's elements. This container class provides STL-like iterators and other methods.
mutable_actuators()RepeatedPtrField< ActuatorCommand>*voidReturns a pointer to the underlying mutable RepeatedPtrField that stores the field's elements. This container class provides STL-like iterators and other methods.
has_interconnect() constboolvoidReturns true if interconnect is set.
interconnect()const Command&voidReturns the current value of interconnect. If interconnect is not set, returns a Command with none of its fields set (possibly interconnect::default_instance()).
mutable_interconnect()Command *voidReturns a pointer to the mutable Command object that stores the field's value. If the field was not set prior to the call, then the returned Command will have none of its fields set (i.e. it will be identical to a newly-allocated Command). After calling this, has_interconnect() will return true and interconnect() will return a reference to the same instance of Command.
clear_interconnect()voidvoidClears the value of the field. After calling this, has_interconnect() will return false and interconnect() will return the default value.
set_allocated_interconnect()voidCommand *Sets the Command object to the field and frees the previous field value if it exists. If the Command pointer is not NULL, the message takes ownership of the allocated Command object and has_ Command() will return true. Otherwise, if the interconnect is NULL, the behavior is the same as calling clear_interconnect().
release_interconnect()Command *voidReleases the ownership of the field and returns the pointer of the Command object. After calling this, caller takes the ownership of the allocated Command object, has_interconnect() will return false, and interconnect() will return the default value.

Parent topic: BaseCyclic (C++)