cmRtSys.h/c: Added cmRtNet-IsInitialized(),-DoSync(),-Report().

This commit is contained in:
kpl 2013-04-30 12:41:44 -07:00
parent e8e3f189ed
commit fada2cfcdb
2 changed files with 44 additions and 0 deletions

View File

@ -1232,6 +1232,46 @@ unsigned cmRtSysSubSystemCount( cmRtSysH_t h )
return p->ssCnt;
}
bool cmRtSysNetIsInitialized( cmRtSysH_t h )
{
cmRt_t* p = _cmRtHandleToPtr(h);
unsigned i = 0;
for(; i<p->ssCnt; ++i)
if( cmRtNetIsInitialized(p->ssArray[i].netH) )
return true;
return false;
}
cmRtRC_t cmRtSysNetDoSync( cmRtSysH_t h )
{
cmRtRC_t rc = kOkRtRC;
cmRt_t* p = _cmRtHandleToPtr(h);
unsigned i = 0;
for(; i<p->ssCnt; ++i)
if( cmRtNetIsInitialized(p->ssArray[i].netH) )
cmRtNetDoSync(p->ssArray[i].netH);
return rc;
}
cmRtRC_t cmRtSysNetReport( cmRtSysH_t h )
{
cmRtRC_t rc = kOkRtRC;
cmRt_t* p = _cmRtHandleToPtr(h);
unsigned i = 0;
for(; i<p->ssCnt; ++i)
{
cmRptPrintf(p->err.rpt,"Sub-system:%i\n",i);
if( cmRtNetIsValid(p->ssArray[i].netH))
cmRtNetDoSync(p->ssArray[i].netH);
}
return rc;
}
//===========================================================================================================================
//
// cmRtTest()

View File

@ -319,6 +319,10 @@ extern "C" {
// Audio system test and example function.
void cmRtSysTest( cmCtx_t* ctx, int argc, const char* argv[] );
bool cmRtSysNetIsInitialized( cmRtSysH_t h );
cmRtRC_t cmRtSysNetDoSync( cmRtSysH_t h );
cmRtRC_t cmRtSysNetReport( cmRtSysH_t h );
#ifdef __cplusplus