Skip to content

Latest commit

 

History

History
32 lines (26 loc) · 5.46 KB

File metadata and controls

32 lines (26 loc) · 5.46 KB

class Command

Member values

Member name Data type Description
command_id MessageId MessageId
flags uint32 Flags
gripper_command oneof:tool_command Command Gripper command

Member functions

Function name Return type Input type Description
has_command_id() const bool void Returns true if command_id is set.
command_id() const MessageId& void Returns 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 * void Returns 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() void void Clears 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() void MessageId * 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 * void Releases 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() uint32 void Returns the current value of flags. If the flags is not set, returns 0.
set_flags() void uint32 Sets the value of flags. After calling this, flags() will return value.
clear_flags() void void Clears the value of flags. After calling this, flags() will return 0.
has_gripper_command() const void void Returns the current value of the field if oneof case is kGripper_command. Otherwise, returns oneof:tool_command Command::default_instance()
gripper_command() const const oneof:tool_command Command& void Returns the current value of the field if oneof case is kGripper_command
mutable_gripper_command() oneof:tool_command Command* void If any other oneof field in the same oneof is set, calls clear_tool_command(). Sets the oneof case to kGripper_command and returns a pointer to the mutable oneof:tool_command Command object that stores the field's value. If the oneof case was not kGripper_command prior to the call, then the returned oneof:tool_command Command will have none of its fields set (i.e. it will be identical to a newly-allocated oneof:tool_command Command). After calling this, has_gripper_command() will return true, gripper_command() will return a reference to the same instance of oneof:tool_command Command and tool_command_case() will return kGripper_command
clear_gripper_command() void void Nothing will be changed if the oneof case is not kGripper_command. If the oneof case equals kGripper_command, frees the field and clears the oneof case. has_gripper_command() will return false, gripper_command() will return the default value and tool_command_case() will return TOOL_COMMAND_NOT_SET.
set_allocated_gripper_command() void oneof:tool_command Command* Calls clear_tool_command(). If the oneof:tool_command Command pointer is not NULL: Sets the oneof:tool_command Command object to the field and sets the oneof case to kGripper_command. The message takes ownership of the allocated oneof:tool_command Command object, has_gripper_command() will return true and tool_command_case() will return kGripper_command. If the pointer is NULL, has_gripper_command() will return false and tool_command_case() will return TOOL_COMMAND_NOT_SET. (The behavior is like calling clear_tool_command())
release_gripper_command() oneof:tool_command Command* void Returns NULL if oneof case is not kGripper_command. If the oneof case is kGripper_command, clears the oneof case, releases the ownership of the field and returns the pointer of the tool_command object. After calling this, caller takes the ownership of the allocated tool_command object, has_gripper_command() will return false, gripper_command() will return the default value and tool_command_case() will return TOOL_COMMAND_NOT_SET.

Parent topic: InterconnectCyclic (C++)