File Descriptor Dispatch#

API and Callbacks for the File Descriptor Dispatch Component.

This plugin provides an API to register a file descriptor and a callback that is called when the select() function notifies the plugin there is data on that file descriptor.

Modules#

sl_zigbee_af_file_descriptor_dispatch_struct_t

API#

sl_zigbee_af_file_descriptor_dispatch_add(sl_zigbee_af_file_descriptor_dispatch_struct_t *dispatchStruct)

Enumerations#

enum
SL_ZIGBEE_AF_FILE_DESCRIPTOR_OPERATION_NONE = 0x00
SL_ZIGBEE_AF_FILE_DESCRIPTOR_OPERATION_READ = 0x01
SL_ZIGBEE_AF_FILE_DESCRIPTOR_OPERATION_WRITE = 0x02
SL_ZIGBEE_AF_FILE_DESCRIPTOR_OPERATION_EXCEPT = 0x03
SL_ZIGBEE_AF_FILE_DESCRIPTOR_OPERATION_MAX
}

Typedefs#

typedef void(*
sl_zigbee_af_file_descriptor_ready_callback_t)(void *data, sl_zigbee_af_file_descriptor_operation_t operation)

Functions#

API Documentation#

sl_zigbee_af_file_descriptor_dispatch_add#

sl_status_t sl_zigbee_af_file_descriptor_dispatch_add (sl_zigbee_af_file_descriptor_dispatch_struct_t * dispatchStruct)
Parameters
N/AdispatchStruct

Definition at line 56 of file app/framework/plugin-host/file-descriptor-dispatch/file-descriptor-dispatch.h

sl_zigbee_af_file_descriptor_dispatch_wait_for_events#

sl_status_t sl_zigbee_af_file_descriptor_dispatch_wait_for_events (uint32_t timeoutMs)
Parameters
N/AtimeoutMs

Definition at line 57 of file app/framework/plugin-host/file-descriptor-dispatch/file-descriptor-dispatch.h

sl_zigbee_af_file_descriptor_dispatch_remove#

bool sl_zigbee_af_file_descriptor_dispatch_remove (int fileDescriptor)
Parameters
N/AfileDescriptor

Definition at line 58 of file app/framework/plugin-host/file-descriptor-dispatch/file-descriptor-dispatch.h

Enumeration Documentation#

sl_zigbee_af_file_descriptor_operation_t#

sl_zigbee_af_file_descriptor_operation_t
Enumerator
SL_ZIGBEE_AF_FILE_DESCRIPTOR_OPERATION_NONE
SL_ZIGBEE_AF_FILE_DESCRIPTOR_OPERATION_READ
SL_ZIGBEE_AF_FILE_DESCRIPTOR_OPERATION_WRITE
SL_ZIGBEE_AF_FILE_DESCRIPTOR_OPERATION_EXCEPT
SL_ZIGBEE_AF_FILE_DESCRIPTOR_OPERATION_MAX

Definition at line 34 of file app/framework/plugin-host/file-descriptor-dispatch/file-descriptor-dispatch.h

Typedef Documentation#

sl_zigbee_af_file_descriptor_ready_callback_t#

typedef void(* sl_zigbee_af_file_descriptor_ready_callback_t) (void *data, sl_zigbee_af_file_descriptor_operation_t operation) )(void *data, sl_zigbee_af_file_descriptor_operation_t operation)

Definition at line 42 of file app/framework/plugin-host/file-descriptor-dispatch/file-descriptor-dispatch.h

Function Documentation#

sl_zigbee_af_file_descriptor_dispatch_bad_file_descriptor_cb#

void sl_zigbee_af_file_descriptor_dispatch_bad_file_descriptor_cb (int fd)

Bad file descriptor.

Parameters
N/Afd

The bad file descriptor Ver.: always

The indicated file descriptor has been detected to be bad. For example, the file descriptor caused an EBADF error on a select() call. The file descriptor will be omitted from subsequent file descriptor polling. The application responsible for the file descriptor should take steps to recover and clean up.


Definition at line 72 of file app/framework/plugin-host/file-descriptor-dispatch/file-descriptor-dispatch.h