Modules#

EmberAfFileDescriptorDispatchStruct

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.

API#

EmberStatus
emberAfPluginFileDescriptorDispatchAdd(EmberAfFileDescriptorDispatchStruct *dispatchStruct)

Enumerations#

enum
EMBER_AF_FILE_DESCRIPTOR_OPERATION_NONE = 0x00
EMBER_AF_FILE_DESCRIPTOR_OPERATION_READ = 0x01
EMBER_AF_FILE_DESCRIPTOR_OPERATION_WRITE = 0x02
EMBER_AF_FILE_DESCRIPTOR_OPERATION_EXCEPT = 0x03
EMBER_AF_FILE_DESCRIPTOR_OPERATION_MAX
}

Typedefs#

typedef void(*
EmberAfFileDescriptorReadyCallback)(void *data, EmberAfFileDescriptorOperation operation)

Functions#

API Documentation#

emberAfPluginFileDescriptorDispatchAdd#

EmberStatus emberAfPluginFileDescriptorDispatchAdd (EmberAfFileDescriptorDispatchStruct * dispatchStruct)
Parameters
N/AdispatchStruct

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

emberAfPluginFileDescriptorDispatchWaitForEvents#

EmberStatus emberAfPluginFileDescriptorDispatchWaitForEvents (uint32_t timeoutMs)
Parameters
N/AtimeoutMs

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

emberAfPluginFileDescriptorDispatchRemove#

bool emberAfPluginFileDescriptorDispatchRemove (int fileDescriptor)
Parameters
N/AfileDescriptor

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

Enumeration Documentation#

EmberAfFileDescriptorOperation#

EmberAfFileDescriptorOperation
Enumerator
EMBER_AF_FILE_DESCRIPTOR_OPERATION_NONE
EMBER_AF_FILE_DESCRIPTOR_OPERATION_READ
EMBER_AF_FILE_DESCRIPTOR_OPERATION_WRITE
EMBER_AF_FILE_DESCRIPTOR_OPERATION_EXCEPT
EMBER_AF_FILE_DESCRIPTOR_OPERATION_MAX

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

Typedef Documentation#

EmberAfFileDescriptorReadyCallback#

typedef void(* EmberAfFileDescriptorReadyCallback) (void *data, EmberAfFileDescriptorOperation operation) )(void *data, EmberAfFileDescriptorOperation operation)

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

Function Documentation#

emberAfPluginFileDescriptorDispatchBadFileDescriptorCallback#

void emberAfPluginFileDescriptorDispatchBadFileDescriptorCallback (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