Source code for datapixx

from pypixxlib.dpxDevice import DpxDevice
from pypixxlib._libdpx import DPxUpdateRegCache
from pypixxlib.vgaOut import VgaOut
from pypixxlib.threeDFeatures import ThreeDFeatures 
from pypixxlib.videoFeatures import VideoFeatures
from pypixxlib.dualLinkOut import DualLinkOut
from pypixxlib.analogIn import AnalogIn
from pypixxlib.analogOut import AnalogOut
from pypixxlib.audioOut import AudioOut
from pypixxlib.audioIn import AudioIn
from pypixxlib.digitalIn import DigitalIn
from pypixxlib.digitalOut import DigitalOut
from pypixxlib.dpxDevice import DpxExceptionDecorate

        
        
[docs]class DATAPixx(DpxDevice, VgaOut, VideoFeatures, ThreeDFeatures): """ Class Definition for the DATAPixx Device. The bases defined below are the core subsystems attached to a DATAPixx devices. A DATAPixx device also has very specific subsystems which are used through handles. See the example bellow for more details. Note: If you have a **Lite** version of the device, some of these handles will not be available. The usage of the handles is as follows: >>> from pypixxlib.datapixx import DATAPixx >>> my_device = DATAPixx() >>> my_device.adc.function() # adc is the subsystem in this example. >>> my_device.BaseFunction() # A base function from one of the class' bases. Attributes: name: Name of the device. adc: Handle for the control of Analog In signal. See :doc:`analogIn`. dac: Handle for the control of Analog Out signal. See :doc:`analogOut`. audio: Handle for the audio controls. See :doc:`audioOut`. micro: Handle for the microphone controls. See :doc:`audioIn`. din: Handle for the control of Digital In signal. See :doc:`digitalIn`. dout: Handle for the control of Digital Out signal. See :doc:`digitalOut`. subsytems: A list of the available subsystems related to your physical device. """ @DpxExceptionDecorate def __init__(self): super(DATAPixx, self).__init__('DATAPixx') self.devsel = 10 if 'Lite' in self.name: self._setLiteSubSystems() else: self._setFullSubSystems() DPxUpdateRegCache() @DpxExceptionDecorate def _setLiteSubSystems(self): self.din = DigitalIn() self.dout = DigitalOut() self.subsystems = ['Digital I/O'] @DpxExceptionDecorate def _setFullSubSystems(self): self.adc = AnalogIn() self.dac = AnalogOut() self.audio = AudioOut() self.micro = AudioIn() self.din = DigitalIn() self.dout = DigitalOut() self.subsystems = ['General','Analog I/O', 'Audio I/O', 'Digital I/O']
[docs]class DATAPixx2(DpxDevice, DualLinkOut, VideoFeatures): """ Class Definition for the DATAPixx2 Device. The bases defined below are the core subsystems attached to a DATAPixx2 devices. A DATAPixx2 device also has very specific subsystems which are used through handles. See the example bellow for more details. Note: If you have a **Lite** version of the device, some of these handles will not be available. The usage of the handles is as follows: >>> from pypixxlib.datapixx import DATAPixx2 >>> my_device = DATAPixx2() >>> my_device.adc.function() # adc is the subsystem in this example. >>> my_device.BaseFunction() # A base function from one of the class' bases. Attributes: name: Name of the device. adc: Handle f or the control of Analog In signal. See :doc:`analogIn`. dac: Handle for the control of Analog Out signal. See :doc:`analogOut`. audio: Handle for the audio controls. See :doc:`audioOut`. micro: Handle for the microphone controls. See :doc:`audioIn`. din: Handle for the control of Digital In signal. See :doc:`digitalIn`. dout: Handle for the control of Digital Out signal. See :doc:`digitalOut`. subsytems: A list of the available subsystems related to your physical device. """ @DpxExceptionDecorate def __init__(self): super(DATAPixx2, self).__init__('DATAPixx2') self.devsel = 20 DPxUpdateRegCache() if 'Lite' in self.name: self._setLiteSubSystems() else: self._setFullSubSystems() @DpxExceptionDecorate def _setLiteSubSystems(self): self.din = DigitalIn() self.dout = DigitalOut() self.subsystems = ['General','Digital I/O'] @DpxExceptionDecorate def _setFullSubSystems(self): self.adc = AnalogIn() self.dac = AnalogOut() self.audio = AudioOut() self.micro = AudioIn() self.din = DigitalIn() self.dout = DigitalOut() self.subsystems = ['General','Analog I/O', 'Audio I/O', 'Digital I/O']
class DATAPixx3(DpxDevice, DualLinkOut, VideoFeatures): """ Class Definition for the DATAPixx3 Device. The bases defined below are the core subsystems attached to a DATAPixx3 devices. A DATAPixx3 device also has very specific subsystems which are used through handles. See the example bellow for more details. Note: If you have a **Lite** version of the device, some of these handles will not be available. The usage of the handles is as follows: >>> from pypixxlib.datapixx import DATAPixx3 >>> my_device = DATAPixx3() >>> my_device.adc.function() # adc is the subsystem in this example. >>> my_device.BaseFunction() # A base function from one of the class' bases. Attributes: name: Name of the device. adc: Handle f or the control of Analog In signal. See :doc:`analogIn`. dac: Handle for the control of Analog Out signal. See :doc:`analogOut`. audio: Handle for the audio controls. See :doc:`audioOut`. micro: Handle for the microphone controls. See :doc:`audioIn`. din: Handle for the control of Digital In signal. See :doc:`digitalIn`. dout: Handle for the control of Digital Out signal. See :doc:`digitalOut`. subsytems: A list of the available subsystems related to your physical device. """ @DpxExceptionDecorate def __init__(self): super(DATAPixx3, self).__init__('DATAPixx3') self.devsel = 30 DPxUpdateRegCache() if 'Lite' in self.name: self._setLiteSubSystems() else: self._setFullSubSystems() @DpxExceptionDecorate def _setLiteSubSystems(self): self.din = DigitalIn() self.dout = DigitalOut() self.subsystems = ['General','Digital I/O'] @DpxExceptionDecorate def _setFullSubSystems(self): self.adc = AnalogIn() self.dac = AnalogOut() self.audio = AudioOut() self.micro = AudioIn() self.din = DigitalIn() self.dout = DigitalOut() self.subsystems = ['General','Analog I/O', 'Audio I/O', 'Digital I/O'] class IOHub(DpxDevice): """ Class Definition for the IOHub Device. The bases defined below are the core subsystems attached to a IOHub devices. A IOHub device also has very specific subsystems which are used through handles. See the example bellow for more details. >>> from pypixxlib.datapixx import IOHub >>> my_device = IOHub() Attributes: name: Name of the device. din: Handle for the control of Digital In signal. See :doc:`digitalIn`. """ def __init__(self): super(IOHub, self).__init__('IOHub') self.expiration_date = 'N/A' self.serial_number = 'N/A' self.assembly_revision = 'N/A' self.date_shipped = 'N/A' self.identification = 'N/A' self.devsel = 80 self.din = DigitalIn() self.subsystems = ['General','Digital I/O'] DPxUpdateRegCache()