diff options
Diffstat (limited to 'src/sim/trex_sim_stateful.cpp')
-rw-r--r-- | src/sim/trex_sim_stateful.cpp | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/sim/trex_sim_stateful.cpp b/src/sim/trex_sim_stateful.cpp index 88698cd1..7546644d 100644 --- a/src/sim/trex_sim_stateful.cpp +++ b/src/sim/trex_sim_stateful.cpp @@ -165,6 +165,24 @@ int load_list_of_cap_files(CParserOption * op){ CFlowGenList fl; fl.Create(); fl.load_from_yaml(op->cfg_file,1); + + if (op->client_cfg_file != "") { + try { + fl.load_client_config_file(op->client_cfg_file); + } catch (const std::runtime_error &e) { + std::cout << "\n*** " << e.what() << "\n\n"; + exit(-1); + } + CGlobalInfo::m_options.preview.set_client_cfg_enable(true); + } + + try { + CGlobalInfo::m_options.verify(); + } catch (const std::runtime_error &e) { + std::cout << "\n*** " << e.what() << "\n\n"; + exit(-1); + } + if ( op->preview.getVMode() >0 ) { fl.DumpCsv(stdout); } @@ -596,5 +614,10 @@ int merge_2_cap_files_sip() { int SimStateful::run() { assert( CMsgIns::Ins()->Create(4) ); - return load_list_of_cap_files(&CGlobalInfo::m_options); + try { + return load_list_of_cap_files(&CGlobalInfo::m_options); + } catch (const std::runtime_error &e) { + std::cout << "\n*** " << e.what() << "\n\n"; + exit(-1); + } } |