Zephyr API Documentation
3.6.99
A Scalable Open Source RTOS
|
Binary Descriptor Definition. More...
Macros | |
#define | BINDESC_ID_APP_VERSION_STRING 0x800 |
The app version string such as "1.2.3". | |
#define | BINDESC_ID_APP_VERSION_MAJOR 0x801 |
The app version major such as 1. | |
#define | BINDESC_ID_APP_VERSION_MINOR 0x802 |
The app version minor such as 2. | |
#define | BINDESC_ID_APP_VERSION_PATCHLEVEL 0x803 |
The app version patchlevel such as 3. | |
#define | BINDESC_ID_APP_VERSION_NUMBER 0x804 |
The app version number such as 0x10203. | |
#define | BINDESC_ID_KERNEL_VERSION_STRING 0x900 |
The kernel version string such as "3.4.0". | |
#define | BINDESC_ID_KERNEL_VERSION_MAJOR 0x901 |
The kernel version major such as 3. | |
#define | BINDESC_ID_KERNEL_VERSION_MINOR 0x902 |
The kernel version minor such as 4. | |
#define | BINDESC_ID_KERNEL_VERSION_PATCHLEVEL 0x903 |
The kernel version patchlevel such as 0. | |
#define | BINDESC_ID_KERNEL_VERSION_NUMBER 0x904 |
The kernel version number such as 0x30400. | |
#define | BINDESC_ID_BUILD_TIME_YEAR 0xa00 |
The year the image was compiled in. | |
#define | BINDESC_ID_BUILD_TIME_MONTH 0xa01 |
The month of the year the image was compiled in. | |
#define | BINDESC_ID_BUILD_TIME_DAY 0xa02 |
The day of the month the image was compiled in. | |
#define | BINDESC_ID_BUILD_TIME_HOUR 0xa03 |
The hour of the day the image was compiled in. | |
#define | BINDESC_ID_BUILD_TIME_MINUTE 0xa04 |
The minute the image was compiled in. | |
#define | BINDESC_ID_BUILD_TIME_SECOND 0xa05 |
The second the image was compiled in. | |
#define | BINDESC_ID_BUILD_TIME_UNIX 0xa06 |
The UNIX time (seconds since midnight of 1970/01/01) the image was compiled in. | |
#define | BINDESC_ID_BUILD_DATE_TIME_STRING 0xa07 |
The date and time of compilation such as "2023/02/05 00:07:04". | |
#define | BINDESC_ID_BUILD_DATE_STRING 0xa08 |
The date of compilation such as "2023/02/05". | |
#define | BINDESC_ID_BUILD_TIME_STRING 0xa09 |
The time of compilation such as "00:07:04". | |
#define | BINDESC_ID_HOST_NAME 0xb00 |
The name of the host that compiled the image. | |
#define | BINDESC_ID_C_COMPILER_NAME 0xb01 |
The C compiler name. | |
#define | BINDESC_ID_C_COMPILER_VERSION 0xb02 |
The C compiler version. | |
#define | BINDESC_ID_CXX_COMPILER_NAME 0xb03 |
The C++ compiler name. | |
#define | BINDESC_ID_CXX_COMPILER_VERSION 0xb04 |
The C++ compiler version. | |
#define | BINDESC_TAG_DESCRIPTORS_END BINDESC_TAG(DESCRIPTORS_END, 0x0fff) |
#define | BINDESC_STR_DEFINE(name, id, value) |
Define a binary descriptor of type string. | |
#define | BINDESC_UINT_DEFINE(name, id, value) |
Define a binary descriptor of type uint. | |
#define | BINDESC_BYTES_DEFINE(name, id, value) |
Define a binary descriptor of type bytes. | |
#define | BINDESC_GET_STR(name) BINDESC_NAME(name).data |
Get the value of a string binary descriptor. | |
#define | BINDESC_GET_UINT(name) *(uint32_t *)&(BINDESC_NAME(name).data) |
Get the value of a uint binary descriptor. | |
#define | BINDESC_GET_BYTES(name) BINDESC_NAME(name).data |
Get the value of a bytes binary descriptor. | |
#define | BINDESC_GET_SIZE(name) BINDESC_NAME(name).len |
Get the size of a binary descriptor. | |
Binary Descriptor Definition.
#define BINDESC_BYTES_DEFINE | ( | name, | |
id, | |||
value | |||
) |
#include <zephyr/bindesc.h>
Define a binary descriptor of type bytes.
Define a uint8_t array that is registered in the binary descriptor header. The defined array can be accessed using BINDESC_GET_BYTES. The value should be given as an array literal, wrapped in parentheses, for example:
BINDESC_BYTES_DEFINE(name, id, ({1, 2, 3, 4}));
name | Name of the descriptor |
id | Unique ID of the descriptor |
value | A uint8_t array as data for the descriptor |
#define BINDESC_GET_BYTES | ( | name | ) | BINDESC_NAME(name).data |
#include <zephyr/bindesc.h>
Get the value of a bytes binary descriptor.
Get the value of a string binary descriptor, previously defined by BINDESC_BYTES_DEFINE. The returned value can be accessed as an array:
for (size_t i = 0; i < BINDESC_GET_SIZE(name); i++) BINDESC_GET_BYTES(name)[i];
name | Name of the descriptor |
#define BINDESC_GET_SIZE | ( | name | ) | BINDESC_NAME(name).len |
#include <zephyr/bindesc.h>
Get the size of a binary descriptor.
Get the size of a binary descriptor. This is particularly useful for bytes binary descriptors where there's no null terminator.
name | Name of the descriptor |
#define BINDESC_GET_STR | ( | name | ) | BINDESC_NAME(name).data |
#include <zephyr/bindesc.h>
Get the value of a string binary descriptor.
Get the value of a string binary descriptor, previously defined by BINDESC_STR_DEFINE.
name | Name of the descriptor |
#define BINDESC_GET_UINT | ( | name | ) | *(uint32_t *)&(BINDESC_NAME(name).data) |
#include <zephyr/bindesc.h>
Get the value of a uint binary descriptor.
Get the value of a uint binary descriptor, previously defined by BINDESC_UINT_DEFINE.
name | Name of the descriptor |
#define BINDESC_ID_APP_VERSION_MAJOR 0x801 |
#include <zephyr/bindesc.h>
The app version major such as 1.
#define BINDESC_ID_APP_VERSION_MINOR 0x802 |
#include <zephyr/bindesc.h>
The app version minor such as 2.
#define BINDESC_ID_APP_VERSION_NUMBER 0x804 |
#include <zephyr/bindesc.h>
The app version number such as 0x10203.
#define BINDESC_ID_APP_VERSION_PATCHLEVEL 0x803 |
#include <zephyr/bindesc.h>
The app version patchlevel such as 3.
#define BINDESC_ID_APP_VERSION_STRING 0x800 |
#include <zephyr/bindesc.h>
The app version string such as "1.2.3".
#define BINDESC_ID_BUILD_DATE_STRING 0xa08 |
#include <zephyr/bindesc.h>
The date of compilation such as "2023/02/05".
#define BINDESC_ID_BUILD_DATE_TIME_STRING 0xa07 |
#include <zephyr/bindesc.h>
The date and time of compilation such as "2023/02/05 00:07:04".
#define BINDESC_ID_BUILD_TIME_DAY 0xa02 |
#include <zephyr/bindesc.h>
The day of the month the image was compiled in.
#define BINDESC_ID_BUILD_TIME_HOUR 0xa03 |
#include <zephyr/bindesc.h>
The hour of the day the image was compiled in.
#define BINDESC_ID_BUILD_TIME_MINUTE 0xa04 |
#include <zephyr/bindesc.h>
The minute the image was compiled in.
#define BINDESC_ID_BUILD_TIME_MONTH 0xa01 |
#include <zephyr/bindesc.h>
The month of the year the image was compiled in.
#define BINDESC_ID_BUILD_TIME_SECOND 0xa05 |
#include <zephyr/bindesc.h>
The second the image was compiled in.
#define BINDESC_ID_BUILD_TIME_STRING 0xa09 |
#include <zephyr/bindesc.h>
The time of compilation such as "00:07:04".
#define BINDESC_ID_BUILD_TIME_UNIX 0xa06 |
#include <zephyr/bindesc.h>
The UNIX time (seconds since midnight of 1970/01/01) the image was compiled in.
#define BINDESC_ID_BUILD_TIME_YEAR 0xa00 |
#include <zephyr/bindesc.h>
The year the image was compiled in.
#define BINDESC_ID_C_COMPILER_NAME 0xb01 |
#include <zephyr/bindesc.h>
The C compiler name.
#define BINDESC_ID_C_COMPILER_VERSION 0xb02 |
#include <zephyr/bindesc.h>
The C compiler version.
#define BINDESC_ID_CXX_COMPILER_NAME 0xb03 |
#include <zephyr/bindesc.h>
The C++ compiler name.
#define BINDESC_ID_CXX_COMPILER_VERSION 0xb04 |
#include <zephyr/bindesc.h>
The C++ compiler version.
#define BINDESC_ID_HOST_NAME 0xb00 |
#include <zephyr/bindesc.h>
The name of the host that compiled the image.
#define BINDESC_ID_KERNEL_VERSION_MAJOR 0x901 |
#include <zephyr/bindesc.h>
The kernel version major such as 3.
#define BINDESC_ID_KERNEL_VERSION_MINOR 0x902 |
#include <zephyr/bindesc.h>
The kernel version minor such as 4.
#define BINDESC_ID_KERNEL_VERSION_NUMBER 0x904 |
#include <zephyr/bindesc.h>
The kernel version number such as 0x30400.
#define BINDESC_ID_KERNEL_VERSION_PATCHLEVEL 0x903 |
#include <zephyr/bindesc.h>
The kernel version patchlevel such as 0.
#define BINDESC_ID_KERNEL_VERSION_STRING 0x900 |
#include <zephyr/bindesc.h>
The kernel version string such as "3.4.0".
#define BINDESC_STR_DEFINE | ( | name, | |
id, | |||
value | |||
) |
#include <zephyr/bindesc.h>
Define a binary descriptor of type string.
Define a string that is registered in the binary descriptor header. The defined string can be accessed using BINDESC_GET_STR
name | Name of the descriptor |
id | Unique ID of the descriptor |
value | A string value for the descriptor |
#define BINDESC_TAG_DESCRIPTORS_END BINDESC_TAG(DESCRIPTORS_END, 0x0fff) |
#include <zephyr/bindesc.h>
#define BINDESC_UINT_DEFINE | ( | name, | |
id, | |||
value | |||
) |
#include <zephyr/bindesc.h>
Define a binary descriptor of type uint.
Define an integer that is registered in the binary descriptor header. The defined integer can be accessed using BINDESC_GET_UINT
name | Name of the descriptor |
id | Unique ID of the descriptor |
value | An integer value for the descriptor |