73 keywordLen_( NULL == altName ? 0 : strlen( altName ) )
116 fprintf( out,
"<commandName>" );
119 fprintf( out,
"<componentName>" );
122 fprintf( out,
"<configDir>" );
125 fprintf( out,
"<configVariable>" );
128 fprintf( out,
"<decimationType>" );
131 fprintf( out,
"<number>" );
134 fprintf( out,
"<integer>" );
140 fprintf( out,
"<missionPath>" );
143 fprintf( out,
"<\"quotedString\">" );
146 fprintf( out,
"<regularExpression>" );
149 fprintf( out,
"<#seconds>" );
152 fprintf( out,
"<serviceType>" );
155 fprintf( out,
"<anyString>" );
158 fprintf( out,
"<timestamp>" );
161 fprintf( out,
"<anyWord>" );
164 fprintf( out,
"<unit>" );
167 fprintf( out,
"<universal>" );
170 fprintf( out,
"<variable>" );
214 int required = currentArgs;
215 for(
unsigned int i = required; i <
args_.
size(); ++i )
251 void help(
const char* keyword, FILE* out )
const
253 fprintf( out,
"%s\n ",
help_ );
254 fprintf( out,
"%s", keyword );
267 && ( i + 1 >= argCount_
268 || ( i + 1 < argCount_
274 fprintf( out,
"\n" );
295 Command(
const char* keyword,
const char* description,
bool advanced )
343 void help(
bool full, FILE* out )
const
616 MatchType matchKeyword(
const char* keyword,
int keywordLen,
int synArgIndex,
const char *buffer,
int len );
Client-side interface for injecting log data into the log queue.
Definition: Logger.h:30
const T & get(int index=-1) const
Definition: FlexArray.h:134
const Str & getStringArg() const
Definition: Command.h:478
const UniversalURI * getUniversalArg() const
Definition: Command.h:523
Str missionArg_
Definition: Command.h:563
void help(bool full, FILE *out) const
Definition: Command.h:343
Command & addArg(CommandArg *arg)
Definition: Command.h:310
int keywordLen_
Definition: Command.h:360
Contains the DecimationLogWriter class definition.
bool parseBufferEnd(FlexArray< Command * > &commands, const char *buffer, int index)
If the last word in buffer is a valid arg, deal with it.
Definition: Command.cpp:162
int getArgCount() const
Definition: Command.h:229
#define MAX_ARGS
Definition: Command.h:20
int integerArg_
Definition: Command.h:567
int argCount_
Definition: Command.h:279
const RequiredType required_
Definition: Command.h:177
Str toString()
Definition: Command.cpp:272
MatchType matchInteger(int synArgIndex, const char *buffer, int len)
Definition: Command.cpp:784
const Command * getCommand() const
Definition: Command.h:438
RequiredType
Definition: Command.h:46
const char * getKeyword()
Definition: Command.h:327
int syntaxCount_
Definition: Command.h:356
int getRequiredArgSize(unsigned int currentArgs)
Definition: Command.h:208
CommandArg * getArg(int index) const
Definition: Command.h:204
MatchType matchCommand(FlexArray< Command * > &commands, Command *&command, int synArgIndex, const char *buffer, int len)
Report if a command name matches the supplied arg.
Definition: Command.cpp:476
const int getKeywordLen()
Definition: Command.h:331
void push(T item)
Definition: FlexArray.h:160
int getIntegerArg() const
Definition: Command.h:498
bool equals(CommandArg *commandArg) const
Definition: Command.h:91
float getNumberArg() const
Definition: Command.h:503
int argStart_[MAX_ARGS]
Definition: Command.h:550
const Unit * getUnitArg() const
Definition: Command.h:518
const Str & getRegexArg() const
Definition: Command.h:493
const CodedStr * componentArg_
Definition: Command.h:560
RequiredType getRequired() const
Definition: Command.h:87
Definition: Command.h:376
MatchType matchUniversal(int synArgIndex, const char *buffer, int len)
Definition: Command.cpp:1082
MatchType matchServiceType(int synArgIndex, const char *buffer, int len)
Definition: Command.cpp:933
const UniversalURI * universalArg_
Definition: Command.h:572
int mode_
Definition: Command.h:282
FlexArray< CommandSyntax * > syntaxes_
Definition: Command.h:355
const char * description_
Definition: Command.h:358
const Str & getTokenArg() const
Definition: Command.h:513
void help(const char *keyword, FILE *out) const
Definition: Command.h:251
const DecimationLogWriter::DecimationType getDecimationTypeArg() const
Definition: Command.h:463
void execute(Logger &logger)
Definition: Command.cpp:251
bool completeCommand(FlexArray< Command * > &commands, CommandLine *commandLine, const char *buffer, int len)
Definition: Command.cpp:540
const Timestamp & getTimestampArg() const
Definition: Command.h:508
const CommandSyntax * getSyntax() const
Definition: Command.h:443
FlexArray< CommandArg * > args_
Definition: Command.h:278
Str regexArg_
Definition: Command.h:566
MatchType matchArg(FlexArray< Command * > &commands, const CommandArg *arg, int argIndex, const char *buffer, int len)
Definition: Command.cpp:389
int getArgCount()
Returns the parsed arg count.
Definition: Command.h:382
MatchType matchConfigSubDir(const Str &subDir, int synArgIndex, const char *buffer, int len)
Definition: Command.cpp:651
int getStart()
Returns first argStart.
Definition: Command.h:397
MatchType matchToken(int synArgIndex, const char *buffer, int len)
Definition: Command.cpp:1049
Code unit that represents a unique name for a measured quantity.
Definition: UniversalURI.h:29
void clearTopArg()
Clears the top arg on the stack.
Definition: Command.cpp:129
Provides a simple command line interface to the LRAUV.
Definition: CommandLine.h:38
Extends the Str class, adding an unsigned short code (actually, the codes are limited to 14 bits...
Definition: CodedStr.h:23
Contains the FlexArrayBase and FlexArray class declarations.
MatchType matchSeconds(int synArgIndex, const char *buffer, int len)
Definition: Command.cpp:910
const CommandArgType argType_
Definition: Command.h:175
ServiceType
Definition: LogWriter.h:29
CommandArgType getArgType() const
Definition: Command.h:75
CommandSyntax * getAltSyntax()
Definition: Command.h:240
int keywordLen_
Definition: Command.h:178
CommandSyntax * altSyntax_
Definition: Command.h:284
void(* syntaxCall_)(ParsedCommand *, int)
Definition: Command.h:281
unsigned int size() const
Definition: FlexArray.cpp:69
MatchType matchConfigDir(int synArgIndex, const char *buffer, int len)
Definition: Command.cpp:614
Command & addArg(const char *keyword, const RequiredType required=REQUIRED)
Definition: Command.h:319
void setStringArg(const Str &stringArg)
Definition: Command.h:488
Str configDirArg_
Definition: Command.h:561
DecimationType
Definition: DecimationLogWriter.h:26
const Unit * unitArg_
Definition: Command.h:571
MatchType matchUnit(int synArgIndex, const char *buffer, int len)
Definition: Command.cpp:1059
const Command * getCommandArg() const
Definition: Command.h:448
bool advanced_
Definition: Command.h:359
MatchType matchComponent(int synArgIndex, const char *buffer, int len)
Definition: Command.cpp:576
Replacement for standard template class string.
Definition: Str.h:12
CommandArg(const CommandArgType argType, const RequiredType required, const char *altName=NULL)
Definition: Command.h:69
const ElementURI * getVariableArg() const
Definition: Command.h:528
const char * keyword_
Definition: Command.h:357
MatchType
Definition: Command.h:53
CommandSyntax * getSyntax(int index)
Definition: Command.h:335
LogWriter::ServiceType serviceTypeArg_
Definition: Command.h:564
MatchType matchDecimationType(int synArgIndex, const char *buffer, int len)
Definition: Command.cpp:728
Command & addSyntax(const char *syntaxHelp, void(*syntaxCall)(ParsedCommand *, int), const int mode=0)
Definition: Command.h:303
MatchType matchFloat(int synArgIndex, const char *buffer, int len)
Definition: Command.cpp:742
Command * command_
Definition: Command.h:556
void setStart(int start)
Sets first argStart.
Definition: Command.h:403
MatchType matchMission(int synArgIndex, const char *buffer, int len)
Definition: Command.cpp:815
Command * commandArg_
Definition: Command.h:558
MatchType matchTimestamp(int synArgIndex, const char *buffer, int len)
Definition: Command.cpp:958
MatchType argMatch_[MAX_ARGS]
Definition: Command.h:553
MatchType matchString(int synArgIndex, const char *buffer, int len)
Definition: Command.cpp:948
int getArgStart(int index)
Returns argStart at the specified index Negative indices count backwards from the top...
Definition: Command.h:410
MatchType matchVariable(int synArgIndex, const char *buffer, int len)
Definition: Command.cpp:1114
void call(ParsedCommand *parsedCommand)
Definition: Command.h:234
const Str & getConfigDirArg() const
Definition: Command.h:458
Definition: Command.h:188
CommandSyntax(const char *help, void(*syntaxCall)(ParsedCommand *, int), const int mode)
Definition: Command.h:191
Contains the Logger class definition.
const char * keyword_
Definition: Command.h:176
MatchType matchUnique(int synArgIndex, CommandArgType argType)
Definition: Command.cpp:468
MatchType matchKeyword(const char *keyword, int keywordLen, int synArgIndex, const char *buffer, int len)
Definition: Command.cpp:805
const ElementURI * variableArg_
Definition: Command.h:573
bool hasArgIndex(int argIndex)
Definition: Command.cpp:372
const LogWriter::ServiceType getServiceTypeArg() const
Definition: Command.h:473
int getSyntaxCount()
Definition: Command.h:339
void undefTopArg()
Undefine top arg on the stack.
Definition: Command.cpp:60
void implySyntax()
If the last word in buffer is a valid arg, deal with it.
Definition: Command.cpp:1301
int argLen_[MAX_ARGS]
Definition: Command.h:552
bool syntaxOk()
Definition: Command.cpp:1323
DecimationLogWriter::DecimationType decimationTypeArg_
Definition: Command.h:562
bool completeArg(FlexArray< Command * > &commands, CommandLine *commandLine, const char *buffer, int index)
Definition: Command.cpp:238
ParsedCommand()
Definition: Command.cpp:26
Definition: Command.h:292
MatchType matchConfigVariable(int synArgIndex, const char *buffer, int len)
Definition: Command.cpp:695
int start_
Definition: Command.h:548
CommandArgType argType_[MAX_ARGS]
Definition: Command.h:554
int argCount_
Definition: Command.h:549
Command(const char *keyword, const char *description, bool advanced)
Definition: Command.h:295
CommandArg(const char *keyword, const RequiredType required)
Definition: Command.h:63
Str tokenArg_
Definition: Command.h:570
float numberArg_
Definition: Command.h:568
bool findArg(FlexArray< Command * > &commands, const char *buffer, int len)
Report if a valid arg matches the supplied arg.
Definition: Command.cpp:1148
const char * help_
Definition: Command.h:280
Command & addArg(const CommandArgType argType, const RequiredType required=REQUIRED, const char *altName=NULL)
Definition: Command.h:323
const CodedStr * getComponentArg() const
Definition: Command.h:453
Code unit that represents a unique name for a DataElement.
Definition: ElementURI.h:27
void help(FILE *out) const
Definition: Command.h:104
Str stringArg_
Definition: Command.h:565
void addArg(CommandArg *arg)
Definition: Command.h:199
const char * getKeyword() const
Definition: Command.h:79
MatchType matchRegex(int synArgIndex, const char *buffer, int len)
Definition: Command.cpp:904
int argIndex_[MAX_ARGS]
Definition: Command.h:551
MatchType orMatch(MatchType mt1, MatchType mt2)
Definition: Command.h:584
MatchType matchQuotedString(int synArgIndex, const char *buffer, int len)
Definition: Command.cpp:883
void clearAll()
Clears everything.
Definition: Command.cpp:153
CommandArgType getCurrentArgType()
Definition: Command.cpp:384
Code that represents an engineering unit.
Definition: Unit.h:24
const Str & getMissionArg() const
Definition: Command.h:468
const int getKeywordLen() const
Definition: Command.h:83
int getArgLen(int index)
Returns argLen at the specified index Negative indices count backwards from the top.
Definition: Command.h:425
bool inQuotedString_
Definition: Command.h:574
void setAltSyntax(CommandSyntax *altSyntax)
Definition: Command.h:246
Timestamp timestampArg_
Definition: Command.h:569
Represents absolute times.
Definition: Timestamp.h:31
CommandArg * currentArg_
Definition: Command.h:559
CommandArgType
Definition: Command.h:22
CommandSyntax * syntax_
Definition: Command.h:557
const bool isInQuotedString() const
Definition: Command.h:483
T peek(int index=-1)
Definition: FlexArray.h:165