From b2d5d8b4f6c573052a609d223832f07d1b8ace25 Mon Sep 17 00:00:00 2001 From: nishi Date: Sat, 25 May 2024 15:40:35 +0000 Subject: [PATCH] add record type enum git-svn-id: file:///raid/svn-main/nishi-dataworks/trunk@109 d4a5a174-5a4a-5b4b-b672-37683c10d7d5 --- Library/dw_database.h | 57 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 54 insertions(+), 3 deletions(-) diff --git a/Library/dw_database.h b/Library/dw_database.h index a14e774..b475546 100644 --- a/Library/dw_database.h +++ b/Library/dw_database.h @@ -137,6 +137,56 @@ enum DW_ERRORS { DW_ERR_NOT_USED, }; +/** + * @~english + * @brief Type enum + * + */ +enum DW_RECORD_TYPES { + /** + * @~english + * @brief String + * + */ + DW_RECORD_STRING = 'C', + + /** + * @~english + * @brief Integer + * + */ + DW_RECORD_INTEGER = 'I', + + /** + * @~english + * @brief Double + * + */ + DW_RECORD_DOUBLE = 'D', + + /** + * @~english + * @brief Logical + * + */ + DW_RECORD_LOGICAL = 'L', + + /** + * @~english + * @brief HELP + * + */ + DW_RECORD_HELP = '?', +}; + +/* +| String | `S` | ASCII | | +| Integer | `I` | uint64\_t | | +| Double | `D` | double | | +| Logical | `L` | uint8\_t | 0 for false, other value for true | +| Help | `?` | ASCII | Should be just ignored | +*/ + /** * @~english * @brief Database struct @@ -189,14 +239,15 @@ struct dataworks_db { /** * @~english * @brief Database record struct - * + */ struct dataworks_db_record { /** * @~english - * @brief Type. See enum DW + * @brief Type. See enum DW_RECORD_TYPES. + * */ - + char type; }; /** -- 2.43.0