Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev Branch: Common Hardware Superclass, beginning Agilent Frequency Counter Class #25

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

ElijahHyndman
Copy link

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.)

ElijahHyndman and others added 11 commits February 18, 2020 15:25
Added a useless line to the readme file so we can see how pull requests are going to work for our projects in Dutt Lab; do not commit this change to the master branch!
Testing a Pull Request by editing the ReadMe File
Updating my forked repository of quantum-pulse
…t Frequency Counter class has been added as a subclass to test the relationship between the superclass and subclasses.
…d, ensuring that all derived classes will always echibit the same behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant