Logo
UNICENS V2.3.0-4567
User Manual and API Reference
Ucs_Return_t Ucs_Supv_SetMode ( Ucs_Inst_t self,
Ucs_Supv_Mode_t  mode 
)

Sets the Network Supervisor to a new operation mode.

Attention
Do not call this function within the context of a UNICENS callback function.
Parameters
selfThe UNICENS instance pointer.
modeThe new operation mode to be set.
Returns
Possible return values are shown in the table below.
Value Description
UCS_RET_SUCCESS No error
UCS_RET_ERR_PARAM - The parameter self is NULL.
- The transition to the new operation mode is not allowed, e.g. transition from Normal Operation Mode to Diagnosis Mode.
UCS_RET_ERR_NOT_INITIALIZED UNICENS is not initialized.
UCS_RET_ERR_NOT_SUPPORTED API is not supported in the current Network Supervisor Mode. The call is not allowed during the following Supervisor Modes:
- Diagnosis Mode
- Programming Mode
UCS_RET_ERR_ALREADY_SET The new operation mode is already set.
UCS_RET_API_LOCKED The transition is not allowed while mode UCS_SUPV_MODE_INACTIVE is in state UCS_SUPV_STATE_BUSY.
 See also Getting Started, section Network Supervisor.