Go to the source code of this file.
◆ SX_GENERATE_ENUM
| #define SX_GENERATE_ENUM |
( |
|
ENUM, |
|
|
|
STR |
|
) |
| ENUM, |
◆ FOREACH_SX_LIB_ADVISER_EVENT_TYPE
| #define FOREACH_SX_LIB_ADVISER_EVENT_TYPE |
( |
|
F | ) |
|
◆ SX_LIB_ADVISER_EVENT_TYPE_NUM
◆ SX_LIB_ADVISER_EVENT_TYPE_CHECK_RANGE
◆ sx_lib_adviser_event_type_e
◆ sx_lib_adviser_event_lag_changes_t
◆ sx_lib_adviser_event_port_added_deleted_t
◆ sx_lib_adviser_event_info_t
◆ sx_lib_adviser_cb_t
◆ sx_lib_adviser_event_registration_params_t
◆ sx_lib_adviser_init_params_t
◆ sx_lib_adviser_event_type
| Enumerator |
|---|
| SX_LIB_ADVISER_EVENT_NONE_E | |
| SX_LIB_ADVISER_PORT_ADDED_E | |
| SX_LIB_ADVISER_PORT_DELETED_E | |
| SX_LIB_ADVISER_PORT_ADDED_TO_LAG | |
| SX_LIB_ADVISER_PORT_DELETED_FROM_LAG | |
| SX_LIB_ADVISER_EVENT_TYPE_MIN_E | |
| SX_LIB_ADVISER_EVENT_TYPE_MAX_E | |
◆ sx_lib_adviser_init()
Initializes and sets the verbosity level of this module. This function should be called before any use of the library. The function initializes a host-ifc channel, registers for the supported events, and initializes a thread that will receive the events.
- Parameters
-
| [in] | init_params | – a structure that holds the init parameters |
- Returns
- SX_STATUS_SUCCESS if operation completes successfully
-
SX_STATUS_PARAM_ERROR if an input parameter is invalid
-
SX_STATUS_ERROR for a general error
◆ sx_lib_adviser_deinit()
| sx_status_t sx_lib_adviser_deinit |
( |
void |
| ) |
|
Deinitializes this module.
- Returns
- SX_STATUS_SUCCESS if operation completes successfully
-
SX_STATUS_ERROR for a general error
◆ sx_lib_adviser_event_register()
Registers a callback to an event. When such event occurs, the callback function provided will be triggered. In case of port related events, there is an option to exclude ports, by specifying the excluded ports in the provided parameters. Any number of callbacks can be registered.
- Parameters
-
| [in] | event_register_params | – relevant event parameters. |
- Returns
- SX_STATUS_SUCCESS if operation completes successfully
-
SX_STATUS_PARAM_ERROR if an input parameter is invalid
-
SX_STATUS_ERROR for a general error
◆ sx_lib_adviser_event_deregister()
Deregisters a callback from an event. The event type and callback must be specified in the given struct. The rest of the parameters inside the struct are ignored.
- Parameters
-
| [in] | event_register_params | – holds the event parameters. only event_type and callback should be set. |
- Returns
- SX_STATUS_SUCCESS if operation completes successfully
-
SX_STATUS_PARAM_ERROR if an input parameter is invalid
-
SX_STATUS_ERROR for a general error