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
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
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._mute = Mute(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 controls.
        """
        return self._volume

    @property
    def mute(self) -> Mute:
        """
        A `Mute` instance for mute controls.
        """
        return self._mute

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

mute: Mute property

A Mute instance for mute controls.

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 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
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
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._mute = Mute(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)