Rtos API example
configuration_store.h File Reference
This is the interface file to configuration store. More...
Go to the source code of this file.
Data Structures | |
struct | _ARM_CFSTORE_STATUS |
Status structure returned from the ARM_CFSTORE_DRIVER (*GetStatus)() function. More... | |
struct | ARM_CFSTORE_ACCESS_CONTROL_LIST |
The access control permissions for the key-value. More... | |
struct | ARM_CFSTORE_FMODE |
File mode bit-field structure for specifying flags for the following operations:
| |
struct | ARM_CFSTORE_KEYDESC |
Descriptor used to create keys. More... | |
struct | ARM_CFSTORE_CAPABILITIES |
Find the capabilities of the configuration store. More... | |
struct | _ARM_DRIVER_CFSTORE |
This is the set of operations constituting the Configuration Store driver. More... | |
Typedefs | |
typedef void * | ARM_CFSTORE_HANDLE |
typedef size_t | ARM_CFSTORE_SIZE |
CFSTORE type for size parameters. | |
typedef size_t | ARM_CFSTORE_OFFSET |
CFSTORE type for offset parameters. | |
typedef struct _ARM_CFSTORE_STATUS | ARM_CFSTORE_STATUS |
Status structure returned from the ARM_CFSTORE_DRIVER (*GetStatus)() function. | |
typedef struct ARM_CFSTORE_ACCESS_CONTROL_LIST | ARM_CFSTORE_ACCESS_CONTROL_LIST |
The access control permissions for the key-value. | |
typedef struct ARM_CFSTORE_FMODE | ARM_CFSTORE_FMODE |
File mode bit-field structure for specifying flags for the following operations:
| |
typedef struct ARM_CFSTORE_KEYDESC | ARM_CFSTORE_KEYDESC |
Descriptor used to create keys. | |
typedef enum ARM_CFSTORE_OPCODE | ARM_CFSTORE_OPCODE |
These are the command code values used for the cmd_code argument to the ARM_CFSTORE_CALLBACK callback handler. | |
typedef void(* | ARM_CFSTORE_CALLBACK )(int32_t status, ARM_CFSTORE_OPCODE cmd_code, void *client_context, ARM_CFSTORE_HANDLE handle) |
client registered callback type for receiving asynchronous event notifications. | |
typedef struct ARM_CFSTORE_CAPABILITIES | ARM_CFSTORE_CAPABILITIES |
Find the capabilities of the configuration store. | |
typedef struct _ARM_DRIVER_CFSTORE | ARM_CFSTORE_DRIVER |
This is the set of operations constituting the Configuration Store driver. | |
Enumerations | |
enum | ARM_CFSTORE_OPCODE { CFSTORE_OPCODE_CLOSE = 1, CFSTORE_OPCODE_CREATE, CFSTORE_OPCODE_DELETE, CFSTORE_OPCODE_FIND, CFSTORE_OPCODE_FLUSH, CFSTORE_OPCODE_GET_KEY_NAME, CFSTORE_OPCODE_GET_STATUS, CFSTORE_OPCODE_GET_VALUE_LEN, CFSTORE_OPCODE_INITIALIZE, CFSTORE_OPCODE_OPEN, CFSTORE_OPCODE_POWER_CONTROL, CFSTORE_OPCODE_READ, CFSTORE_OPCODE_RSEEK, CFSTORE_OPCODE_UNINITIALIZE, CFSTORE_OPCODE_WRITE, CFSTORE_OPCODE_MAX } |
These are the command code values used for the cmd_code argument to the ARM_CFSTORE_CALLBACK callback handler. More... |
Detailed Description
This is the interface file to configuration store.
The following (referred to as [REFERENCE_1] in other parts of the documentation) discusses synchronous/asynchronous completion of ARM_CFSTORE_DRIVER methods and the inter-relationship of ARM_CFSTORE_OPCODE and ARM_CFSTORE_CALLBACK.
Configuration Store driver dispatch methods can operate in 2 modes:
- Synchronous (i.e. when ARM_CFSTORE_CAPABILITIES asynchronous_ops == 0) then the ARM_CFSTORE_DRIVER Dispatch_Method_Xxx() will return:
- >= 0 => CFSTORE Dispatch_Method_Xxx() completed successfully
- otherwise CFSTORE Dispatch_Method_Xxx() did not complete successfully (return code supplies further details).
In synchronous mode it is optional as to whether the client registers a client callback with the Initialize() method. If one is registered, it will be called to indicate the synchronous completion status.
- Asynchronous (i.e. when ARM_CFSTORE_CAPABILITIES asynchronous_ops == 1) then the ARM_CFSTORE_DRIVER Dispatch_Method_Xxx() will return:
- return_value = ARM_DRIVER_OK (i.e. ==0) implies CFSTORE Dispatch_Method_Xxx() transaction pending. Dispatch_Method_Xxx() completion status will be indicated via an asynchronous call to ARM_CFSTORE_CALLBACK registered with the ARM_CFSTORE_DRIVER ::(*Initialize)(), where the status supplied to the callback will be the final status of the call.
- return_value > ARM_DRIVER_OK (i.e. > 0) implies CFSTORE Dispatch_Method_Xxx() completely synchronously and successfully. The return_value has specific meaning for the Dispatch_Method_Xxx() e.g. for the Read() method return_value is the number of bytes read.
- otherwise return_value < 0 => CFSTORE Dispatch_Method_Xxx() completed unsuccessfully (return code supplies further details).
The client registered asynchronous callback method ARM_CFSTORE_CALLBACK is registered by the client using: ARM_CFSTORE_DRIVER ::(*Initialize)(ARM_CFSTORE_CALLBACK callback, void* client_context) See the (*Initialize) documentation for more details.
The registered callback has the following prototype:
typedef void (* )( int32_t status, ARM_CFSTORE_OPCODE cmd_code, void *client_context, ARM_CFSTORE_HANDLE handle);
Before an asynchronous notification is received, a client can check on the status of the call by calling ARM_CFSTORE_DRIVER ::(*GetStatus)().
Definition in file configuration_store.h.
Typedef Documentation
typedef struct ARM_CFSTORE_ACCESS_CONTROL_LIST ARM_CFSTORE_ACCESS_CONTROL_LIST |
The access control permissions for the key-value.
typedef void(* ARM_CFSTORE_CALLBACK)(int32_t status, ARM_CFSTORE_OPCODE cmd_code, void *client_context, ARM_CFSTORE_HANDLE handle) |
client registered callback type for receiving asynchronous event notifications.
- Parameters:
-
status In the case that cmd_code is one of ARM_CFSTORE_OPCODE then this is the asynchronous completion status of the associated ARM_CFSTORE_DRIVER::Dispatch_Method_Xxx() cmd_code ARM_CFSTORE_OPCODE for the ARM_CFSTORE_DRIVER::Dispatch_Method_Xxx() for which this invocation of the callback is an asynchronous completion event. client_context The client ARM_CFSTORE_CALLBACK context registered with the ARM_CFSTORE_DRIVER::(*Initialize)() method. handle For certain ARM_CFSTORE_DRIVER::Dispatch_Method_Xxx() e.g. ARM_CFSTORE_DRIVER::(*Create)() ARM_CFSTORE_DRIVER::(*Open)() ARM_CFSTORE_DRIVER::(*Find)() then an open key handle is supplied upon asynchronous completion. See the documentation of the ARM_CFSTORE_OpCode_e and the ARM_CFSTORE_DRIVER::Dispatch_Method_Xxx() for further details.
Definition at line 303 of file configuration_store.h.
typedef struct ARM_CFSTORE_CAPABILITIES ARM_CFSTORE_CAPABILITIES |
Find the capabilities of the configuration store.
typedef struct _ARM_DRIVER_CFSTORE ARM_CFSTORE_DRIVER |
This is the set of operations constituting the Configuration Store driver.
The functions dispatch methods can operate synchronously or asynchronously depending on the underlying implementation. The client of this interface should not assume one or other mode of operation but use the (*GetCapabilities) method to determine the operational mode and then behave accordingly.
typedef struct ARM_CFSTORE_FMODE ARM_CFSTORE_FMODE |
File mode bit-field structure for specifying flags for the following operations:
- ARM_CFSTORE_DRIVER::(*Create)(), when creating a KV.
- ARM_CFSTORE_DRIVER::(*Open)(), when opening a pre-existing KV.
typedef void* ARM_CFSTORE_HANDLE |
opaque cfstore handle for manipulating cfstore data objects e.g. KV pairs.
Definition at line 138 of file configuration_store.h.
typedef struct ARM_CFSTORE_KEYDESC ARM_CFSTORE_KEYDESC |
Descriptor used to create keys.
typedef size_t ARM_CFSTORE_OFFSET |
CFSTORE type for offset parameters.
Definition at line 140 of file configuration_store.h.
typedef enum ARM_CFSTORE_OPCODE ARM_CFSTORE_OPCODE |
These are the command code values used for the cmd_code argument to the ARM_CFSTORE_CALLBACK callback handler.
The command code indicates the ARM_CFSTORE_DRIVER dispatch method previously invocated.
typedef size_t ARM_CFSTORE_SIZE |
CFSTORE type for size parameters.
Definition at line 139 of file configuration_store.h.
typedef struct _ARM_CFSTORE_STATUS ARM_CFSTORE_STATUS |
Status structure returned from the ARM_CFSTORE_DRIVER (*GetStatus)() function.
Enumeration Type Documentation
enum ARM_CFSTORE_OPCODE |
These are the command code values used for the cmd_code argument to the ARM_CFSTORE_CALLBACK callback handler.
The command code indicates the ARM_CFSTORE_DRIVER dispatch method previously invocated.
- Enumerator:
CFSTORE_OPCODE_CLOSE used for ARM_CFSTORE_CALLBACK cmd_code argument when indicating status for a previous ARM_CFSTORE_DRIVER ::(*Close)() call.
CFSTORE_OPCODE_CREATE used for ARM_CFSTORE_CALLBACK cmd_code argument when indicating status for a previous ARM_CFSTORE_DRIVER ::(*Create)() call.
CFSTORE_OPCODE_DELETE used for ARM_CFSTORE_CALLBACK cmd_code argument when indicating status for a previous ARM_CFSTORE_DRIVER ::(*Delete)() call.
CFSTORE_OPCODE_FIND used for ARM_CFSTORE_CALLBACK cmd_code argument when indicating status for a previous ARM_CFSTORE_DRIVER ::(*Find)() call.
CFSTORE_OPCODE_FLUSH used for ARM_CFSTORE_CALLBACK cmd_code argument when indicating status for a previous ARM_CFSTORE_DRIVER ::(*Flush)() call.
CFSTORE_OPCODE_GET_KEY_NAME used for ARM_CFSTORE_CALLBACK cmd_code argument when indicating status for a previous ARM_CFSTORE_DRIVER ::(*GetKeyName)() call.
CFSTORE_OPCODE_GET_STATUS used for ARM_CFSTORE_CALLBACK cmd_code argument when indicating status for a previous ARM_CFSTORE_DRIVER ::(*GetStatus)() call.
CFSTORE_OPCODE_GET_VALUE_LEN used for ARM_CFSTORE_CALLBACK cmd_code argument when indicating status for a previous ARM_CFSTORE_DRIVER ::(*GetValueLen)() call.
CFSTORE_OPCODE_INITIALIZE used for ARM_CFSTORE_CALLBACK cmd_code argument when indicating status for a previous ARM_CFSTORE_DRIVER ::(*Initialize)() call.
CFSTORE_OPCODE_OPEN used for ARM_CFSTORE_CALLBACK cmd_code argument when indicating status for a previous ARM_CFSTORE_DRIVER ::(*Open)() call.
CFSTORE_OPCODE_POWER_CONTROL used for ARM_CFSTORE_CALLBACK cmd_code argument when indicating status for a previous ARM_CFSTORE_DRIVER ::(*PowerControl)() call.
CFSTORE_OPCODE_READ used for ARM_CFSTORE_CALLBACK cmd_code argument when indicating status for a previous ARM_CFSTORE_DRIVER ::(*Read)() call.
CFSTORE_OPCODE_RSEEK used for ARM_CFSTORE_CALLBACK cmd_code argument when indicating status for a previous ARM_CFSTORE_DRIVER ::(*Rseek)() call.
CFSTORE_OPCODE_UNINITIALIZE used for ARM_CFSTORE_CALLBACK cmd_code argument when indicating status for a previous ARM_CFSTORE_DRIVER ::(*Uninitialize)() call.
CFSTORE_OPCODE_WRITE used for ARM_CFSTORE_CALLBACK cmd_code argument when indicating status for a previous ARM_CFSTORE_DRIVER ::(*Write)() call.
CFSTORE_OPCODE_MAX Sentinel.
Definition at line 259 of file configuration_store.h.
Generated on Sun Jul 17 2022 08:25:34 by 1.7.2