Namespaces | |
namespace | anonymous_namespace{task_function.cpp} |
Functions | |
SHARED_TASK (task, "mw::zimo::ulf::dcc_ein", intf::usb::rx_task.priority - 1u, APP_CPU_NUM, 100u) | |
std::optional<::dcc::Packet > | receive_dcc_packet () |
Receive DCC packet from senddcc string. | |
void | task_function (void *) |
ULF_DCC_EIN task function. | |
std::optional<::dcc::Packet > mw::zimo::ulf::dcc_ein::receive_dcc_packet | ( | ) |
dcc::Packet | created from senddcc string |
std::nullopt | on timeout |
|
inline |
void mw::zimo::ulf::dcc_ein::task_function | ( | void * | ) |
This task is created by the USB receive task when a DCC_EIN\r
protocol string is received. Once running the task scans the CDC character stream for strings with pattern senddcc([\d0-9a-fA-F]{2})+\r
, converts them to DCC packets and then transmits them to drv::out::tx_message_buffer.
If no further senddcc string is received before the HTTP receive timeout, the USB receive task is created and this task destroys itself.