#ifndef __THER_COM_HPP__ #define __THER_COM_HPP__ #include #include #include #include namespace ther { template class Com { public: enum Addr : uint8_t { TEMP = 0, GET_ID, RUNNING_STATE }; using CbTableValueType = std::pair; static auto Init() -> zpp::error { s_proto->SetRxCallbackTable({GET_ID, Cb::GetId}, {RUNNING_STATE, Cb::RunningState}); return zpp::ok(); } private: struct Cb { static auto GetId(uart_com::DataType data) -> void { // TODO } static auto RunningState(uart_com::DataType data) -> void { // TODO } }; constexpr static uart_com::SimpleProtocal *s_proto = (uart_com::SimpleProtocal *)(kDev); }; } // namespace ther #endif