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.
		
		
		
		
		
			
		
			
				
					
					
						
							49 lines
						
					
					
						
							949 B
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							49 lines
						
					
					
						
							949 B
						
					
					
				| #ifndef REGISTERCHAIN_H | |
| #define REGISTERCHAIN_H | |
|  | |
| #include "model/hardware/core/register/Field.h" | |
| #include "model/hardware/device/SonoDevice.h" | |
|  | |
| class RegisterChain | |
| { | |
| private: | |
|     virtual void prepareData(quint32 index)=0; | |
|     //virtual void receiveData(void); | |
|  | |
| protected: | |
|     quint32 _bar; | |
|     quint32 _offset; | |
|     quint32 _baseOffset; | |
| 
 | |
|     quint32 _arrayLength; | |
|     quint8  _arrayDepth; | |
| 
 | |
|     quint32 _value; | |
| 
 | |
|     bool _isUpdated; | |
| 
 | |
|     QList<Field*> _fields; | |
| 
 | |
|     SonoDevice* _device; | |
| 
 | |
| public: | |
|     RegisterChain(quint8 bar, quint32 offset, SonoDevice* device, quint32 arrayLength);   // Constructor for general Registers: single and array | |
|     virtual ~RegisterChain(); | |
| 
 | |
|     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 // REGISTERCHAIN_H
 | |
| 
 |