Important update:
- DataTreeCore:
- Renamed Get/SetMemXxx() methods to Get/SetChXxx()
- Renamed GetMember() to GetChild()
- Updated: JSONparse, ApplicationCore, FunctionCore, SelectableCore,
and WatchdogCore
- Remove unused PrevChild & Last vars in GetChild (GetMember)
- JSONparseCore:
- Use return values from write() and PrintXxx() methods to report fail
- SelectableCore:
- Fix possible uninitialised FlowCtrl & Parity value
- DateTimeCore:
- Fix possible memory overrun in temp buffer
- EventBufferCore:
- Fix possible uninitialised value error in AddEvent
This commit is contained in:
@@ -120,7 +120,7 @@ bool CFunctionCore::LoadConfigData()
|
||||
|
||||
// Get debug level
|
||||
pLogLevel = dlNone;
|
||||
TempStr = (char*)ConfigMember->GetMemStr( "Log/Level", "Medium", true );
|
||||
TempStr = (char*)ConfigMember->GetChStr( "Log/Level", "Medium", true );
|
||||
if (TempStr)
|
||||
{
|
||||
if (!strcasecmp( TempStr, "Low" ))
|
||||
@@ -133,7 +133,7 @@ bool CFunctionCore::LoadConfigData()
|
||||
|
||||
// Set debug output
|
||||
pLogOutput = 0;
|
||||
if ((TempMember = ConfigMember->GetMember( "Log/Output", true )))
|
||||
if ((TempMember = ConfigMember->GetChild( "Log/Output", true )))
|
||||
{
|
||||
TempMember = TempMember->GetFirstChild();
|
||||
while (TempMember)
|
||||
@@ -163,13 +163,13 @@ bool CFunctionCore::LoadConfigData()
|
||||
SetLogParam( pLogLevel, pLogOutput );
|
||||
|
||||
// Load Channels
|
||||
TempMember = ConfigMember->GetMemFirstChild( "Channels" );
|
||||
TempMember = ConfigMember->GetChFirstChild( "Channels" );
|
||||
while (TempMember)
|
||||
{
|
||||
if (TempMember->GetName()) {
|
||||
AddChannel( TempMember->GetName(),
|
||||
TempMember->GetMemBool( "InputEnabled", true, true ),
|
||||
TempMember->GetMemBool( "OutputEnabled", false, true ));
|
||||
TempMember->GetChBool( "InputEnabled", true, true ),
|
||||
TempMember->GetChBool( "OutputEnabled", false, true ));
|
||||
}
|
||||
|
||||
// Next
|
||||
@@ -197,9 +197,9 @@ bool CFunctionCore::LoadChannelLinkData()
|
||||
{
|
||||
// Get Parameters
|
||||
LinkOutputChannel( Channel->Name,
|
||||
FunctionMember->GetMemStr( "Function" ),
|
||||
FunctionMember->GetMemStr( "Channel" ),
|
||||
FunctionMember->GetMemBool( "Bidirectional" ) );
|
||||
FunctionMember->GetChStr( "Function" ),
|
||||
FunctionMember->GetChStr( "Channel" ),
|
||||
FunctionMember->GetChBool( "Bidirectional" ) );
|
||||
// Next
|
||||
FunctionMember = FunctionMember->GetNextPeer();
|
||||
}
|
||||
@@ -224,7 +224,7 @@ bool CFunctionCore::Init()
|
||||
bool CFunctionCore::InitConfig( const char * pConfigPath )
|
||||
{
|
||||
// Validate
|
||||
if (!DataTree || !(ConfigMember = DataTree->GetMember( pConfigPath, true )))
|
||||
if (!DataTree || !(ConfigMember = DataTree->GetChild( pConfigPath, true )))
|
||||
return false;
|
||||
|
||||
// Load configuration
|
||||
@@ -252,7 +252,7 @@ bool CFunctionCore::InitConfig( CDataMember * pBaseMember )
|
||||
bool CFunctionCore::InitChannelLinks( const char * pLinkConfigPath )
|
||||
{
|
||||
// Validate
|
||||
if (!DataTree || !(LinkConfigMember = DataTree->GetMember( pLinkConfigPath, true )))
|
||||
if (!DataTree || !(LinkConfigMember = DataTree->GetChild( pLinkConfigPath, true )))
|
||||
return false;
|
||||
|
||||
// Load configuration
|
||||
|
||||
Reference in New Issue
Block a user