cwFlowCross.cpp,cwFlowTest.cpp : Split flow::create() into flow::create() and flow::initialize().
This commit is contained in:
parent
607447e84c
commit
674885d7e4
@ -146,12 +146,17 @@ namespace cw
|
||||
net->deviceN = 0;
|
||||
net->stateId = net_idx == 0 ? kActiveStateId : kInactiveStateId;
|
||||
net->net_idx = net_idx;
|
||||
|
||||
if((rc = flow::create( net->flowH, &classCfg, &networkCfg, nullptr, nullptr )) == kOkRC )
|
||||
{
|
||||
rc = cwLogError(rc,"Flow cross index %i network create failed.",net_idx);
|
||||
}
|
||||
|
||||
if((rc = flow::create( net->flowH, &classCfg, &networkCfg, nullptr, nullptr, net->deviceA, deviceN )) == kOkRC )
|
||||
if((rc = flow::initialize( net->flowH, net->deviceA, deviceN )) == kOkRC )
|
||||
net->deviceN = deviceN;
|
||||
else
|
||||
{
|
||||
cwLogError(rc,"Flow cross index %i network created failed.",net_idx);
|
||||
cwLogError(rc,"Flow cross index %i network initialize failed.",net_idx);
|
||||
goto errLabel;
|
||||
}
|
||||
|
||||
|
@ -54,10 +54,17 @@ cw::rc_t cw::flow::test( const test::test_args_t& args )
|
||||
// create the flow object
|
||||
if((rc = create( flowH, class_cfg, args.test_args, subnet_cfg, args.out_dir)) != kOkRC )
|
||||
{
|
||||
rc = cwLogError(rc,"Flow object create failed.");
|
||||
rc = cwLogError(rc,"Flow object configure failed.");
|
||||
goto errLabel;
|
||||
}
|
||||
|
||||
// create the flow object
|
||||
if((rc = initialize( flowH )) != kOkRC )
|
||||
{
|
||||
rc = cwLogError(rc,"Flow object create failed.");
|
||||
goto errLabel;
|
||||
}
|
||||
|
||||
// run the network
|
||||
if((rc = exec( flowH )) != kOkRC )
|
||||
rc = cwLogError(rc,"Execution failed.");
|
||||
|
Loading…
Reference in New Issue
Block a user