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:
@@ -17,7 +17,7 @@
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
extern char ProcessName[];
|
||||
extern char * ProcessName;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
@@ -33,8 +33,12 @@ CFunctionCore::CFunctionCore( const char * FunctionName, CLogCore * pLog, EDebug
|
||||
Name = NULL;
|
||||
}
|
||||
|
||||
// Data Tree
|
||||
DataTree = NULL;
|
||||
BaseMember = NULL;
|
||||
|
||||
// Channels
|
||||
FirstChannel = NULL;
|
||||
FirstChannel = NULL;
|
||||
|
||||
// Output
|
||||
Log = pLog;
|
||||
@@ -92,7 +96,17 @@ CFunctionCore::~CFunctionCore()
|
||||
if (Name) {
|
||||
free( Name );
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
bool CFunctionCore::LoadConfig( CDataTree * pDataTree, const char * pBasePath )
|
||||
{
|
||||
if (!(DataTree = pDataTree))
|
||||
return false;
|
||||
if (!(BaseMember = DataTree->GetMember( NULL, pBasePath, true )))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user