lacteApp
C++17 service for Lacte hardware
Loading...
Searching...
No Matches
AppRuntime.hpp File Reference

Собственные типы runtime-полей платы и кортеж RuntimeFields, называющий весь набор - и ничего больше. More...

#include <string>
#include <string_view>
#include <tuple>
#include "protocols/lacte/LacteProtocol.hpp"
Include dependency graph for AppRuntime.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  SoftVersion
struct  BoardOnlineStatus

Typedefs

using RuntimeFields

Functions

auto to_string (const SoftVersion &version) -> std::string
auto to_string (const BoardOnlineStatus &status) -> std::string

Detailed Description

Собственные типы runtime-полей платы и кортеж RuntimeFields, называющий весь набор - и ничего больше.

Здесь намеренно не предполагается, что insitech::runtime::Runtime существует как конкретная инстанциация, или что что-либо (ConsoleApp<LacteApp, ..., RuntimeFields>, Model) владеет им/ссылается на него - это уже монтаж (wiring), а не поле платы. LacteApp.hpp передаёт RuntimeFields напрямую в качестве шаблонного аргумента RuntimeFieldsTuple у ConsoleApp; Model.h строит свои собственные алиасы LacteRuntime/BoardData локально из RuntimeFields, так как именно там нужно явно назвать insitech::runtime::Runtime<RuntimeFields> конкретным типом.

Definition in file AppRuntime.hpp.

Typedef Documentation

◆ RuntimeFields

Initial value:
std::tuple<BoardOnlineStatus, proto::lacte::InfoPacketType,
proto::lacte::BoardErrorDiff, proto::lacte::VersionPacketType,
proto::lacte::UIDPacketType, proto::lacte::RFIDNumberType,
proto::lacte::MagicWord, proto::lacte::LacteId,
proto::lacte::LacteSn, proto::lacte::ProductVolume,
proto::lacte::ProdDate, proto::lacte::ProductShelfLife,
proto::lacte::UsageTime, proto::lacte::McuUid,
proto::lacte::MachineSn, proto::lacte::ActivationTime,
proto::lacte::MilkCounter, proto::lacte::TimeCounter,
SoftVersion, proto::lacte::AerationParam>

Definition at line 68 of file AppRuntime.hpp.

Function Documentation

◆ to_string() [1/2]

auto to_string ( const BoardOnlineStatus & status) -> std::string
inline

Definition at line 60 of file AppRuntime.hpp.

◆ to_string() [2/2]

auto to_string ( const SoftVersion & version) -> std::string
inline

Definition at line 36 of file AppRuntime.hpp.