SimpleLink API Reference Manual  1.11.1
 All Data Structures Files Functions Variables Typedefs Macros Groups
evnt_handler.h File Reference
#include "hci.h"
#include "socket.h"

Go to the source code of this file.

Data Structures

struct  _bsd_accept_return_t
 
struct  _bsd_read_return_t
 
struct  _bsd_select_return_t
 
struct  _bsd_getsockopt_return_t
 
struct  _bsd_gethostbyname_return_t
 

Macros

#define M_BSD_RESP_PARAMS_OFFSET(hci_event_hdr)   ((char *)(hci_event_hdr) + HCI_EVENT_HEADER_SIZE)
 
#define SOCKET_STATUS_ACTIVE   0
 
#define SOCKET_STATUS_INACTIVE   1
 
#define SOCKET_STATUS_INIT_VAL   0xFFFF
 
#define M_IS_VALID_SD(sd)   ((0 <= (sd)) && ((sd) <= 7))
 
#define M_IS_VALID_STATUS(status)   (((status) == SOCKET_STATUS_ACTIVE)||((status) == SOCKET_STATUS_INACTIVE))
 
#define BSD_RECV_FROM_FROMLEN_OFFSET   (4)
 
#define BSD_RECV_FROM_FROM_OFFSET   (16)
 

Typedefs

typedef struct _bsd_accept_return_t tBsdReturnParams
 
typedef struct _bsd_read_return_t tBsdReadReturnParams
 
typedef struct _bsd_select_return_t tBsdSelectRecvParams
 
typedef struct
_bsd_getsockopt_return_t 
tBsdGetSockOptReturnParams
 
typedef struct
_bsd_gethostbyname_return_t 
tBsdGethostbynameParams
 

Functions

unsigned char * hci_event_handler (void *pRetParams, unsigned char *from, unsigned char *fromlen)
 Parse the incoming events packets and issues corresponding event handler from global array of handlers pointers.
 
long hci_unsol_event_handler (char *event_hdr)
 Handle unsolicited events.
 
long hci_unsolicited_event_handler (void)
 Parse the incoming unsolicited event packets and issues corresponding event handler.
 
void set_socket_active_status (long Sd, long Status)
 
long get_socket_active_status (long Sd)
 

Variables

unsigned long socket_active_status
 

Macro Definition Documentation

#define M_BSD_RESP_PARAMS_OFFSET (   hci_event_hdr)    ((char *)(hci_event_hdr) + HCI_EVENT_HEADER_SIZE)

Definition at line 100 of file evnt_handler.h.

#define SOCKET_STATUS_ACTIVE   0

Definition at line 102 of file evnt_handler.h.

#define SOCKET_STATUS_INACTIVE   1

Definition at line 103 of file evnt_handler.h.

#define SOCKET_STATUS_INIT_VAL   0xFFFF

Definition at line 106 of file evnt_handler.h.

#define M_IS_VALID_SD (   sd)    ((0 <= (sd)) && ((sd) <= 7))

Definition at line 107 of file evnt_handler.h.

#define M_IS_VALID_STATUS (   status)    (((status) == SOCKET_STATUS_ACTIVE)||((status) == SOCKET_STATUS_INACTIVE))

Definition at line 108 of file evnt_handler.h.

#define BSD_RECV_FROM_FROMLEN_OFFSET   (4)

Definition at line 131 of file evnt_handler.h.

#define BSD_RECV_FROM_FROM_OFFSET   (16)

Definition at line 132 of file evnt_handler.h.

Typedef Documentation

Function Documentation

unsigned char* hci_event_handler ( void *  pRetParams,
unsigned char *  from,
unsigned char *  fromlen 
)

Parse the incoming events packets and issues corresponding event handler from global array of handlers pointers.

hci_event_handler

Parameters
pRetParamsincoming data buffer
fromfrom information (in case of data received)
fromlenfrom information length (in case of data received)
Returns
none
long hci_unsol_event_handler ( char *  event_hdr)

Handle unsolicited events.

hci_unsol_event_handler

Parameters
event_hdrevent header
Returns
1 if event supported and handled 0 if event is not supported
long hci_unsolicited_event_handler ( void  )

Parse the incoming unsolicited event packets and issues corresponding event handler.

hci_unsolicited_event_handler

Parameters
None
Returns
ESUCCESS if successful, EFAIL if an error occurred
void set_socket_active_status ( long  Sd,
long  Status 
)
long get_socket_active_status ( long  Sd)

Variable Documentation

unsigned long socket_active_status