hollyhock
mcs.hpp
Go to the documentation of this file.
1 
6 #pragma once
7 #include <stdint.h>
8 
12 const uint8_t VARTYPE_OBCD = 0x01;
13 
17 const uint8_t VARTYPE_CBCD = 0x02;
18 
22 const uint8_t VARTYPE_STR = 0x05;
23 
27 const uint8_t VARTYPE_LIST = 0x0A;
28 
32 const uint8_t VARTYPE_MAT = 0x0C;
33 
37 const uint8_t VARTYPE_PRGM = 0x47;
38 
42 const uint8_t VARTYPE_FUNC = 0x48;
43 
47 const uint8_t VARTYPE_GEO = 0x54;
48 
52 const int MCS_NO_VARIABLE = 0x30;
53 
57 const int MCS_NO_FOLDER = 0x40;
58 
62 const int MCS_FOLDER_EXISTS = 0x42;
63 
67 const int MCS_SIZE_NOT_PO2 = 0x61;
68 
72 const int MCS_NOT_LIST = 0x62;
73 
77 const int MCS_INDEX_OOB = 0x63;
78 
86 #define GET_BCD_DIGIT(n, i) (((n) >> ((i) * 4)) & 0xF)
87 
93 struct OBCD {
94  uint8_t mantissa[10];
95  uint16_t exponent;
96 };
97 
103 struct CBCD {
104  struct OBCD re;
105  struct OBCD im;
106 };
107 
122 extern "C"
123 int MCS_CreateFolder(const char *folder, uint8_t *folderIndex);
124 
137 extern "C"
139  const char *folder, const char *name,
140  uint8_t *variableType, char **name2, void **data, uint32_t *size
141 );
142 
159 extern "C"
161  const char *folder, const char *name,
162  uint32_t size, uint16_t length, uint8_t variableType
163 );
164 
180 extern "C"
182  const char *folder, const char *name,
183  uint32_t size, int index, uint8_t variableType, void *data
184 );
185 
202 extern "C"
204  const char *folder, const char *name,
205  uint8_t variableType, uint32_t size, void *data
206 );
int MCS_List_Set(const char *folder, const char *name, uint32_t size, int index, uint8_t variableType, void *data)
const uint8_t VARTYPE_PRGM
Definition: mcs.hpp:37
const uint8_t VARTYPE_GEO
Definition: mcs.hpp:47
const int MCS_SIZE_NOT_PO2
Definition: mcs.hpp:67
const int MCS_FOLDER_EXISTS
Definition: mcs.hpp:62
int MCS_CreateFolder(const char *folder, uint8_t *folderIndex)
const uint8_t VARTYPE_MAT
Definition: mcs.hpp:32
int MCS_GetVariable(const char *folder, const char *name, uint8_t *variableType, char **name2, void **data, uint32_t *size)
const uint8_t VARTYPE_OBCD
Definition: mcs.hpp:12
const uint8_t VARTYPE_LIST
Definition: mcs.hpp:27
const uint8_t VARTYPE_CBCD
Definition: mcs.hpp:17
const uint8_t VARTYPE_STR
Definition: mcs.hpp:22
const int MCS_NO_VARIABLE
Definition: mcs.hpp:52
const int MCS_INDEX_OOB
Definition: mcs.hpp:77
const int MCS_NO_FOLDER
Definition: mcs.hpp:57
int MCS_List_Create(const char *folder, const char *name, uint32_t size, uint16_t length, uint8_t variableType)
const uint8_t VARTYPE_FUNC
Definition: mcs.hpp:42
const int MCS_NOT_LIST
Definition: mcs.hpp:72
int MCS_SetVariable(const char *folder, const char *name, uint8_t variableType, uint32_t size, void *data)
Definition: mcs.hpp:103
Definition: mcs.hpp:93