Skip to content

Debug and integration support for Indicator component using DebugCLI and DbgTrace

License

Notifications You must be signed in to change notification settings

dniklaus/indicator-dbg

Repository files navigation

indicator-dbg

Debug and integration support for Indicator component using DebugCLI and DbgTrace.

This component provides a simple factory creating Indicator objects with a specified name and description.

Integration

#include <Indicator.h>
#include <IndicatorFactory.h>

#include <DbgCliNode.h>
#include <DbgCliTopic.h>

// indicator implementation for built in LED
Indicator* led  = 0;

void setup()
{
  // create DebugCLI root node
  DbgCli_Node::AssignRootNode(new DbgCli_Topic(0, "dbg", "Debug CLI Root Node."));

  // indicator LED
  led = IndicatorFactory::createIndicator("led", "Built in LED.");
  led->assignAdapter(new MyBuiltinLedIndicatorAdapter());
}

Dependencies

The Indicator Dbg component depends on the following components:

  • Indicator - Iindicator providing a generic way to use output pins to indicate a binary state.
  • DebugCLI - Command Line Interface for debugging and testing based on object oriented tree structure.
  • DbgTrace - Debug and Trace Log message system based on trace ports with adjustable levels.

Debug CLI Commands

dbg                      Debug CLI root node
  tr                     Debug Trace Port config access
    <name>               Trace Port for the Indicator object (<name> defined during creation of the Indicator object)
      out                Trace Output config access for the current trace port
        get              Show the assigned Trace Output
        set <outName>    Set a particular Trace Output name
        list             Show all available Trace Output names (& currently selected)
      lvl                Trace Level config access for the current trace port
        get              Show the current trace level
        set <level>      Set a particular trace level
        list             Show all available trace levels (& currenntly selected)
  <name>                 Indicator node access (<name> defined during creation of the Indicator object)
    set [blink|on|off]   Set LED state (Usage: dbg led set [blink|on|off])
    pulse [<duration>]   Send a pulse on LED (Usage: dbg led pulse [pulseLengthMillis (>0)])

About

Debug and integration support for Indicator component using DebugCLI and DbgTrace

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages