![]() |
Synergy Software Package User's Manual
|
RTOS-integrated Communications Framework NetX telnet server implementation. More...
Data Structures | |
| struct | sf_comms_telnet_instance_ctrl_t |
| struct | sf_comms_telnet_cfg_t |
Macros | |
| #define | SF_COMMS_TELNET_OPEN (0x434D544EU) |
Functions | |
| ssp_err_t | SF_COMMS_TELNET_Open (sf_comms_ctrl_t *const p_api_ctrl, sf_comms_cfg_t const *const p_cfg) |
| Initializes the Telnet server and other operating system resources. More... | |
| ssp_err_t | SF_COMMS_TELNET_Close (sf_comms_ctrl_t *const p_api_ctrl) |
| Disconnect Telnet server and clean up resources. More... | |
| ssp_err_t | SF_COMMS_TELNET_Read (sf_comms_ctrl_t *const p_api_ctrl, uint8_t *const p_dest, uint32_t const bytes, UINT const timeout) |
| Read data from the Telnet comms connection. More... | |
| ssp_err_t | SF_COMMS_TELNET_Write (sf_comms_ctrl_t *const p_api_ctrl, uint8_t const *const p_src, uint32_t const bytes, UINT const timeout) |
| Write data to the Telnet comms connection. More... | |
| ssp_err_t | SF_COMMS_TELNET_Lock (sf_comms_ctrl_t *const p_api_ctrl, sf_comms_lock_t lock_type, UINT timeout) |
| Acquire lock type for the Telnet comms instance. More... | |
| ssp_err_t | SF_COMMS_TELNET_Unlock (sf_comms_ctrl_t *const p_api_ctrl, sf_comms_lock_t lock_type) |
| Release lock type for the Telnet comms instance. More... | |
| ssp_err_t | SF_COMMS_TELNET_VersionGet (ssp_version_t *const p_version) |
| Get driver version. More... | |
RTOS-integrated Communications Framework NetX telnet server implementation.
| #define SF_COMMS_TELNET_OPEN (0x434D544EU) |
"CMTN" in ASCII, used to identify general timer handle
| ssp_err_t SF_COMMS_TELNET_Close | ( | sf_comms_ctrl_t *const | p_api_ctrl | ) |
Disconnect Telnet server and clean up resources.
| SSP_SUCCESS | Connection successfully closed |
| SSP_ERR_ASSERTION | Parameter check failed for one of the following:
|
| SSP_ERR_NOT_OPEN | Connection is not open |
Check if connection is open
Update connection record.
Return connection not open if no record found
Stop and release Telnet server and ThreadX resources for this connection
Mark this connection uninitialized.
| ssp_err_t SF_COMMS_TELNET_Lock | ( | sf_comms_ctrl_t *const | p_api_ctrl, |
| sf_comms_lock_t | lock_type, | ||
| UINT | timeout | ||
| ) |
Acquire lock type for the Telnet comms instance.
| SSP_SUCCESS | Acquired requested lock on given connection. |
| SSP_ERR_ASSERTION | Pointer p_api_ctrl is NULL. |
| SSP_ERR_NOT_OPEN | Connection is not open. |
| SSP_ERR_TIMEOUT | Acquiring requested lock timed-out. |
Check if connection is open
Get both lock if requested
Else get the lock type requested
| ssp_err_t SF_COMMS_TELNET_Open | ( | sf_comms_ctrl_t *const | p_api_ctrl, |
| sf_comms_cfg_t const *const | p_cfg | ||
| ) |
Initializes the Telnet server and other operating system resources.
| SSP_SUCCESS | comms Telnet instance opened successfully. |
| SSP_ERR_IN_USE | comms Telnet maximum connection limit reached. |
| SSP_ERR_ALREADY_OPEN | comms Telnet instance already open. |
| SSP_ERR_ASSERTION | Parameter check failed for one of the following:
|
| SSP_ERR_INTERNAL | An internal ThreadX Or NetX error has occurred. This is typically a failure to create/use thread mutex or failure create/enable an internal thread/feature for NetX service. |
Initialize and start Telnet server and ThreadX resources for this connection
Mark this connection initialized.
| ssp_err_t SF_COMMS_TELNET_Read | ( | sf_comms_ctrl_t *const | p_api_ctrl, |
| uint8_t *const | p_dest, | ||
| uint32_t const | bytes, | ||
| UINT const | timeout | ||
| ) |
Read data from the Telnet comms connection.
| SSP_SUCCESS | Data reception ends successfully. |
| SSP_ERR_ASSERTION | One of the following invalid parameter passed.
|
| SSP_ERR_NOT_OPEN | Connection is not open |
| SSP_ERR_TIMEOUT | One of the following operation timed out.
|
| SSP_ERR_INTERNAL | An internal ThreadX Or NetX error has occurred. This is typically a failure to create/use thread mutex or failure create/enable an internal thread/feature for NetX service. |
Check if connection is open
Check and wait for client to be connected with timeout.
Get read lock.
Get data from read queue.
Release read lock.
| ssp_err_t SF_COMMS_TELNET_Unlock | ( | sf_comms_ctrl_t *const | p_api_ctrl, |
| sf_comms_lock_t | lock_type | ||
| ) |
Release lock type for the Telnet comms instance.
| SSP_SUCCESS | Released requested lock on given connection.. |
| SSP_ERR_ASSERTION | Pointer p_api_ctrl is NULL. |
| SSP_ERR_NOT_OPEN | Connection is not open. |
Check if connection is open
Release Lock(s) on this connection.
| ssp_err_t SF_COMMS_TELNET_VersionGet | ( | ssp_version_t *const | p_version | ) |
Get driver version.
| SSP_SUCCESS | Operation successful |
| SSP_ERR_ASSERTION | p_version pointer is NULL |
| ssp_err_t SF_COMMS_TELNET_Write | ( | sf_comms_ctrl_t *const | p_api_ctrl, |
| uint8_t const *const | p_src, | ||
| uint32_t const | bytes, | ||
| UINT const | timeout | ||
| ) |
Write data to the Telnet comms connection.
| SSP_SUCCESS | Data transmission finished successfully. |
| SSP_ERR_ASSERTION | One of the following invalid parameter passed.
|
| SSP_ERR_NOT_OPEN | Connection is not open |
| SSP_ERR_TIMEOUT | One of the following operation timed out.
|
| SSP_ERR_OUT_OF_MEMORY | Couldn't allocate pool memory for Telnet server |
| SSP_ERR_INTERNAL | An internal ThreadX Or NetX error has occurred. This is typically a failure to create/use thread mutex or failure create/enable an internal thread/feature for NetX service. |
Check if connection is open
Check and wait for client to be connected with timeout.
Get write lock.
Send data to the connected client.
Release write lock.