CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
Loading...
Searching...
No Matches
PluginSerialCommands.cpp File Reference

Serial console commands for managing installed plugins: LIST, INFO, START, STOP, ENABLE, DISABLE, DELETE, UPLOAD. More...

#include "plugin_manager/PluginManager.h"
#include "plugin_manager/PluginStorage.h"
#include "plugin_manager/PluginManifest.h"
#include "serial_cmd/ICommandRegistry.h"
#include "serial_cmd/SubCommand.h"
#include "serial_cmd/Console.h"
#include "serial_cmd/SerialCmd.h"
#include "cdc_core/Raii.h"
#include "cdc_ui/I18n.h"
#include "cdc_log.h"
#include "esp_log.h"
#include "esp_heap_caps.h"
#include "esp_timer.h"
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cstdint>
#include <string>

Go to the source code of this file.

Namespaces

namespace  cdc
namespace  cdc::plugin_manager

Functions

bool cdc::plugin_manager::beginFileReceive (const char *abs_path, size_t size, uint32_t crc)
 Receive a file over USB-CDC into the plugins partition.
void cdc::plugin_manager::registerPluginSerialCommands ()

Variables

static const char * cdc::plugin_manager::TAG = "PLG_CMD"
static const char * cdc::plugin_manager::CMD_MODULE = "plugin_manager"

Detailed Description

Serial console commands for managing installed plugins: LIST, INFO, START, STOP, ENABLE, DISABLE, DELETE, UPLOAD.

Upload uses a chunked protocol with CRC32 per chunk and ACK/NACK retries. While an upload session is active, a line interceptor steals all serial input from the normal command parser until END or ABORT is received.

PLUGIN UPLOAD <id> <total_size> wasm|meta < READY <chunk_idx> <crc32> <hex_bytes> < ACK <chunk_idx> | NACK <chunk_idx> <reason> ... repeat ... END < OK <total_bytes>

Definition in file PluginSerialCommands.cpp.