KM3NeT CLB
2.0
KM3NeT CLB v2 Embedded Software
|
How to do it:
transp
.shell/shell_transp.c
, and this to the Makefile SRC. You do not need to create the corresponding header file. The Makefile is located in the build directory.help
command: cfg/cfg_shell.h
, always surrounded by X()
.Don't forget to escape the MACRO when using multiple lines (trailing backslashes): help
command will even bring up the transp command including the short description. However, starting the transp
command directly won't do anything. The next step is to implement it.Implementing the function is simple:
argc
is the number of argument after the transp command. i.e. transp status
will result in argc
being 1, and transp with no arguments will result in it being 0.argv
is an array [0 : argc - 1] of strings , and will contain an entry for every argument. In the above case argc[0]
will contain 'status
'.Example implementation of the StarTrek transporter: