Skip to content

CamillaDSP websocket client

CamillaClient: main client

Bases: _CamillaWS

Class for communicating with CamillaDSP.

Parameters:

Name Type Description Default
host str

Hostname where CamillaDSP runs.

required
port int

Port number of the CamillaDSP websocket server.

required
Source code in camilladsp\camilladsp.py
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
class CamillaClient(_CamillaWS):
    """
    Class for communicating with CamillaDSP.

    Args:
        host (str): Hostname where CamillaDSP runs.
        port (int): Port number of the CamillaDSP websocket server.
    """

    # pylint: disable=too-many-instance-attributes

    def __init__(self, host: str, port: int):
        """
        Create a new CamillaClient.

        The newly created CamillaClient does not
        automatically connect to the CamillaDSP process.
        Call `connect()` to initiate the connection.

        Args:
            host (str): Hostname where CamillaDSP runs.
            port (int): Port number of the CamillaDSP websocket server.
        """
        super().__init__(host, port)

        self._volume = Volume(self)
        self._rate = RateMonitor(self)
        self._levels = Levels(self)
        self._config = Config(self)
        self._status = Status(self)
        self._settings = Settings(self)
        self._general = General(self)
        self._versions = Versions(self)

    @property
    def volume(self) -> Volume:
        """
        A `Volume` instance for volume and mute controls.
        """
        return self._volume

    @property
    def rate(self) -> RateMonitor:
        """
        A `RateMonitor` instance for rate monitoring commands.
        """
        return self._rate

    @property
    def levels(self) -> Levels:
        """
        A `Levels` instance for signal level monitoring.
        """
        return self._levels

    @property
    def config(self) -> Config:
        """
        A `Config` instance for config management commands.
        """
        return self._config

    @property
    def status(self) -> Status:
        """
        A `Status` instance for status commands.
        """
        return self._status

    @property
    def settings(self) -> Settings:
        """
        A `Settings` instance for reading and writing settings.
        """
        return self._settings

    @property
    def general(self) -> General:
        """
        A `General` instance for basic commands.
        """
        return self._general

    @property
    def versions(self) -> Versions:
        """
        A `Versions` instance for version info.
        """
        return self._versions

config: Config property

A Config instance for config management commands.

general: General property

A General instance for basic commands.

levels: Levels property

A Levels instance for signal level monitoring.

rate: RateMonitor property

A RateMonitor instance for rate monitoring commands.

settings: Settings property

A Settings instance for reading and writing settings.

status: Status property

A Status instance for status commands.

versions: Versions property

A Versions instance for version info.

volume: Volume property

A Volume instance for volume and mute controls.

__init__(host, port)

Create a new CamillaClient.

The newly created CamillaClient does not automatically connect to the CamillaDSP process. Call connect() to initiate the connection.

Parameters:

Name Type Description Default
host str

Hostname where CamillaDSP runs.

required
port int

Port number of the CamillaDSP websocket server.

required
Source code in camilladsp\camilladsp.py
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
def __init__(self, host: str, port: int):
    """
    Create a new CamillaClient.

    The newly created CamillaClient does not
    automatically connect to the CamillaDSP process.
    Call `connect()` to initiate the connection.

    Args:
        host (str): Hostname where CamillaDSP runs.
        port (int): Port number of the CamillaDSP websocket server.
    """
    super().__init__(host, port)

    self._volume = Volume(self)
    self._rate = RateMonitor(self)
    self._levels = Levels(self)
    self._config = Config(self)
    self._status = Status(self)
    self._settings = Settings(self)
    self._general = General(self)
    self._versions = Versions(self)