Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

The code for the CCT DAT interface to the RTEMS shell is located in the rce/shell directory. All interaction with the RTEMS operating system is encapsulated away from the user inside the interface. Portions of the shell have been customized by the CCT DAT group, and these customizations are listed below.

...

...

DAT defined commands

...

Commands are added to the shell either at startup (CCI DAT commands, above) or by the user with addCommand. All CCI DAT and user defined commands are based on the Command class defined in rce/shell/Command.hh. The public interface to Command is:

...

Code Block
#include "rce/shell/Command.hh"
namespace FOO {
  using RCE::Shell::Command;
  class NewCommand : public Command {
  public:
    NewCommand();
    virtual ~NewCommand() {}    
    virtual std::string usage();
    virtual MainFunc main();
  };

  int NewCommand_main(int argc, char** argv) {
    printf("This is a test of the new command\n");
    return 0;
  }

  NewCommand::NewCommand() : Command("newCommand", "misc") {}
  
  std::string NewCommand::usage() {
    static std::string u = "  newCommand     # Do nothing but print a message\n";
    return u;
  }

  Command::MainFunc NewCommand::main() {
    return NewCommand_main;
  }
}

...