Skip to content

Latest commit

 

History

History
29 lines (23 loc) · 2.84 KB

TwistCommand.md

File metadata and controls

29 lines (23 loc) · 2.84 KB

class TwistCommand

Member values

Member name Data type Description
reference_frame uint32 The reference frame used for the twist command
twist Twist Twist value
duration uint32 Duration constrant. If not 0, allows to set a limit (in milliseconds) to the TwistCommand (not implemented yet)

Member functions

Function name Return type Input type Description
reference_frame() const uint32 void Returns the current value of reference_frame. If the reference_frame is not set, returns 0.
set_reference_frame() void uint32 Sets the value of reference_frame. After calling this, reference_frame() will return value.
clear_reference_frame() void void Clears the value of reference_frame. After calling this, reference_frame() will return the empty string/empty bytes.
has_twist() const bool void Returns true if twist is set.
twist() const Twist& void Returns the current value of twist. If twist is not set, returns a Twist with none of its fields set (possibly twist::default_instance()).
mutable_twist() Twist * void Returns a pointer to the mutable Twist object that stores the field's value. If the field was not set prior to the call, then the returned Twist will have none of its fields set (i.e. it will be identical to a newly-allocated Twist). After calling this, has_twist() will return true and twist() will return a reference to the same instance of Twist.
clear_twist() void void Clears the value of the field. After calling this, has_twist() will return false and twist() will return the default value.
set_allocated_twist() void Twist * Sets the Twist object to the field and frees the previous field value if it exists. If the Twist pointer is not NULL, the message takes ownership of the allocated Twist object and has_ Twist() will return true. Otherwise, if the twist is NULL, the behavior is the same as calling clear_twist().
release_twist() Twist * void Releases the ownership of the field and returns the pointer of the Twist object. After calling this, caller takes the ownership of the allocated Twist object, has_twist() will return false, and twist() will return the default value.
duration() uint32 void Returns the current value of duration. If the duration is not set, returns 0.
set_duration() void uint32 Sets the value of duration. After calling this, duration() will return value.
clear_duration() void void Clears the value of duration. After calling this, duration() will return 0.

Parent topic: Base (C++)