Member values
| Member name | Data type | Description |
|---|---|---|
| safety_event | oneof:events SafetyEvent | Mapped safety event (not implemented yet) |
| gpio_event | oneof:events GpioEvent | Mapped GPIO event |
| controller_event | oneof:events ControllerEvent | Mapped controller event |
| name | string | Map event friendly name |
Member functions
| Function name | Return type | Input type | Description |
|---|---|---|---|
| has_safety_event() const | void | void | Returns the current value of the field if oneof case is kSafety_event. Otherwise, returns oneof:events SafetyEvent::default_instance() |
| safety_event() const | const oneof:events SafetyEvent& | void | Returns the current value of the field if oneof case is kSafety_event |
| mutable_safety_event() | oneof:events SafetyEvent* | void | If any other oneof field in the same oneof is set, calls clear_events(). Sets the oneof case to kSafety_event and returns a pointer to the mutable oneof:events SafetyEvent object that stores the field's value. If the oneof case was not kSafety_event prior to the call, then the returned oneof:events SafetyEvent will have none of its fields set (i.e. it will be identical to a newly-allocated oneof:events SafetyEvent). After calling this, has_safety_event() will return true, safety_event() will return a reference to the same instance of oneof:events SafetyEvent and events_case() will return kSafety_event |
| clear_safety_event() | void | void | Nothing will be changed if the oneof case is not kSafety_event. If the oneof case equals kSafety_event, frees the field and clears the oneof case. has_safety_event() will return false, safety_event() will return the default value and events_case() will return EVENTS_NOT_SET. |
| set_allocated_safety_event() | void | oneof:events SafetyEvent* | Calls clear_events(). If the oneof:events SafetyEvent pointer is not NULL: Sets the oneof:events SafetyEvent object to the field and sets the oneof case to kSafety_event. The message takes ownership of the allocated oneof:events SafetyEvent object, has_safety_event() will return true and events_case() will return kSafety_event. If the pointer is NULL, has_safety_event() will return false and events_case() will return EVENTS_NOT_SET. (The behavior is like calling clear_events()) |
| release_safety_event() | oneof:events SafetyEvent* | void | Returns NULL if oneof case is not kSafety_event. If the oneof case is kSafety_event, clears the oneof case, releases the ownership of the field and returns the pointer of the events object. After calling this, caller takes the ownership of the allocated events object, has_safety_event() will return false, safety_event() will return the default value and events_case() will return EVENTS_NOT_SET. |
| has_gpio_event() const | void | void | Returns the current value of the field if oneof case is kGpio_event. Otherwise, returns oneof:events GpioEvent::default_instance() |
| gpio_event() const | const oneof:events GpioEvent& | void | Returns the current value of the field if oneof case is kGpio_event |
| mutable_gpio_event() | oneof:events GpioEvent* | void | If any other oneof field in the same oneof is set, calls clear_events(). Sets the oneof case to kGpio_event and returns a pointer to the mutable oneof:events GpioEvent object that stores the field's value. If the oneof case was not kGpio_event prior to the call, then the returned oneof:events GpioEvent will have none of its fields set (i.e. it will be identical to a newly-allocated oneof:events GpioEvent). After calling this, has_gpio_event() will return true, gpio_event() will return a reference to the same instance of oneof:events GpioEvent and events_case() will return kGpio_event |
| clear_gpio_event() | void | void | Nothing will be changed if the oneof case is not kGpio_event. If the oneof case equals kGpio_event, frees the field and clears the oneof case. has_gpio_event() will return false, gpio_event() will return the default value and events_case() will return EVENTS_NOT_SET. |
| set_allocated_gpio_event() | void | oneof:events GpioEvent* | Calls clear_events(). If the oneof:events GpioEvent pointer is not NULL: Sets the oneof:events GpioEvent object to the field and sets the oneof case to kGpio_event. The message takes ownership of the allocated oneof:events GpioEvent object, has_gpio_event() will return true and events_case() will return kGpio_event. If the pointer is NULL, has_gpio_event() will return false and events_case() will return EVENTS_NOT_SET. (The behavior is like calling clear_events()) |
| release_gpio_event() | oneof:events GpioEvent* | void | Returns NULL if oneof case is not kGpio_event. If the oneof case is kGpio_event, clears the oneof case, releases the ownership of the field and returns the pointer of the events object. After calling this, caller takes the ownership of the allocated events object, has_gpio_event() will return false, gpio_event() will return the default value and events_case() will return EVENTS_NOT_SET. |
| has_controller_event() const | void | void | Returns the current value of the field if oneof case is kController_event. Otherwise, returns oneof:events ControllerEvent::default_instance() |
| controller_event() const | const oneof:events ControllerEvent& | void | Returns the current value of the field if oneof case is kController_event |
| mutable_controller_event() | oneof:events ControllerEvent* | void | If any other oneof field in the same oneof is set, calls clear_events(). Sets the oneof case to kController_event and returns a pointer to the mutable oneof:events ControllerEvent object that stores the field's value. If the oneof case was not kController_event prior to the call, then the returned oneof:events ControllerEvent will have none of its fields set (i.e. it will be identical to a newly-allocated oneof:events ControllerEvent). After calling this, has_controller_event() will return true, controller_event() will return a reference to the same instance of oneof:events ControllerEvent and events_case() will return kController_event |
| clear_controller_event() | void | void | Nothing will be changed if the oneof case is not kController_event. If the oneof case equals kController_event, frees the field and clears the oneof case. has_controller_event() will return false, controller_event() will return the default value and events_case() will return EVENTS_NOT_SET. |
| set_allocated_controller_event() | void | oneof:events ControllerEvent* | Calls clear_events(). If the oneof:events ControllerEvent pointer is not NULL: Sets the oneof:events ControllerEvent object to the field and sets the oneof case to kController_event. The message takes ownership of the allocated oneof:events ControllerEvent object, has_controller_event() will return true and events_case() will return kController_event. If the pointer is NULL, has_controller_event() will return false and events_case() will return EVENTS_NOT_SET. (The behavior is like calling clear_events()) |
| release_controller_event() | oneof:events ControllerEvent* | void | Returns NULL if oneof case is not kController_event. If the oneof case is kController_event, clears the oneof case, releases the ownership of the field and returns the pointer of the events object. After calling this, caller takes the ownership of the allocated events object, has_controller_event() will return false, controller_event() will return the default value and events_case() will return EVENTS_NOT_SET. |
| name() | const string& | void | Returns the current value of name. If name is not set, returns the empty string/empty bytes. |
| set_name() | void | const string& | Sets the value of name. After calling this, name() will return a copy of value. |
| set_name() | void | string&& | (C++11 and beyond): Sets the value of name, moving from the passed string. After calling this, name() will return a copy of value. |
| set_name() | void | const char* | Sets the value of name using a C-style null-terminated string. After calling this, name() will return a copy of value. |
| mutable_name() | string * | void | Returns a pointer to the mutable string object that stores name's value. If the field was not set prior to the call, then the returned string will be empty. After calling this, name() will return whatever value is written into the given string. |
| clear_name() | void | void | Clears the value of name. After calling this, name() will return the empty string/empty bytes. |
| set_allocated_name() | void | string* | Sets the string object to the field and frees the previous field value if it exists. If the string pointer is not NULL, the message takes ownership of the allocated string object. The message is free to delete the allocated string object at any time, so references to the object may be invalidated. Otherwise, if the value is NULL, the behavior is the same as calling clear_name(). |
| release_name() | string * | void | Releases the ownership of name and returns the pointer of the string object. After calling this, caller takes the ownership of the allocated string object and name() will return the empty string/empty bytes. |
Parent topic: Base (C++)