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 {
33 
35 #define RDM_BCD_MAXPRECISION 32
36 /* \brief The max scale for a RDM BCD */
37 #define RDM_BCD_MAXSCALE 32
38 
41 typedef struct
42 {
43  uint8_t prec;
44  int8_t exp;
45  uint8_t flags;
46  int8_t sign;
47  uint8_t data[RDM_BCD_MAXPRECISION + 1];
48 } RDM_BCD_T;
49 
50 #endif /* RDMBCDTYPES_H_INCLUDED_ */
51 
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:46
int8_t exp
Definition: rdmbcdtypes.h:44
uint8_t prec
Definition: rdmbcdtypes.h:43
uint8_t flags
Definition: rdmbcdtypes.h:45
#define RDM_BCD_MAXPRECISION
The max presission for a RDM BCD.
Definition: rdmbcdtypes.h:35
The RDM Binary Coded Decimal (BCD) data structure.
Definition: rdmbcdtypes.h:41