cmRtSys.h/c:Changes to reflect new cmRtNet API.

This commit is contained in:
kpl 2013-04-28 15:21:08 -07:00
parent 63bba3ffa7
commit d8e7f5ff22
2 changed files with 10 additions and 12 deletions

View File

@ -634,7 +634,7 @@ cmRtRC_t _cmRtSysEnable( cmRt_t* p, bool enableFl )
{
_cmRtCfg_t* cp = p->ssArray + i;
if( cmRtNetIsValid(cp->netH) )
if( cmRtNetBeginSyncMode(cp->netH) != kOkNetRC )
if( cmRtNetDoSync(cp->netH) != kOkNetRC )
rc = cmErrMsg(&p->err,kNetErrRtRC,"Network Mgr. failed on entering sync mode.");
}
@ -944,16 +944,12 @@ cmRtRC_t cmRtSysCfg( cmRtSysH_t h, const cmRtSysSubSys_t* ss, unsigned rtSubIdx
goto errLabel;
}
// register the local and remote notes
for(j=0; j<ss->netNodeCnt; ++j)
if( cmRtNetInitialize( cp->netH, ss->bcastAddr, ss->localNodeLabel, ss->localIpAddr, ss->localIpPort) != kOkNetRC )
{
cmRtSysNetNode_t* nn = ss->netNodeArray + j;
if( cmRtNetRegisterLocalNode( cp->netH, nn->label, nn->ipAddr, nn->ipPort) != kOkNetRC )
{
rc = _cmRtError(p,kNetErrRtRC,"Network node allocation failed on label:%s addr:%s port:%i.",cmStringNullGuard(nn->label),cmStringNullGuard(nn->ipAddr),nn->ipPort);
goto errLabel;
}
rc = _cmRtError(p,kNetErrRtRC,"Network node initialization failed on label:%s addr:%s port:%i.",cmStringNullGuard(ss->localNodeLabel),cmStringNullGuard(ss->localIpAddr),ss->localIpPort);
goto errLabel;
}
// register the local endpoints
for(j=0; j<ss->endptCnt; ++j)

View File

@ -165,9 +165,11 @@ extern "C" {
{
cmRtSysArgs_t args; // Audio device configuration
cmRtCallback_t cbFunc; // DSP system entry point function.
void* cbDataPtr; // Host provided data for the DSP system callback.
cmRtSysNetNode_t* netNodeArray; // One node must be the local node.
unsigned netNodeCnt; // Count of network nodes or 0 to not use network
void* cbDataPtr; // Host provided data for the DSP system callback.
const cmChar_t* bcastAddr; // Network broadcast address.
const cmChar_t* localNodeLabel; // Network local node address.
const cmChar_t* localIpAddr; // Network local IP address (default:NULL to use any available address)
cmUdpPort_t localIpPort; // Network local socket port address
cmRtSysNetEndpt_t* endptArray; // Local end points
unsigned endptCnt; // Count of local endpoints.
} cmRtSysSubSys_t;