#ifndef REGISTER_H #define REGISTER_H #include "model/hardware/core/register/Field.h" #include "model/hardware/device/SonoDevice.h" class Register { private: virtual void prepareData(quint32){} virtual void receiveData(void){} protected: quint32 _bar; quint32 _offset; quint32 _baseOffset; quint32 _arrayLength; quint32 _value; bool _isUpdated; QList _fields; SonoDevice* _device; public: Register(quint8 bar, quint32 offset, SonoDevice* device, quint32 arrayLength=0); // Constructor for general Registers: single and array virtual ~Register(); quint32 getValue(); void setValue(quint32 value); void changeOffset(quint32 offset); quint32 getCurrentOffset (void) const; bool isUpdated(); void update(); void upadteArray(); void sync(); void syncArray(); }; #endif //rEGISTER_H