Skip to content

Namespace Uploader

Namespace List > Uploader

Classes

Type Name
struct Io
How the uploader reaches the client and PanelBridge .

Public Functions

Type Name
void begin (const Io & io)
Install the callbacks. Call once from SimGateway::setup() .
bool busy ()
An upload session is open or a flash runs — the calibration session must answer BUSY.
bool handles (uint8_t type)
True for the CAL_T_UPL_* request types the uploader answers.
bool onBridgeLine (const char * line, uint16_t len, uint32_t now)
void onClientFrame (uint32_t now)
Any verified client frame (KEEPALIVE included): the client is still there.
void onFrame (uint8_t type, uint8_t seq, const uint8_t * p, uint16_t len, uint32_t now)
A verified client frame of one of those types.
void onUartByte (uint8_t c, uint32_t now)
bool ownsUart ()
A flash runs: the uploader writes the UART, so the client's export bytes must be dropped.
bool ownsUartRx ()
void tick (uint32_t now)
Advance the flash. Call every loop().

Public Functions Documentation

function begin

Install the callbacks. Call once from SimGateway::setup() .

void Uploader::begin (
    const Io & io
) 


function busy

An upload session is open or a flash runs — the calibration session must answer BUSY.

bool Uploader::busy () 


function handles

True for the CAL_T_UPL_* request types the uploader answers.

bool Uploader::handles (
    uint8_t type
) 


function onBridgeLine

bool Uploader::onBridgeLine (
    const char * line,
    uint16_t len,
    uint32_t now
) 

A complete line from PanelBridge (without the ' '). Returns true when the line must not be relayed to the client — _BOOT_RSP while the uploader itself is flashing.


function onClientFrame

Any verified client frame (KEEPALIVE included): the client is still there.

void Uploader::onClientFrame (
    uint32_t now
) 


function onFrame

A verified client frame of one of those types.

void Uploader::onFrame (
    uint8_t type,
    uint8_t seq,
    const uint8_t * p,
    uint16_t len,
    uint32_t now
) 


function onUartByte

void Uploader::onUartByte (
    uint8_t c,
    uint32_t now
) 

function ownsUart

A flash runs: the uploader writes the UART, so the client's export bytes must be dropped.

bool Uploader::ownsUart () 


function ownsUartRx

bool Uploader::ownsUartRx () 

Flashing the bridge (#367): its bootloader answers on the UART in its own framing, so every byte PanelBridge sends goes to onUartByte() instead of the line / HID parser — until the bridge reboots.


function tick

Advance the flash. Call every loop().

void Uploader::tick (
    uint32_t now
) 



The documentation for this class was generated from the following file Firmware/Libraries/SimGateway/Uploader.cpp