Browse Source

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

master
kpl 11 years ago
parent
commit
fada2cfcdb
2 changed files with 44 additions and 0 deletions
  1. 40
    0
      cmRtSys.c
  2. 4
    0
      cmRtSys.h

+ 40
- 0
cmRtSys.c View File

@@ -1232,6 +1232,46 @@ unsigned cmRtSysSubSystemCount( cmRtSysH_t h )
1232 1232
   return p->ssCnt;
1233 1233
 }
1234 1234
 
1235
+  
1236
+bool     cmRtSysNetIsInitialized( cmRtSysH_t h )
1237
+{
1238
+  cmRt_t* p = _cmRtHandleToPtr(h);
1239
+  unsigned i = 0;
1240
+  for(; i<p->ssCnt; ++i)
1241
+    if( cmRtNetIsInitialized(p->ssArray[i].netH) )
1242
+      return true;
1243
+  return false;
1244
+}
1245
+
1246
+
1247
+cmRtRC_t cmRtSysNetDoSync( cmRtSysH_t h )
1248
+{
1249
+  cmRtRC_t rc = kOkRtRC;
1250
+  cmRt_t*  p  = _cmRtHandleToPtr(h);
1251
+  unsigned i  = 0;
1252
+  for(; i<p->ssCnt; ++i)
1253
+    if( cmRtNetIsInitialized(p->ssArray[i].netH) )
1254
+      cmRtNetDoSync(p->ssArray[i].netH);
1255
+
1256
+  return rc;
1257
+}
1258
+
1259
+cmRtRC_t cmRtSysNetReport( cmRtSysH_t h )
1260
+{
1261
+  cmRtRC_t rc = kOkRtRC;
1262
+  cmRt_t*  p  = _cmRtHandleToPtr(h);
1263
+  unsigned i  = 0;
1264
+  for(; i<p->ssCnt; ++i)
1265
+  {
1266
+    cmRptPrintf(p->err.rpt,"Sub-system:%i\n",i);
1267
+    if( cmRtNetIsValid(p->ssArray[i].netH))
1268
+      cmRtNetDoSync(p->ssArray[i].netH);
1269
+  }
1270
+  return rc;
1271
+  
1272
+}
1273
+
1274
+
1235 1275
 //===========================================================================================================================
1236 1276
 //
1237 1277
 //  cmRtTest()

+ 4
- 0
cmRtSys.h View File

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

Loading…
Cancel
Save