Firmware  0.4.1
Loading...
Searching...
No Matches
mw::zimo::ulf::dcc_ein Namespace Reference

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.
 

Function Documentation

◆ receive_dcc_packet()

std::optional<::dcc::Packet > mw::zimo::ulf::dcc_ein::receive_dcc_packet ( )
Return values
dcc::Packetcreated from senddcc string
std::nullopton timeout

◆ SHARED_TASK()

mw::zimo::ulf::dcc_ein::SHARED_TASK ( task ,
"mw::zimo::ulf::dcc_ein" ,
intf::usb::rx_task.priority - 1u,
APP_CPU_NUM ,
100u  )
inline

◆ task_function()

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.