This attribute can be used to easily make a function into a command runnable through the AVR_DevConsole. This can only be used on static void-functions where the parameters are eithe none, a single string or an array of strings. Usage examples: More...
Public Member Functions | |||||||
ConsoleCommand (string command_string, int min_args=0, string description="No description given.") | |||||||
Defines a method as a command vor the AVR_DevConsole.
| |||||||
ConsoleCommand (string command_string, string description) | |||||||
Defines a method as a command vor the AVR_DevConsole.
| |||||||
string | getCommandString () | ||||||
int | getMinArgs () | ||||||
string | getDescription () | ||||||
Private Attributes | |
string | command_string |
string | desc |
int | min_args |
This attribute can be used to easily make a function into a command runnable through the AVR_DevConsole. This can only be used on static void-functions where the parameters are eithe none, a single string or an array of strings. Usage examples:
This will add "run_command" as a command that outputs a hello world message. The second parameter in the constructor provides a description, which the user can see by using the "help" command. Providing a description is not mandatory but recommended.
This examples creates a simple "echo" command, which outputs the first argument given to the command. The second parameter (1), defines the minimum amount of arguments a command requires. Providing less will output a warning message to the user.
This example echoes the second parameter passed. (So the command "echo_second_word hello world" will output "world").
Definition at line 42 of file AVR_Attributes.cs.