|
CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
|
Public Member Functions | |
| void | setAuthProvider (bool(*authCheck)()) override |
| Sets external authentication status provider. | |
| bool | registerCommand (const Command &cmd) override |
| Registers a command in the dispatch table. | |
| void | unregisterModule (const char *moduleName) override |
| Unregisters all commands belonging to one module. | |
| void | setLineInterceptor (LineInterceptor interceptor) override |
| Sets optional line interceptor for multiline modes. | |
| void | setByteInterceptor (ByteInterceptor interceptor) override |
| ByteInterceptor | getByteInterceptor () const override |
| bool | processCommand (const char *line) override |
| Parses and executes one command line. | |
| void | showHelp () override |
| Prints grouped help for all registered commands. | |
| size_t | getCommandCount () const override |
| Returns count of currently registered commands. | |
| void | setOnCommandExecuted (void(*callback)()) override |
| Sets callback fired after successful command execution. | |
| Public Member Functions inherited from cdc::serial::ICommandRegistry | |
| virtual | ~ICommandRegistry ()=default |
Additional Inherited Members | |
| Public Types inherited from cdc::serial::ICommandRegistry | |
| using | LineInterceptor = bool (*)(const char* line) |
| using | ByteInterceptor = void (*)(uint8_t byte) |
Definition at line 24 of file CommandRegistry.cpp.
|
inlineoverridevirtual |
Reimplemented from cdc::serial::ICommandRegistry.
Definition at line 95 of file CommandRegistry.cpp.
|
inlineoverridevirtual |
Returns count of currently registered commands.
Implements cdc::serial::ICommandRegistry.
Definition at line 219 of file CommandRegistry.cpp.
|
inlineoverridevirtual |
Parses and executes one command line.
| line | Raw command line. |
Implements cdc::serial::ICommandRegistry.
Definition at line 104 of file CommandRegistry.cpp.
References cdc::core::PinManager::instance(), name, and cdc::serial::Console::printf().
|
inlineoverridevirtual |
Registers a command in the dispatch table.
| Plugin command channel | Command descriptor. |
Implements cdc::serial::ICommandRegistry.
Definition at line 40 of file CommandRegistry.cpp.
References LOG_I, LOG_W, cdc::serial::MAX_COMMANDS, cdc::serial::Command::moduleName, cdc::serial::Command::name, name, and TAG.
|
inlineoverridevirtual |
Sets external authentication status provider.
| authCheck | Callback returning current authentication state. |
Implements cdc::serial::ICommandRegistry.
Definition at line 31 of file CommandRegistry.cpp.
|
inlineoverridevirtual |
Set or clear the byte interceptor. While set, line-based parsing is fully bypassed.
Reimplemented from cdc::serial::ICommandRegistry.
Definition at line 91 of file CommandRegistry.cpp.
|
inlineoverridevirtual |
Sets optional line interceptor for multiline modes.
| interceptor | Interceptor callback. |
Reimplemented from cdc::serial::ICommandRegistry.
Definition at line 87 of file CommandRegistry.cpp.
|
inlineoverridevirtual |
Sets callback fired after successful command execution.
| callback | Completion callback. |
Implements cdc::serial::ICommandRegistry.
Definition at line 228 of file CommandRegistry.cpp.
|
inlineoverridevirtual |
Prints grouped help for all registered commands.
Implements cdc::serial::ICommandRegistry.
Definition at line 180 of file CommandRegistry.cpp.
References cdc::serial::Console::flush(), cdc::serial::kSubCommandHeadBufSize, cdc::serial::SubCommand::name, name, and cdc::serial::Console::printf().
|
inlineoverridevirtual |
Unregisters all commands belonging to one module.
| moduleName | Module name key. |
Implements cdc::serial::ICommandRegistry.
Definition at line 64 of file CommandRegistry.cpp.