25#include <wx/cmdline.h>
39 _(
"displays help on the command line parameters" ).mb_str(),
41 wxCMD_LINE_OPTION_HELP,
47 _(
"Max number of iterations" ).mb_str(),
48 wxCMD_LINE_VAL_NUMBER,
49 wxCMD_LINE_PARAM_OPTIONAL,
55 _(
"execute log up to steps-limit events" ).mb_str(),
56 wxCMD_LINE_VAL_NUMBER,
57 wxCMD_LINE_PARAM_OPTIONAL,
63 _(
"log file name (no extensions)" ).mb_str(),
64 wxCMD_LINE_VAL_STRING,
65 wxCMD_LINE_PARAM_OPTIONAL,
72 wxCmdLineParser cl_parser( argc, argv );
74 cl_parser.AddUsageText(
75 _(
"PNS Log (Re)player. Allows to step through the log written by the ROUTER_TOOL "
76 "in debug KiCad builds." ) );
78 int cmd_parsed_ok = cl_parser.Parse();
80 if( cl_parser.Found(
"help") )
85 if( cmd_parsed_ok != 0 )
87 printf(
"P&S Log Replay/Debug tool. For command line options, call %s -h.\n\n", argv[0] );
93 long iter_limit = 256;
94 long steps_limit = -1;
95 cl_parser.Found(
"iteration-limit", &iter_limit );
96 cl_parser.Found(
"steps-limit", &steps_limit );
101 if( cl_parser.GetParamCount() > 0 )
103 frame->LoadLogFile( cl_parser.GetParam( 0 ) );
static bool Register(const KI_TEST::UTILITY_PROGRAM &aProgInfo)
Register a utility program factory function against an ID string.
@ BAD_CMDLINE
The command line was not correct for the tool.
static const wxCmdLineEntryDesc g_cmdLineDesc[]
int replay_main_func(int argc, char *argv[])