class Command

August 13, 2019 ยท View on GitHub

Member values

Member nameData typeDescription
command_idMessageIdMessageId
flagsuint32Flags
motor_cmdMotorCommandArray of finger commands, one for each finger of the gripper.

Member functions

Function nameReturn typeInput typeDescription
has_command_id() constboolvoidReturns true if command_id is set.
command_id()const MessageId&voidReturns the current value of command_id. If command_id is not set, returns a MessageId with none of its fields set (possibly command_id::default_instance()).
mutable_command_id()MessageId *voidReturns a pointer to the mutable MessageId object that stores the field's value. If the field was not set prior to the call, then the returned MessageId will have none of its fields set (i.e. it will be identical to a newly-allocated MessageId). After calling this, has_command_id() will return true and command_id() will return a reference to the same instance of MessageId.
clear_command_id()voidvoidClears the value of the field. After calling this, has_command_id() will return false and command_id() will return the default value.
set_allocated_command_id()voidMessageId *Sets the MessageId object to the field and frees the previous field value if it exists. If the MessageId pointer is not NULL, the message takes ownership of the allocated MessageId object and has_ MessageId() will return true. Otherwise, if the command_id is NULL, the behavior is the same as calling clear_command_id().
release_command_id()MessageId *voidReleases the ownership of the field and returns the pointer of the MessageId object. After calling this, caller takes the ownership of the allocated MessageId object, has_command_id() will return false, and command_id() will return the default value.
flags()uint32voidReturns the current value of flags. If the flags is not set, returns 0.
set_flags()voiduint32Sets the value of flags. After calling this, flags() will return value.
clear_flags()voidvoidClears the value of flags. After calling this, flags() will return 0.
motor_cmd_size() constintvoidReturns the number of elements currently in the field.
motor_cmd() constconst MotorCommandint indexReturns the element at the given zero-based index. Calling this method with index outside of [0, motor_cmd_size()) yields undefined behavior.
mutable_motor_cmd()MotorCommand*int indexReturns a pointer to the mutable MotorCommand object that stores the value of the element at the given zero-based index. Calling this method with index outside of [0, motor_cmd_size()) yields undefined behavior.
add_motor_cmd()MotorCommand*voidAdds a new element and returns a pointer to it. The returned MotorCommand is mutable and will have none of its fields set (i.e. it will be identical to a newly-allocated MotorCommand).
clear_motor_cmd()voidvoidRemoves all elements from the field. After calling this, motor_cmd_size() will return zero.
motor_cmd() constconst RepeatedPtrField< MotorCommand>&voidReturns the underlying RepeatedPtrField that stores the field's elements. This container class provides STL-like iterators and other methods.
mutable_motor_cmd()RepeatedPtrField< MotorCommand>*voidReturns a pointer to the underlying mutable RepeatedPtrField that stores the field's elements. This container class provides STL-like iterators and other methods.

Parent topic: GripperCyclic (C++)