Treehopper C++ API
Register.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "Treehopper.Libraries.h"
4 #include <cstdint>
5 #include <array>
6 #include <memory>
7 #include <vector>
8 
9 namespace Treehopper {
10  namespace Libraries {
11  class Register
12  {
13  public:
14  Register(RegisterManager& regManager, int address, int width, bool isBigEndian);
15  void write();
16  void read();
17  virtual long getValue() = 0;
18  virtual void setValue(long value) =0;
19  std::vector<uint8_t> getBytes();
20  void setBytes(std::vector<uint8_t> bytes);
21  int address;
22  int width;
24  private:
25  RegisterManager& regManager;
26  };
27  }
28 }
virtual void setValue(long value)=0
Definition: Register.h:11
Definition: RegisterManager.h:10
int width
Definition: Register.h:22
int address
Definition: Register.h:21
Register(RegisterManager &regManager, int address, int width, bool isBigEndian)
std::vector< uint8_t > getBytes()
void setBytes(std::vector< uint8_t > bytes)
bool isBigEndian
Definition: Register.h:23
Definition: AdcPin.h:3