class CartesianTrajectoryConstraint

February 26, 2020 ยท View on GitHub

Member values

Member nameData typeDescription
speedoneof:type CartesianSpeedSpeed constraint
durationoneof:type float32Duration constraint (in seconds) (not implemented yet)

Member functions

Function nameReturn typeInput typeDescription
has_speed() constvoidvoidReturns the current value of the field if oneof case is kSpeed. Otherwise, returns oneof:type CartesianSpeed::default_instance()
speed() constconst oneof:type CartesianSpeed&voidReturns the current value of the field if oneof case is kSpeed
mutable_speed()oneof:type CartesianSpeed*voidIf any other oneof field in the same oneof is set, calls clear_type(). Sets the oneof case to kSpeed and returns a pointer to the mutable oneof:type CartesianSpeed object that stores the field's value. If the oneof case was not kSpeed prior to the call, then the returned oneof:type CartesianSpeed will have none of its fields set (i.e. it will be identical to a newly-allocated oneof:type CartesianSpeed). After calling this, has_speed() will return true, speed() will return a reference to the same instance of oneof:type CartesianSpeed and type_case() will return kSpeed
clear_speed()voidvoidNothing will be changed if the oneof case is not kSpeed. If the oneof case equals kSpeed, frees the field and clears the oneof case. has_speed() will return false, speed() will return the default value and type_case() will return TYPE_NOT_SET.
set_allocated_speed()voidoneof:type CartesianSpeed*Calls clear_type(). If the oneof:type CartesianSpeed pointer is not NULL: Sets the oneof:type CartesianSpeed object to the field and sets the oneof case to kSpeed. The message takes ownership of the allocated oneof:type CartesianSpeed object, has_speed() will return true and type_case() will return kSpeed. If the pointer is NULL, has_speed() will return false and type_case() will return TYPE_NOT_SET. (The behavior is like calling clear_type())
release_speed()oneof:type CartesianSpeed*voidReturns NULL if oneof case is not kSpeed. If the oneof case is kSpeed, clears the oneof case, releases the ownership of the field and returns the pointer of the type object. After calling this, caller takes the ownership of the allocated type object, has_speed() will return false, speed() will return the default value and type_case() will return TYPE_NOT_SET.
set_duration()voidoneof:type float32If any other oneof field in the same oneof is set, calls clear_type(). Sets the value of this field and sets the oneof case to kDuration.
duration() constoneof:type float32voidReturns the current value of the field if oneof case is kDuration. Otherwise, returns the default value.
clear_duration()voidvoidNothing will be changed if the oneof case is not kDuration. If the oneof case is kDuration, clears the value of the field and the oneof case

Parent topic: Base (C++)