From fada2cfcdb421a64f361fc7d606928ef4d179e60 Mon Sep 17 00:00:00 2001 From: kpl Date: Tue, 30 Apr 2013 12:41:44 -0700 Subject: [PATCH] cmRtSys.h/c: Added cmRtNet-IsInitialized(),-DoSync(),-Report(). --- cmRtSys.c | 40 ++++++++++++++++++++++++++++++++++++++++ cmRtSys.h | 4 ++++ 2 files changed, 44 insertions(+) diff --git a/cmRtSys.c b/cmRtSys.c index 348f484..5aee4b0 100644 --- a/cmRtSys.c +++ b/cmRtSys.c @@ -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(; issCnt; ++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(; issCnt; ++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(; issCnt; ++i) + { + cmRptPrintf(p->err.rpt,"Sub-system:%i\n",i); + if( cmRtNetIsValid(p->ssArray[i].netH)) + cmRtNetDoSync(p->ssArray[i].netH); + } + return rc; + +} + + //=========================================================================================================================== // // cmRtTest() diff --git a/cmRtSys.h b/cmRtSys.h index 2c09c40..de1231c 100644 --- a/cmRtSys.h +++ b/cmRtSys.h @@ -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