SimpleLink CC3100/CC3200 Host Driver  Version 1.0.1.6
Simplifies the implementation of Internet connectivity
UserEvents

Functions

_SlEventPropogationStatus_e __CONCAT2 (SL_EXT_LIB_1, _GeneralEventHdl)(SlDeviceEvent_t *)
 
_SlEventPropogationStatus_e __CONCAT2 (SL_EXT_LIB_1, _WlanEventHdl)(SlWlanEvent_t *)
 
_SlEventPropogationStatus_e __CONCAT2 (SL_EXT_LIB_1, _NetAppEventHdl)(SlNetAppEvent_t *)
 
_SlEventPropogationStatus_e __CONCAT2 (SL_EXT_LIB_1, _HttpServerEventHdl)(SlHttpServerEvent_t *
 
_SlEventPropogationStatus_e __CONCAT2 (SL_EXT_LIB_1, _SockEventHdl)(SlSockEvent_t *)
 
_SlEventPropogationStatus_e __CONCAT2 (SL_EXT_LIB_2, _GeneralEventHdl)(SlDeviceEvent_t *)
 
_SlEventPropogationStatus_e __CONCAT2 (SL_EXT_LIB_2, _WlanEventHdl)(SlWlanEvent_t *)
 
_SlEventPropogationStatus_e __CONCAT2 (SL_EXT_LIB_2, _NetAppEventHdl)(SlNetAppEvent_t *)
 
_SlEventPropogationStatus_e __CONCAT2 (SL_EXT_LIB_2, _HttpServerEventHdl)(SlHttpServerEvent_t *
 
_SlEventPropogationStatus_e __CONCAT2 (SL_EXT_LIB_2, _SockEventHdl)(SlSockEvent_t *)
 
_SlEventPropogationStatus_e __CONCAT2 (SL_EXT_LIB_3, _GeneralEventHdl)(SlDeviceEvent_t *)
 
_SlEventPropogationStatus_e __CONCAT2 (SL_EXT_LIB_3, _WlanEventHdl)(SlWlanEvent_t *)
 
_SlEventPropogationStatus_e __CONCAT2 (SL_EXT_LIB_3, _NetAppEventHdl)(SlNetAppEvent_t *)
 
_SlEventPropogationStatus_e __CONCAT2 (SL_EXT_LIB_3, _HttpServerEventHdl)(SlHttpServerEvent_t *
 
_SlEventPropogationStatus_e __CONCAT2 (SL_EXT_LIB_3, _SockEventHdl)(SlSockEvent_t *)
 
_SlEventPropogationStatus_e __CONCAT2 (SL_EXT_LIB_4, _GeneralEventHdl)(SlDeviceEvent_t *)
 
_SlEventPropogationStatus_e __CONCAT2 (SL_EXT_LIB_4, _WlanEventHdl)(SlWlanEvent_t *)
 
_SlEventPropogationStatus_e __CONCAT2 (SL_EXT_LIB_4, _NetAppEventHdl)(SlNetAppEvent_t *)
 
_SlEventPropogationStatus_e __CONCAT2 (SL_EXT_LIB_4, _HttpServerEventHdl)(SlHttpServerEvent_t *
 
_SlEventPropogationStatus_e __CONCAT2 (SL_EXT_LIB_4, _SockEventHdl)(SlSockEvent_t *)
 
_SlEventPropogationStatus_e __CONCAT2 (SL_EXT_LIB_5, _GeneralEventHdl)(SlDeviceEvent_t *)
 
_SlEventPropogationStatus_e __CONCAT2 (SL_EXT_LIB_5, _WlanEventHdl)(SlWlanEvent_t *)
 
_SlEventPropogationStatus_e __CONCAT2 (SL_EXT_LIB_5, _NetAppEventHdl)(SlNetAppEvent_t *)
 
_SlEventPropogationStatus_e __CONCAT2 (SL_EXT_LIB_5, _HttpServerEventHdl)(SlHttpServerEvent_t *
 
_SlEventPropogationStatus_e __CONCAT2 (SL_EXT_LIB_5, _SockEventHdl)(SlSockEvent_t *)
 
void _SlDrvHandleGeneralEvents (SlDeviceEvent_t *slGeneralEvent)
 
void _SlDrvHandleWlanEvents (SlWlanEvent_t *slWlanEvent)
 
void _SlDrvHandleNetAppEvents (SlNetAppEvent_t *slNetAppEvent)
 
void _SlDrvHandleHttpServerEvents (SlHttpServerEvent_t *slHttpServerEvent, SlHttpServerResponse_t *slHttpServerResponse)
 
void _SlDrvHandleSockEvents (SlSockEvent_t *slSockEvent)
 
void sl_GeneralEvtHdlr (SlDeviceEvent_t *pSlDeviceEvent)
 General async event for inspecting general events. More...
 
void sl_WlanEvtHdlr (SlWlanEvent_t *pSlWlanEvent)
 WLAN Async event handler. More...
 
void sl_NetAppEvtHdlr (SlNetAppEvent_t *pSlNetApp)
 NETAPP Async event handler. More...
 
void sl_SockEvtHdlr (SlSockEvent_t *pSlSockEvent)
 Socket Async event handler. More...
 
void sl_HttpServerCallback (SlHttpServerEvent_t *pSlHttpServerEvent, SlHttpServerResponse_t *pSlHttpServerResponse)
 HTTP server async event. More...
 
_u32 sl_GetTimestamp (void)
 SL get timestamp routine. It returns the timer counter value in ticks unit. The counter must count from zero to its max value. More...
 

Typedefs

typedef _u16 _SlOpcode_t
 
typedef _u8 _SlArgSize_t
 
typedef _i16 _SlDataSize_t
 
typedef _i16 _SlReturnVal_t
 
typedef short(* _SlSpawnEntryFunc_t) (void *pValue)
 

Enumerations

enum  _SlEventPropogationStatus_e {
  EVENT_PROPAGATION_BLOCK = 0,
  EVENT_PROPAGATION_CONTINUE
}
 

Detailed Description

Attention
Async event activation notes Function prototypes for event callback handlers Event handler function names should be defined in the user.h file e.g. "#define sl_WlanEvtHdlr SLWlanEventHandler" Indicates all WLAN events are handled by User func "SLWlanEventHandler" Important notes:
  1. Event handlers cannot activate another SimpleLink API from the event's context
  2. Event's data is valid during event's context. Any application data which is required for the user application should be copied or marked into user's variables
  3. It is not recommended to delay the execution of the event callback handler

Function Documentation

void sl_GeneralEvtHdlr ( SlDeviceEvent_t pSlDeviceEvent)

General async event for inspecting general events.

Parameters
[out]pSlDeviceEventpointer to SlDeviceEvent_t
Parameters:
  • pSlDeviceEvent->Event = SL_DEVICE_FATAL_ERROR_EVENT
    • pSlDeviceEvent->EventData.deviceEvent fields:
      • status: An error code indication from the device
      • sender: The sender originator which is based on SlErrorSender_e enum
  • pSlDeviceEvent->Event = SL_DEVICE_ABORT_ERROR_EVENT Indicates a severe error occured and the device stopped
    • pSlDeviceEvent->EventData.deviceReport fields:
      • AbortType: An idication of the event type
      • AbortData: Additional info about the data error
Example for fatal error:
1 printf(General Event Handler - ID=%d Sender=%d\n\n",
2  pSlDeviceEvent->EventData.deviceEvent.status, // status of the general event
3  pSlDeviceEvent->EventData.deviceEvent.sender); // sender type
Example for abort request:
1 printf(Abort type =%d Abort Data=%d\n\n",
2  pSlDeviceEvent->EventData.deviceReport.AbortType,
3  pSlDeviceEvent->EventData.deviceReport.AbortData);
_u32 sl_GetTimestamp ( void  )

SL get timestamp routine. It returns the timer counter value in ticks unit. The counter must count from zero to its max value.

Parameters:
void sl_HttpServerCallback ( SlHttpServerEvent_t pSlHttpServerEvent,
SlHttpServerResponse_t pSlHttpServerResponse 
)

HTTP server async event.

Parameters
[out]pSlHttpServerEventpointer to SlHttpServerEvent_t
[in]pSlHttpServerResponsepointer to SlHttpServerResponse_t
Parameters:
  • pSlHttpServerEvent->Event = SL_NETAPP_HTTPGETTOKENVALUE_EVENT
    • pSlHttpServerEvent->EventData fields:
      • httpTokenName
        • data
        • len
    • pSlHttpServerResponse->ResponseData fields:
      • data
      • len
  • pSlHttpServerEvent->Event = SL_NETAPP_HTTPPOSTTOKENVALUE_EVENT
    • pSlHttpServerEvent->EventData.httpPostData fields:
      • action
      • token_name
      • token_value
    • pSlHttpServerResponse->ResponseData fields:
      • data
      • len
void sl_NetAppEvtHdlr ( SlNetAppEvent_t pSlNetApp)

NETAPP Async event handler.

Parameters
[out]pSlNetApppointer to SlNetAppEvent_t data
Parameters:
  • pSlNetApp->Event = SL_NETAPP_IPV4_IPACQUIRED_EVENT, IPV4 acquired event
    • pSlNetApp->EventData.ipAcquiredV4 fields:
      • ip
      • gateway
      • dns
  • pSlNetApp->Event = SL_NETAPP_IP_LEASED_EVENT, AP or P2P go dhcp lease event
    • pSlNetApp->EventData.ipLeased fields:
      • ip_address
      • lease_time
      • mac
  • pSlNetApp->Event = SL_NETAPP_IP_RELEASED_EVENT, AP or P2P go dhcp ip release event
    • pSlNetApp->EventData.ipReleased fields
      • ip_address
      • mac
      • reason
void sl_SockEvtHdlr ( SlSockEvent_t pSlSockEvent)

Socket Async event handler.

Parameters
[out]pSlSockEventpointer to SlSockEvent_t data
Parameters:
  • pSlSockEvent->Event = SL_SOCKET_TX_FAILED_EVENT
    • pSlSockEvent->SockTxFailData fields:
      • sd
      • status
  • pSlSockEvent->Event = SL_SOCKET_ASYNC_EVENT
    • pSlSockEvent->SockAsyncData fields:
      • sd
      • type: SSL_ACCEPT or RX_FRAGMENTATION_TOO_BIG or OTHER_SIDE_CLOSE_SSL_DATA_NOT_ENCRYPTED
      • val
void sl_WlanEvtHdlr ( SlWlanEvent_t pSlWlanEvent)

WLAN Async event handler.

Parameters
[out]pSlWlanEventpointer to SlWlanEvent_t data
Parameters:
  • pSlWlanEvent->Event = SL_WLAN_CONNECT_EVENT , STA or P2P client connection indication event
    • pSlWlanEvent->EventData.STAandP2PModeWlanConnected main fields:
      • ssid_name
      • ssid_len
      • bssid
      • go_peer_device_name
      • go_peer_device_name_len
  • pSlWlanEvent->Event = SL_WLAN_DISCONNECT_EVENT , STA or P2P client disconnection event
    • pSlWlanEvent->EventData.STAandP2PModeDisconnected main fields:
      • ssid_name
      • ssid_len
      • reason_code
  • pSlWlanEvent->Event = SL_WLAN_STA_CONNECTED_EVENT , AP/P2P(Go) connected STA/P2P(Client)
    • pSlWlanEvent->EventData.APModeStaConnected fields:
      • go_peer_device_name
      • mac
      • go_peer_device_name_len
      • wps_dev_password_id
      • own_ssid: relevant for event sta-connected only
      • own_ssid_len: relevant for event sta-connected only
  • pSlWlanEvent->Event = SL_WLAN_STA_DISCONNECTED_EVENT , AP/P2P(Go) disconnected STA/P2P(Client)
    • pSlWlanEvent->EventData.APModestaDisconnected fields:
      • go_peer_device_name
      • mac
      • go_peer_device_name_len
      • wps_dev_password_id
      • own_ssid: relevant for event sta-connected only
      • own_ssid_len: relevant for event sta-connected only
  • pSlWlanEvent->Event = SL_WLAN_SMART_CONFIG_COMPLETE_EVENT
    • pSlWlanEvent->EventData.smartConfigStartResponse fields:
      • status
      • ssid_len
      • ssid
      • private_token_len
      • private_token
  • pSlWlanEvent->Event = SL_WLAN_SMART_CONFIG_STOP_EVENT
    • pSlWlanEvent->EventData.smartConfigStopResponse fields:
      • status
  • pSlWlanEvent->Event = SL_WLAN_P2P_DEV_FOUND_EVENT
    • pSlWlanEvent->EventData.P2PModeDevFound fields:
      • go_peer_device_name
      • mac
      • go_peer_device_name_len
      • wps_dev_password_id
      • own_ssid: relevant for event sta-connected only
      • own_ssid_len: relevant for event sta-connected only
  • pSlWlanEvent->Event = SL_WLAN_P2P_NEG_REQ_RECEIVED_EVENT
    • pSlWlanEvent->EventData.P2PModeNegReqReceived fields
      • go_peer_device_name
      • mac
      • go_peer_device_name_len
      • wps_dev_password_id
      • own_ssid: relevant for event sta-connected only
  • pSlWlanEvent->Event = SL_WLAN_CONNECTION_FAILED_EVENT , P2P only
    • pSlWlanEvent->EventData.P2PModewlanConnectionFailure fields:
      • status