EmSACAN_IsConfigurationLocked
Prototype
emsacan_result_t EmSACAN_IsConfigurationLocked(
emsacan_handle_t Handle,
uint8_t ChannelNumber,
int *pLocked );
Description
Reports whether channel configuration is locked for the given port.
Parameters
| Parameter | Direction | Type | Description |
|---|---|---|---|
Handle | in | emsacan_handle_t | Session handle from EmSACAN_Connect. |
ChannelNumber | in | uint8_t | Zero-based port index. |
pLocked | out | int | On success, set to 0 (false) or 1 (true). Configuration is locked when this client cannot apply SET_CHANNEL_CONFIG for the port: the channel is configured and this handle is not the sole connected client on that channel (CDNet-mediated mode only). |
Return value
EMSACAN_OK on success, or another emsacan_result_t code on failure.
Example
int locked = 0;
if (EmSACAN_IsConfigurationLocked(handle, 0, &locked) == EMSACAN_OK)
{
if (locked)
{ /* read existing config instead of writing */ }
}
