Dev Branch: Common Hardware Superclass, beginning Agilent Frequency Counter Class #25
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello Dr. Dutt!
I am beginning work on the Hardware Superclass we talked about which defines the general, common behavior amongst every Hardware Instrument in the lab. I am also beginning work on the Agilent Universal Frequency Counter in tandem as the first class to inherit from the HardwareSuperClass.
I created a folder in 'quantum-pulse/source/Hardware' called 'HardwareClasses' to separate my work from the current build for the timebeing.
I created a file with the superclass called 'HardwareSuperClass.py" which contains the superclass that each hardware instrument will inherit from.
I created a second file with a child-class called 'AgilentUniversalFrequencyCounter.py' which inherits from the hardware superclass.
I thought about what behaviors should be common to every piece of hardware and so far I have the methods:
-startUp:
-verify: does a process to verify that the instrument is currently turned on and capable of running code (ensures that there is a valid connection to the device.)
-sendData:
-getData:
-shutdown:
I used a decorator on the above methods to enforce that every child-class MUST give an implementation for each method which is relevant to its own piece of hardware (we will send data to the adwin in a different way than we will for the AWG, but we will know that we can send data for both using the sendData() method.)