Products Support Documentation Download
rdmbcdtypes.h
Go to the documentation of this file.
1 /*
2  * Raima Database Manager
3  *
4  * Copyright (C) 2016 Raims Inc., All rights reserved.
5  *
6  * Use of this software, whether in source code format, or in executable,
7  * binary object code form, is governed by the Raima LICENSE which
8  * is fully described in the LICENSE.TXT file, included within this
9  * distribution of files.
10  */
11 
16 #if !defined(RDMBCDTYPES_H_INCLUDED_)
17 #define RDMBCDTYPES_H_INCLUDED_
18 
19 #include "psptypes.h"
20 
22 #define RDM_BCDLEN(prec) ((uint16_t) (offsetof (RDM_BCD_T, data) + (prec) + 1))
23 
25 typedef enum
26 {
56 
58 #define RDM_BCD_MAXPRECISION 32
59 /* \brief The max scale for a RDM BCD */
60 #define RDM_BCD_MAXSCALE 32
61 
64 typedef struct
65 {
66  uint8_t prec;
67  int8_t exp;
68  uint8_t flags;
69  int8_t sign;
70  uint8_t data[RDM_BCD_MAXPRECISION + 1];
71 } RDM_BCD_T;
72 
73 #endif /* RDMBCDTYPES_H_INCLUDED_ */
Header for the Platform Support Package - Platform dependent types.
RDM_BCD_ROUNDING_MODE
Rounding modes for RDM BCD.
Definition: rdmbcdtypes.h:25
int8_t sign
Definition: rdmbcdtypes.h:69
int8_t exp
Definition: rdmbcdtypes.h:67
uint8_t prec
Definition: rdmbcdtypes.h:66
uint8_t flags
Definition: rdmbcdtypes.h:68
#define RDM_BCD_MAXPRECISION
The max presission for a RDM BCD.
Definition: rdmbcdtypes.h:58
The RDM Binary Coded Decimal (BCD) data structure.
Definition: rdmbcdtypes.h:64