radio_tool 0.2.1
Loading...
Searching...
No Matches
ymodem_device.hpp
1
18#pragma once
19
20#include <string>
21#include <vector>
22
24{
26 {
27 public:
28 YModemDevice(const std::string& port, const std::string& filename);
29
30 auto SetAddress(const uint32_t&) const -> void;
31 auto Erase(const uint32_t& amount) const -> void;
32 auto Write(const std::vector<uint8_t>& data) const -> void;
33 auto Read(const uint16_t& size) const->std::vector<uint8_t>;
34 auto Status() const -> const std::string;
35
36 auto SetInterfaceAttribs(const uint32_t& speed, const int& parity) const -> int;
37 auto GetFD() const -> const int&
38 {
39 return fd;
40 }
41
42 private:
43 const std::string port, filename;
44 int fd;
45 };
46} // namespace radio_tool::device