class I2CWriteParameter

August 13, 2019 ยท View on GitHub

Member values

Member nameData typeDescription
deviceuint32I2C device identification
device_addressuint32I2C device address
timeoutuint32Request timeout in milliseconds
dataI2CDataData to write

Member functions

Function nameReturn typeInput typeDescription
device() constuint32voidReturns the current value of device. If the device is not set, returns 0.
set_device()voiduint32Sets the value of device. After calling this, device() will return value.
clear_device()voidvoidClears the value of device. After calling this, device() will return the empty string/empty bytes.
device_address()uint32voidReturns the current value of device_address. If the device_address is not set, returns 0.
set_device_address()voiduint32Sets the value of device_address. After calling this, device_address() will return value.
clear_device_address()voidvoidClears the value of device_address. After calling this, device_address() will return 0.
timeout()uint32voidReturns the current value of timeout. If the timeout is not set, returns 0.
set_timeout()voiduint32Sets the value of timeout. After calling this, timeout() will return value.
clear_timeout()voidvoidClears the value of timeout. After calling this, timeout() will return 0.
has_data() constboolvoidReturns true if data is set.
data()const I2CData&voidReturns the current value of data. If data is not set, returns a I2CData with none of its fields set (possibly data::default_instance()).
mutable_data()I2CData *voidReturns a pointer to the mutable I2CData object that stores the field's value. If the field was not set prior to the call, then the returned I2CData will have none of its fields set (i.e. it will be identical to a newly-allocated I2CData). After calling this, has_data() will return true and data() will return a reference to the same instance of I2CData.
clear_data()voidvoidClears the value of the field. After calling this, has_data() will return false and data() will return the default value.
set_allocated_data()voidI2CData *Sets the I2CData object to the field and frees the previous field value if it exists. If the I2CData pointer is not NULL, the message takes ownership of the allocated I2CData object and has_ I2CData() will return true. Otherwise, if the data is NULL, the behavior is the same as calling clear_data().
release_data()I2CData *voidReleases the ownership of the field and returns the pointer of the I2CData object. After calling this, caller takes the ownership of the allocated I2CData object, has_data() will return false, and data() will return the default value.

Parent topic: InterconnectConfig (C++)