mirror of
https://github.com/muccc/WomoLIN.git
synced 2026-03-24 17:56:52 +01:00
32 lines
695 B
C++
32 lines
695 B
C++
#pragma once
|
|
|
|
#include "ihal.h"
|
|
|
|
namespace womolin::lib::protocol
|
|
{
|
|
using namespace womolin::lib::interface::hal;
|
|
|
|
class LibProtocol final
|
|
{
|
|
public:
|
|
LibProtocol( ILibSerial & serial );
|
|
~LibProtocol() = default;
|
|
|
|
bool getKeyValue( std::string & key, std::string & value);
|
|
void sendKeyValue( std::string & key, std::string & value);
|
|
|
|
private:
|
|
ILibSerial & serial;
|
|
std::string messageBuffer;
|
|
|
|
|
|
private:
|
|
|
|
static constexpr char STARTBYTE { '^' };
|
|
static constexpr char SEPARATOR { ';' };
|
|
static constexpr char ENDBYTE { '$' };
|
|
static constexpr char LINEBREAK { '\n' };
|
|
};
|
|
}
|
|
|