![]() |
BSB Developer Docs
|
Wireless co-processor (Si917) information service API. More...
#include <toolbox/property.h>Go to the source code of this file.
Macros | |
| #define | RECORD_SL_INFO "sl_info" |
| The string key for SlInfo instance access. | |
Typedefs | |
| typedef struct SlInfo | SlInfo |
| Opaque data type for the SlInfo service instance. | |
Enumerations | |
| enum | SlInfoStatus { SlInfoStatusOk , SlInfoStatusNotReady , SlInfoStatusNotFound } |
| Enumeration of possible return statuses used in getter functions. More... | |
Functions | |
| SlInfoStatus | sl_info_get_value (const SlInfo *instance, const char *key, const char **value) |
| Get a string value by key. | |
| SlInfoStatus | sl_info_get_values (const SlInfo *instance, PropertyValueCallback value_callback, void *context) |
| Get all available key-value pairs via the Property callback API. | |
Wireless co-processor (Si917) information service API.
The SlInfo service keeps the static copy of the device_info output in a searchable form, allowing key-value lookups for particular values or outputting them all at once via the Property callback API.
| #define RECORD_SL_INFO "sl_info" |
The string key for SlInfo instance access.
Get the instance pointer by calling furi_record_open(RECORD_SL_INFO);
| typedef struct SlInfo SlInfo |
Opaque data type for the SlInfo service instance.
Get the instance pointer by calling furi_record_open(RECORD_SL_INFO);
| enum SlInfoStatus |
| SlInfoStatus sl_info_get_value | ( | const SlInfo * | instance, |
| const char * | key, | ||
| const char ** | value ) |
Get a string value by key.
On success, the value pointer is guaranteed to be valid during the entire run time of the firmware and the data itself will never change.
device_info inside sl_cli.| [in] | instance | Pointer to the SlInfo service instance |
| [in] | key | Pointer to a C-string containing the key |
| [out] | value | Pointer to a pointer to a C-string to contain the value (no allocation needed) |
SlInfoStatusOk on success, any other value from SlInfoStatus otherwise | SlInfoStatus sl_info_get_values | ( | const SlInfo * | instance, |
| PropertyValueCallback | value_callback, | ||
| void * | context ) |
Get all available key-value pairs via the Property callback API.
| [in] | instance | Pointer to the SlInfo service instance |
| [in] | value_callback | Pointer to the output callback function |
| [in,out] | context | Pointer to a user-specific object (will be passed to the value callback) |
SlInfoStatusOk on success, any other value from SlInfoStatus otherwise