/** * \page cmd_interior Command Engine, Interior Protocol \section cmd_def_ascii ASCII Command definition and usage

Use the #COMMAND macro to easily create a new terminal command. The first two parameters define the name and usage of the command. The last one defines the name of the parameter struct passed to the command handler function.

Providing the parameter names in the macro has been introduced to make the available variables more transparent than in previous versions.

When a command as invoked, it is passed pointers to the argument string and to a buffer for the response. A size is provided for both buffers. If nothing is written to the response buffer, a positive response "OK" is generated. @see #cmd_args

Example:

@code
COMMAND(test, CMDFLAG_NONE, cmdargs) {
	String_write(cmdargs->response_args, "test");
}
@endcode

will generate a function cmd_test as follows.

@code
void cmd_test(const cmd_args_t cmdargs) {
	String_write(cmdargs->response_args, "test");
}
@endcode
\subsection cmd_ascdocs Documenting

See the documentation page on how to document your commands.

\subsection cmd_ascargs Handling argument strings

Argument strings are ASCII strings that can be either command specific, but are usually a space separated list of strings To handle the latter you should use the provided functions (:Cmd_SplitArgs and :Cmd_GetNextArg) to navigate through the argument list.

\section cmd_def_linker Command Declaration internals

Besides creating the function header each command macro creates a forward declaration which is then needed in the following definition of a command_t in the .commands segment. Because all those command_t entries are put into a special segment, commands can be declared anywhere in the code. This way the command lookup-table is defined.

*/