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)
EmberStatus
emberAfPluginFileDescriptorDispatchWaitForEvents(uint32_t timeoutMs)
bool
emberAfPluginFileDescriptorDispatchRemove(int fileDescriptor)
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#
void
Bad file descriptor.
API Documentation#
emberAfPluginFileDescriptorDispatchAdd#
EmberStatus emberAfPluginFileDescriptorDispatchAdd (EmberAfFileDescriptorDispatchStruct * dispatchStruct)
Parameters
Type | Direction | Argument Name | Description |
---|---|---|---|
EmberAfFileDescriptorDispatchStruct * | N/A | dispatchStruct |
emberAfPluginFileDescriptorDispatchWaitForEvents#
EmberStatus emberAfPluginFileDescriptorDispatchWaitForEvents (uint32_t timeoutMs)
Parameters
Type | Direction | Argument Name | Description |
---|---|---|---|
uint32_t | N/A | timeoutMs |
emberAfPluginFileDescriptorDispatchRemove#
bool emberAfPluginFileDescriptorDispatchRemove (int fileDescriptor)
Parameters
Type | Direction | Argument Name | Description |
---|---|---|---|
int | N/A | fileDescriptor |
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 |
Typedef Documentation#
EmberAfFileDescriptorReadyCallback#
typedef void(* EmberAfFileDescriptorReadyCallback) (void *data, EmberAfFileDescriptorOperation operation) )(void *data, EmberAfFileDescriptorOperation operation)
Function Documentation#
emberAfPluginFileDescriptorDispatchBadFileDescriptorCallback#
void emberAfPluginFileDescriptorDispatchBadFileDescriptorCallback (int fd)
Bad file descriptor.
Parameters
Type | Direction | Argument Name | Description |
---|---|---|---|
int | N/A | fd | 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.