class I2CData

August 13, 2019 ยท View on GitHub

Member values

Member nameData typeDescription
datauint8[]Data byte(s) array (max 128 bytes)
sizeuint32Data byte(s) array size

Member functions

Function nameReturn typeInput typeDescription
data()const string&voidReturns the current value of data. If data is not set, returns the empty string/empty bytes.
set_data()voidconst string&Sets the value of data. After calling this, data() will return a copy of value.
set_data()voidstring&&(C++11 and beyond): Sets the value of data, moving from the passed string. After calling this, data() will return a copy of value.
set_data()voidconst char*Sets the value of data using a C-style null-terminated string. After calling this, data() will return a copy of value.
mutable_data()string *voidReturns a pointer to the mutable string object that stores data's value. If the field was not set prior to the call, then the returned string will be empty. After calling this, data() will return whatever value is written into the given string.
clear_data()voidvoidClears the value of data. After calling this, data() will return the empty string/empty bytes.
set_allocated_data()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_data().
release_data()string *voidReleases the ownership of data and returns the pointer of the string object. After calling this, caller takes the ownership of the allocated string object and data() will return the empty string/empty bytes.
size()uint32voidReturns the current value of size. If the size is not set, returns 0.
set_size()voiduint32Sets the value of size. After calling this, size() will return value.
clear_size()voidvoidClears the value of size. After calling this, size() will return 0.

Parent topic: InterconnectConfig (C++)