class FirmwareComponentVersion

February 26, 2020 ยท View on GitHub

Member values

Member nameData typeDescription
namestringName of the component
versionstringVersion of the component
device_iduint32Device id of the component

Member functions

Function nameReturn typeInput typeDescription
name()const string&voidReturns the current value of name. If name is not set, returns the empty string/empty bytes.
set_name()voidconst string&Sets the value of name. After calling this, name() will return a copy of value.
set_name()voidstring&&(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()voidconst 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 *voidReturns 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()voidvoidClears the value of name. After calling this, name() will return the empty string/empty bytes.
set_allocated_name()voidstring*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 *voidReleases 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.
version()const string&voidReturns the current value of version. If version is not set, returns the empty string/empty bytes.
set_version()voidconst string&Sets the value of version. After calling this, version() will return a copy of value.
set_version()voidstring&&(C++11 and beyond): Sets the value of version, moving from the passed string. After calling this, version() will return a copy of value.
set_version()voidconst char*Sets the value of version using a C-style null-terminated string. After calling this, version() will return a copy of value.
mutable_version()string *voidReturns a pointer to the mutable string object that stores version's value. If the field was not set prior to the call, then the returned string will be empty. After calling this, version() will return whatever value is written into the given string.
clear_version()voidvoidClears the value of version. After calling this, version() will return the empty string/empty bytes.
set_allocated_version()voidstring*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_version().
release_version()string *voidReleases the ownership of version and returns the pointer of the string object. After calling this, caller takes the ownership of the allocated string object and version() will return the empty string/empty bytes.
device_id()uint32voidReturns the current value of device_id. If the device_id is not set, returns 0.
set_device_id()voiduint32Sets the value of device_id. After calling this, device_id() will return value.
clear_device_id()voidvoidClears the value of device_id. After calling this, device_id() will return 0.

Parent topic: Base (C++)