pub struct RgbLedBricklet { /* fields omitted */ }
Creates an object with the unique device ID uid
. This object can then be used after the IP Connection ip_connection
is connected.
Returns the response expected flag for the function specified by the function ID parameter.
It is true if the function is expected to send a response, false otherwise.
For getter functions this is enabled by default and cannot be disabled, because those
functions will always send a response. For callback configuration functions it is enabled
by default too, but can be disabled by set_response_expected
.
For setter functions it is disabled by default and can be enabled.
Enabling the response expected flag for a setter function allows to detect timeouts
and other error conditions calls of this setter as well. The device will then send a response
for this purpose. If this flag is disabled for a setter function then no response is send
and errors are silently ignored, because they cannot be detected.
See set_response_expected
for the list of function ID constants available for this function.
Changes the response expected flag of the function specified by the function ID parameter.
This flag can only be changed for setter (default value: false) and callback configuration
functions (default value: true). For getter functions it is always enabled.
Enabling the response expected flag for a setter function allows to detect timeouts and
other error conditions calls of this setter as well. The device will then send a response
for this purpose. If this flag is disabled for a setter function then no response is send
and errors are silently ignored, because they cannot be detected.
Changes the response expected flag for all setter and callback configuration functions of this device at once.
Returns the version of the API definition (major, minor, revision) implemented by this API bindings.
This is neither the release version of this API bindings nor does it tell you anything about the represented Brick or Bricklet.
Sets the rgb value for the LED. The value can be between 0 and 255.
Returns the UID, the UID where the Bricklet is connected to,
the position, the hardware and firmware version as well as the
device identifier.
The position can be 'a', 'b', 'c' or 'd'.
The device identifier numbers can be found here.
|device_identifier_constant|
Performs copy-assignment from source
. Read more
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static