Go to the source code of this file.
|
| sx_status_t | sx_api_system_log_verbosity_level_set (const sx_api_handle_t handle, const sx_log_verbosity_target_t verbosity_target, const sx_verbosity_level_t module_verbosity_level, const sx_verbosity_level_t api_verbosity_level) |
| |
| sx_status_t | sx_api_system_log_verbosity_level_get (const sx_api_handle_t handle, const sx_log_verbosity_target_t verbosity_target, sx_verbosity_level_t *module_verbosity_level_p, sx_verbosity_level_t *api_verbosity_level_p) |
| |
| sx_status_t | sx_api_system_log_enter_func_severity_set (const sx_api_handle_t handle, const sx_log_verbosity_target_attr_t *attr_p) |
| |
| sx_status_t | sx_api_system_log_enter_func_severity_get (const sx_api_handle_t handle, sx_log_verbosity_target_attr_t *attr_p) |
| |
| sx_status_t | sx_api_open (sx_log_cb_t logging_cb, sx_api_handle_t *handle) |
| |
| sx_status_t | sx_api_close (sx_api_handle_t *handle) |
| |
| sx_status_t | sx_api_sdk_init_set (const sx_api_handle_t handle, const sx_api_sx_sdk_init_t *sdk_init_params_p) |
| |
| sx_status_t | sx_api_sx_sdk_version_get (const sx_api_handle_t handle, sx_api_sx_sdk_versions_t *versions_p) |
| |
| sx_status_t | sx_api_transaction_mode_set (const sx_api_handle_t handle, const sx_access_cmd_t cmd) |
| |
| sx_status_t | sx_api_object_refcount_get (const sx_api_handle_t handle, const sx_object_id_t *object_id_p, uint32_t *refcount_p) |
| |
◆ sx_api_system_log_verbosity_level_set()
| sx_status_t sx_api_system_log_verbosity_level_set |
( |
const sx_api_handle_t |
handle, |
|
|
const sx_log_verbosity_target_t |
verbosity_target, |
|
|
const sx_verbosity_level_t |
module_verbosity_level, |
|
|
const sx_verbosity_level_t |
api_verbosity_level |
|
) |
| |
This function sets the log verbosity level of all modules in SwitchX SDK Supported devices: SwitchX, SwitchX2, Spectrum, Spectrum2.
- Parameters
-
| [in] | handle | - SX-API handle |
| [in] | verbosity_target | - set verbosity of : API / MODULE / BOTH |
| [in] | module_verbosity_level | - SwitchX SDK modules verbosity level |
| [in] | api_verbosity_level | - SwitchX SDK API verbosity level |
- Returns
- SX_STATUS_SUCCESS if operation completes successfully SX_STATUS_PARAM_ERROR if any input parameters is invalid SX_STATUS_ERROR general error
◆ sx_api_system_log_verbosity_level_get()
| sx_status_t sx_api_system_log_verbosity_level_get |
( |
const sx_api_handle_t |
handle, |
|
|
const sx_log_verbosity_target_t |
verbosity_target, |
|
|
sx_verbosity_level_t * |
module_verbosity_level_p, |
|
|
sx_verbosity_level_t * |
api_verbosity_level_p |
|
) |
| |
This function gets the log verbosity level of all modules in SwitchX SDK Supported devices: SwitchX, SwitchX2, Spectrum, Spectrum2.
- Parameters
-
| [in] | handle | - SX-API handle |
| [in] | verbosity_target | - get verbosity of : API / MODULE / BOTH |
| [out] | module_verbosity_level_p | - SwitchX SDK modules verbosity level |
| [out] | api_verbosity_level_p | - SwitchX SDK API verbosity level |
- Returns
- SX_STATUS_SUCCESS if operation completes successfully SX_STATUS_PARAM_ERROR if any input parameters is invalid SX_STATUS_ERROR general error
◆ sx_api_system_log_enter_func_severity_set()
| sx_status_t sx_api_system_log_enter_func_severity_set |
( |
const sx_api_handle_t |
handle, |
|
|
const sx_log_verbosity_target_attr_t * |
attr_p |
|
) |
| |
This API allows to enable/disable function enter/leave debugging log messages. Supported devices: Spectrum, Spectrum2.
- Parameters
-
| [in] | handle | - SX-API handle |
| [in] | attr_p | - target verbosity attributes such as verbosity target API or MODULE and flag whether we want to enable/disable function enter/leave logs for this target. |
- Returns
- SX_STATUS_SUCCESS if operation completes successfully
-
SX_STATUS_PARAM_NULL if parameter is NULL.
-
SX_STATUS_PARAM_ERROR if any input parameters is invalid
-
SX_STATUS_ERROR general error
◆ sx_api_system_log_enter_func_severity_get()
| sx_status_t sx_api_system_log_enter_func_severity_get |
( |
const sx_api_handle_t |
handle, |
|
|
sx_log_verbosity_target_attr_t * |
attr_p |
|
) |
| |
This API gets the configured state for the function enter/leave debugging log messages. Supported devices: Spectrum, Spectrum2.
- Parameters
-
| [in] | handle | - SX-API handle |
| [in,out] | attr_p | - target verbosity attributes such as verbosity target API or MODULE and flag which indicates whether function enter/leave logs are enabled/disabled for this target. |
- Returns
- SX_STATUS_SUCCESS if operation completes successfully
-
SX_STATUS_PARAM_NULL if parameter is NULL.
-
SX_STATUS_PARAM_ERROR if any input parameters is invalid
-
SX_STATUS_ERROR general error
◆ sx_api_open()
| sx_status_t sx_api_open |
( |
sx_log_cb_t |
logging_cb, |
|
|
sx_api_handle_t * |
handle |
|
) |
| |
This function opens channel to SX-API operations. Supported devices: SwitchX, SwitchX2, Spectrum, Spectrum2.
- Parameters
-
| [in] | logging_cb | - optional log messages callback |
| [out] | handle | - handle that should be used in all further SX-API operations. Invalid handle (0) returned in case of an error. |
- Returns
- sx_status_t:
-
SX_STATUS_SUCCESS - Operation completes successfully
-
SX_STATUS_PARAM_ERROR - Input parameters error
-
SX_STATUS_NO_MEMORY - Memory allocation failed
-
SX_STATUS_COMM_ERROR - client communication channel open failed
-
SX_STATUS_ERROR - open SX-API client mutex failed
◆ sx_api_close()
| sx_status_t sx_api_close |
( |
sx_api_handle_t * |
handle | ) |
|
This function closes channel to SX-API operations. Supported devices: SwitchX, SwitchX2, Spectrum, Spectrum2.
- Parameters
-
| [in] | handle | - SX-API handle. |
- Returns
- sx_status_t:
-
SX_STATUS_SUCCESS - Operation completes successfully
-
SX_STATUS_PARAM_ERROR - Input parameters error - NULL handle
-
SX_STATUS_COMM_ERROR - Input parameters error - Invalid handle
◆ sx_api_sdk_init_set()
| sx_status_t sx_api_sdk_init_set |
( |
const sx_api_handle_t |
handle, |
|
|
const sx_api_sx_sdk_init_t * |
sdk_init_params_p |
|
) |
| |
This function initializes SwitchX SDK. Supported devices: SwitchX, SwitchX2, Spectrum, Spectrum2.
- Parameters
-
| [in] | handle | - SX-API handle |
| [in] | sdk_init_params_p | - SwitchX SDK init parameters. |
- Returns
- sx_status_t:
-
SX_STATUS_SUCCESS - Operation completes successfully
-
SX_STATUS_INVALID_HANDLE - Input parameters error - Invalid handle
-
SX_STATUS_COMM_ERROR - Communication channel message Send/Receive error
-
SX_STATUS_PARAM_ERROR - no SWID was defined
◆ sx_api_sx_sdk_version_get()
| sx_status_t sx_api_sx_sdk_version_get |
( |
const sx_api_handle_t |
handle, |
|
|
sx_api_sx_sdk_versions_t * |
versions_p |
|
) |
| |
This function returns the versions of the various components of SwitchX SDK package. Supported devices: SwitchX, SwitchX2, Spectrum, Spectrum2.
- Parameters
-
| [in] | handle | - SX-API handle. |
| [out] | versions_p | - SwitchX SDK versions. |
- Returns
- sx_status_t:
-
SX_STATUS_SUCCESS - Operation completes successfully
-
SX_STATUS_PARAM_ERROR - Input parameters error
-
SX_STATUS_COMM_ERROR - Communication channel message send/ Receive error
◆ sx_api_transaction_mode_set()
| sx_status_t sx_api_transaction_mode_set |
( |
const sx_api_handle_t |
handle, |
|
|
const sx_access_cmd_t |
cmd |
|
) |
| |
This function is used to enter/exit transaction burst mode. Supported devices: Spectrum, Spectrum2.
- Parameters
-
| [in] | handle | - SX-API handle |
| [in] | cmd | - ENABLE /DISABLE |
- Returns
- SX_STATUS_SUCCESS if operation completes successfully
-
SX_STATUS_PARAM_ERROR if any input parameter is invalid
-
SX_STATUS_ERROR if unexpected behaviour occurs
-
SX_STATUS_INVALID_HANDLE if handle is invalid
◆ sx_api_object_refcount_get()
| sx_status_t sx_api_object_refcount_get |
( |
const sx_api_handle_t |
handle, |
|
|
const sx_object_id_t * |
object_id_p, |
|
|
uint32_t * |
refcount_p |
|
) |
| |
This API is used to get the reference count of an SDK object.
Supported devices: Spectrum, Spectrum-A1, Spectrum2.
- Parameters
-
| [in] | handle | - SX-API handle |
| [in] | object_id_p | - Object ID |
| [out] | refcount_p | - reference count of object |
- Returns
- SX_STATUS_SUCCESS if operation completes successfully.
-
SX_STATUS_PARAM_NULL if parameter is NULL.
-
SX_STATUS_PARAM_ERROR if any input parameter is invalid.
-
SX_STATUS_ENTRY_NOT_FOUND if router object isn't found.
-
SX_STATUS_ERROR if a general error occurs.