summaryrefslogtreecommitdiffstats
path: root/lab_control/function_generator.py
blob: 49d04e39316aa4ae43c1f91327dc40e0890f0407 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
""" Interface definition for function generator devices. """

class FunctionGenerator:
    """
    This interface specifies the common API for all
    supported function generator devices.
    """

    SINE       = 0
    SQUARE     = 1
    TRIANGULAR = 3

    def setOn(self, channel: int) -> None:
        """ Enable channel. """

    def setOff(self, channel: int) -> None:
        """ Disable channel. """

    def setFrequency(self, channel: int, frequency: float) -> None:
        """ Set channel output frequency. """

    def setAmplitude(self, channel: int, amplitude: float) -> None:
        """ Set channel output amplitude. """

    def setFunction(self, channel: int, function: int) -> None:
        """ Set channel output waveform. """