None

Fork of cc3000_hostdriver_mbedsocket by Martin Kojtal

Embed: (wiki syntax)

« Back to documentation index

cc3000_event Class Reference

cc3000_event Class Reference

Event layer. More...

#include <cc3000.h>

Public Member Functions

 cc3000_event (cc3000_simple_link &simplelink, cc3000_hci &hci, cc3000_spi &spi, cc3000 &cc3000)
 Ctor.
 ~cc3000_event ()
 Dtor.
void hci_unsol_handle_patch_request (uint8_t *event_hdr)
 Handle unsolicited event from type patch request.
uint8_t * hci_event_handler (void *ret_param, uint8_t *from, uint8_t *fromlen)
 Parse the incoming event packets and issue corresponding event handler from global array of handlers pointers.
int32_t hci_unsol_event_handler (uint8_t *event_hdr)
 Handle unsolicited events.
int32_t hci_unsolicited_event_handler (void)
 Parse the incoming unsolicited event packets and start corresponding event handler.
int32_t get_socket_active_status (int32_t sd)
 Get the socket status.
void set_socket_active_status (int32_t sd, int32_t status)
 Check if the socket ID and status are valid and set the global socket status accordingly.
int32_t hci_event_unsol_flowcontrol_handler (uint8_t *event)
 Keep track on the number of packets transmitted and update the number of free buffer in the SL device.
void update_socket_active_status (uint8_t *resp_params)
 Update the socket status.
void simplelink_wait_event (uint16_t op_code, void *ret_param)
 Wait for event, pass it to the hci_event_handler and update the event opcode in a global variable.
void simplelink_wait_data (uint8_t *buffer, uint8_t *from, uint8_t *fromlen)
 Wait for data, pass it to the hci_event_handler and set the data available flag.
void received_handler (uint8_t *buffer)
 Trigger Received event/data processing - called from the SPI library to receive the data.

Detailed Description

Event layer.

Definition at line 334 of file cc3000.h.


Constructor & Destructor Documentation

cc3000_event ( cc3000_simple_link simplelink,
cc3000_hci hci,
cc3000_spi spi,
cc3000 cc3000 
)

Ctor.

Parameters:
simplelinkReference to simple link object.
hciReference to hci object.
spiReference to spi object.
cc3000Reference to cc3000 object.
Returns:
none

Definition at line 102 of file cc3000_event.cpp.

~cc3000_event (  )

Dtor.

Parameters:
none
Returns:
none

Definition at line 107 of file cc3000_event.cpp.


Member Function Documentation

int32_t get_socket_active_status ( int32_t  sd )

Get the socket status.

Parameters:
SdSocket IS
Returns:
Current status of the socket.

Definition at line 613 of file cc3000_event.cpp.

uint8_t * hci_event_handler ( void *  ret_param,
uint8_t *  from,
uint8_t *  fromlen 
)

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

Parameters:
ret_paramincoming data buffer
fromfrom information (in case of data received)
fromlenfrom information length (in case of data received)
Returns:
none

Definition at line 201 of file cc3000_event.cpp.

int32_t hci_event_unsol_flowcontrol_handler ( uint8_t *  event )

Keep track on the number of packets transmitted and update the number of free buffer in the SL device.

Called when unsolicited event = HCI_EVNT_DATA_UNSOL_FREE_BUFF has received.

Parameters:
eventpointer to the string contains parameters for IPERF.
Returns:
ESUCCESS if successful, EFAIL if an error occurred.

Definition at line 591 of file cc3000_event.cpp.

int32_t hci_unsol_event_handler ( uint8_t *  event_hdr )

Handle unsolicited events.

Parameters:
event_hdrEvent header
Returns:
1 if event supported and handled
0 if event is not supported

Definition at line 448 of file cc3000_event.cpp.

void hci_unsol_handle_patch_request ( uint8_t *  event_hdr )

Handle unsolicited event from type patch request.

Parameters:
event_hdrevent header
Returns:
none

Definition at line 119 of file cc3000_event.cpp.

int32_t hci_unsolicited_event_handler ( void   )

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

Parameters:
None
Returns:
ESUCCESS if successful, EFAIL if an error occurred.

Definition at line 562 of file cc3000_event.cpp.

void received_handler ( uint8_t *  buffer )

Trigger Received event/data processing - called from the SPI library to receive the data.

Parameters:
bufferpointer to the received data buffer
The function triggers Received event/data processing
Returns:
none

Definition at line 112 of file cc3000_event.cpp.

void set_socket_active_status ( int32_t  sd,
int32_t  status 
)

Check if the socket ID and status are valid and set the global socket status accordingly.

Parameters:
SdSock descr
Statusstatus to be set
Returns:
none

Definition at line 584 of file cc3000_event.cpp.

void simplelink_wait_data ( uint8_t *  buffer,
uint8_t *  from,
uint8_t *  fromlen 
)

Wait for data, pass it to the hci_event_handler and set the data available flag.

Parameters:
bufferData buffer
fromFrom information
fromlenFrom information length
Returns:
none

Definition at line 639 of file cc3000_event.cpp.

void simplelink_wait_event ( uint16_t  op_code,
void *  ret_param 
)

Wait for event, pass it to the hci_event_handler and update the event opcode in a global variable.

Parameters:
op_codeCommand operation code
ret_paramCommand return parameters
Returns:
none

Definition at line 632 of file cc3000_event.cpp.

void update_socket_active_status ( uint8_t *  resp_params )

Update the socket status.

Parameters:
resp_paramsSocket IS
Returns:
Current status of the socket.

Definition at line 621 of file cc3000_event.cpp.