Important update:

- DataTree->GetStr return Member->Value or NULL if not found
- Rename DeviceCore EDataType to EMBDataType, avoid conflict with JSONpaser
- Add DataTree to FunctionCore with LoadConfig() method
- Change ProcessName to char * (from char[])
- JSONparse:
  - Rename RootPath to BasePath on all methods to reduce confusion
  - Allow FilePath to be NULL, add '/' if not present
  - Fixed Parsing sequence in ParseObject & ParseArray
This commit is contained in:
Charl Wentzel
2017-04-10 21:33:14 +02:00
parent 9b42d516a1
commit ee29625b9a
8 changed files with 89 additions and 66 deletions

View File

@@ -17,7 +17,7 @@
//---------------------------------------------------------------------------
// Enumerated types
typedef enum { dtUnsigned16 = 0, dtSigned16 = 1, dtUnsigned32 = 2, dtSigned32 = 3, dtFloat32 = 4, dtString = 5 } EDataType;
typedef enum { dtUnsigned16 = 0, dtSigned16 = 1, dtUnsigned32 = 2, dtSigned32 = 3, dtFloat32 = 4, dtString = 5 } EMBDataType;
// Constants
const char DataTypeName[][20] = { "Unsigned16", "Signed16", "Unsigned32", "Signed32", "Float32", "String" };
@@ -41,7 +41,7 @@ struct SDevice {
// Data parameters of devices
struct SDeviceParam {
char * Name;
EDataType DataType;
EMBDataType DataType;
bool Scan;
TChannel * EventChannel;
@@ -182,7 +182,7 @@ public:
bool DestroyDevice( const char * DeviceName );
// Manage Params
TDeviceParam * AddDeviceParam( TDevice * Device, const char * ParamName, EDataType DataType, int ParamLen = 1 );
TDeviceParam * AddDeviceParam( TDevice * Device, const char * ParamName, EMBDataType DataType, int ParamLen = 1 );
bool DestroyDeviceParam( TDevice * Device, const char * ParamName );
// Update/Init Param values