weAut_01 / weAutSys    R 2.2.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines
Data Fields
appCLIreg_t Struct Reference

Data Fields

p2ptFunA fun
 The user CLI thread's function (pointer to)
char const *const * userCommands
 Array of the (flash) user software command definitions.

Detailed Description

The user / application CLI registration type.


Field Documentation

The user CLI thread's function (pointer to)

The function pointed to must implement a user / application thread (behaviour) according to all Protothreads and weAutSys rules therefore.

This being NULL means there is no user command line interpreter (CLI).

char const* const* userCommands

Array of the (flash) user software command definitions.

This flash array of flash texts must be defined and initialised by user / application software. It may be initialised as NULL if the user software chooses to define / implement no own CLI commands.

Otherwise helpUserCm[] should be the first entry followed by (flash text) command definitions. The last entry must always be NULL like in the example:

  char* userCommands[]) = { helpUserCm, // 0 no command just separator
      comADinputs, comADoff, // 1 2     + INDEX_OFFSET_LIST2
      comDiscoBun, comDemCount, // 3 4  + INDEX_OFFSET_LIST2
      NULL};  

Index 0 (the first entry) will never be used or executed as command. It is to be used as the user commands headline for help (command list) output.

It is also essential that all command definitions made by user software are in flash memory (by INFLASH macro) the example:

  INFLASH(char const comDiscoBun[]) = "discoBunny [t/10ms] Demo is disco lights \n";
  INFLASH(char const comDemCount[]) = "countDemo  [t/10ms] Demo is DO count     \n";
See also:
INDEX_OFFSET_LIST2
FOLLOW_UP

The documentation for this struct was generated from the following file: