Skip to content

Latest commit

 

History

History
41 lines (35 loc) · 4.15 KB

File metadata and controls

41 lines (35 loc) · 4.15 KB

class I2CWriteRegisterParameter

Member values

Member name Data type Description
device uint32 I2C device identification
device_address uint32 I2C device address
register_address uint32 I2C register address (8 or 16 bits)
register_address_size uint32 I2C register address size
timeout uint32 Request timeout in milliseconds
data I2CData Data to write

Member functions

Function name Return type Input type Description
device() const uint32 void Returns the current value of device. If the device is not set, returns 0.
set_device() void uint32 Sets the value of device. After calling this, device() will return value.
clear_device() void void Clears the value of device. After calling this, device() will return the empty string/empty bytes.
device_address() uint32 void Returns the current value of device_address. If the device_address is not set, returns 0.
set_device_address() void uint32 Sets the value of device_address. After calling this, device_address() will return value.
clear_device_address() void void Clears the value of device_address. After calling this, device_address() will return 0.
register_address() uint32 void Returns the current value of register_address. If the register_address is not set, returns 0.
set_register_address() void uint32 Sets the value of register_address. After calling this, register_address() will return value.
clear_register_address() void void Clears the value of register_address. After calling this, register_address() will return 0.
register_address_size() const uint32 void Returns the current value of register_address_size. If the register_address_size is not set, returns 0.
set_register_address_size() void uint32 Sets the value of register_address_size. After calling this, register_address_size() will return value.
clear_register_address_size() void void Clears the value of register_address_size. After calling this, register_address_size() will return the empty string/empty bytes.
timeout() uint32 void Returns the current value of timeout. If the timeout is not set, returns 0.
set_timeout() void uint32 Sets the value of timeout. After calling this, timeout() will return value.
clear_timeout() void void Clears the value of timeout. After calling this, timeout() will return 0.
has_data() const bool void Returns true if data is set.
data() const I2CData& void Returns 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 * void Returns 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() void void Clears the value of the field. After calling this, has_data() will return false and data() will return the default value.
set_allocated_data() void I2CData * 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 * void Releases 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++)