You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

47 lines
886 B

#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<Field*> _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