diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2021-06-07 01:40:32 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2021-12-02 04:05:15 +0300 |
commit | 3aed59276c2b7275603f6da18377b77718948667 (patch) | |
tree | 86816d82ab02b6e4761175d599f5749490706792 /src/protocol/client.h | |
parent | d86ca1e596b094cba101e0e3e6c8cdb71f8116e9 (diff) |
wipp17
Diffstat (limited to 'src/protocol/client.h')
-rw-r--r-- | src/protocol/client.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/protocol/client.h b/src/protocol/client.h new file mode 100644 index 0000000..8ed49aa --- /dev/null +++ b/src/protocol/client.h @@ -0,0 +1,23 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#ifndef INVERTER_TOOLS_PROTOCOL_CLIENT_H +#define INVERTER_TOOLS_PROTOCOL_CLIENT_H + +#include "../voltronic/device.h" +#include "response.h" + +namespace protocol { + +class BaseClient { +private: + std::shared_ptr<voltronic::Device> device_; + +public: + void setDevice(std::shared_ptr<voltronic::Device> device); + virtual std::shared_ptr<BaseResponse> execute(int commandType, std::vector<std::string>& arguments) = 0; + std::pair<std::shared_ptr<char>, size_t> runOnDevice(std::string& raw); +}; + +} + +#endif //INVERTER_TOOLS_PROTOCOL_CLIENT_H |