unitelabs.sdk.connect.unitelabs_example

Classes

  • UnobservablePropertyTest

    This feature tests a static and a dynamic unobservable property.

    Methods

    • get_answer_to_everything(self) -> int

      Returns the answer to the ultimate question of life, the universe, and everything. 42.

      Response

      Type
      int
      Description

    • get_seconds_since_1970(self) -> int

      Returns the unix timestamp: The time in seconds since January 1st of 1970.

      Response

      Type
      int
      Description

    • __init__(
        self,
        id : str,
        name : str,
      ) -> None

      Parameters

      • Name
        self
        Type
        Default
        Description

      • Name
        client
        Type
        Client
        Default
        Description

      • Name
        id
        Type
        str
        Default
        = ''
        Description

      • Name
        name
        Type
        str
        Default
        = ''
        Description

      • Name
        actions
        Type
        dict[str, Action]
        Default
        Description

    • __getattr__(self, name : str) -> Action

      Parameters

      • Name
        self
        Type
        Default
        Description

      • Name
        name
        Type
        str
        Default
        Description

      Response

      Type
      Action
      Description

    • __getitem__(self, name : str) -> Action

      Parameters

      • Name
        self
        Type
        Default
        Description

      • Name
        name
        Type
        str
        Default
        Description

      Response

      Type
      Action
      Description

    Attributes

    • Name
      client
      Type
      Client
      Value

      = None

      Description

    • Name
      id
      Type
      str
      Value

      = ''

      Description

    • Name
      name
      Type
      str
      Value

      = ''

      Description

    • Name
      actions
      Type
      dict[str, Action]
      Value

      = dataclasses.field(repr=False, default_factory=dict)

      Description

  • ObservablePropertyTest

    This is a test feature to test observable properties.

    Methods

    • subscribe_alternating(self) -> Subscription[bool]

      Switches every second between true and false

      Response

      Type
      Subscription[bool]
      Description

    • subscribe_editable(self) -> Subscription[int]

      Can be set through SetValue command

      Response

      Type
      Subscription[int]
      Description

    • subscribe_fixed_value(self) -> Subscription[int]

      Always returns 42 and never changes.

      Response

      Type
      Subscription[int]
      Description

    • __init__(
        self,
        id : str,
        name : str,
      ) -> None

      Parameters

      • Name
        self
        Type
        Default
        Description

      • Name
        client
        Type
        Client
        Default
        Description

      • Name
        id
        Type
        str
        Default
        = ''
        Description

      • Name
        name
        Type
        str
        Default
        = ''
        Description

      • Name
        actions
        Type
        dict[str, Action]
        Default
        Description

    • __getattr__(self, name : str) -> Action

      Parameters

      • Name
        self
        Type
        Default
        Description

      • Name
        name
        Type
        str
        Default
        Description

      Response

      Type
      Action
      Description

    • __getitem__(self, name : str) -> Action

      Parameters

      • Name
        self
        Type
        Default
        Description

      • Name
        name
        Type
        str
        Default
        Description

      Response

      Type
      Action
      Description

    Attributes

    • Name
      client
      Type
      Client
      Value

      = None

      Description

    • Name
      id
      Type
      str
      Value

      = ''

      Description

    • Name
      name
      Type
      str
      Value

      = ''

      Description

    • Name
      actions
      Type
      dict[str, Action]
      Value

      = dataclasses.field(repr=False, default_factory=dict)

      Description

  • UnobservableCommandTest

    Feature for testing unobservable commands.

    Methods

    • command_without_parameters_and_responses(self) -> None

      A command that takes no parameters and returns no responses.

    • convert_integer_to_string(self, integer : int) -> str

      A command that takes one integer parameter and returns its string representation.

      Parameters

      • Name
        self
        Type
        Default
        Description

      • Name
        integer
        Type
        int
        Default
        Description

      Response

      Type
      str
      Description

    • join_integer_and_string(self, integer : int, string : str) -> str

      A command which takes an integer and a string parameter and returns a string with both joined (e.g. "123abc")

      Parameters

      • Name
        self
        Type
        Default
        Description

      • Name
        integer
        Type
        int
        Default
        Description

      • Name
        string
        Type
        str
        Default
        Description

      Response

      Type
      str
      Description

    • split_string_after_first_character(self, string : str) -> tuple[str, str]

      A command which splits a given string after its first character. Returns empty parts if the input was too short.

      Parameters

      • Name
        self
        Type
        Default
        Description

      • Name
        string
        Type
        str
        Default
        Description

      Response

      Type
      tuple[str, str]
      Description

    • __init__(
        self,
        id : str,
        name : str,
      ) -> None

      Parameters

      • Name
        self
        Type
        Default
        Description

      • Name
        client
        Type
        Client
        Default
        Description

      • Name
        id
        Type
        str
        Default
        = ''
        Description

      • Name
        name
        Type
        str
        Default
        = ''
        Description

      • Name
        actions
        Type
        dict[str, Action]
        Default
        Description

    • __getattr__(self, name : str) -> Action

      Parameters

      • Name
        self
        Type
        Default
        Description

      • Name
        name
        Type
        str
        Default
        Description

      Response

      Type
      Action
      Description

    • __getitem__(self, name : str) -> Action

      Parameters

      • Name
        self
        Type
        Default
        Description

      • Name
        name
        Type
        str
        Default
        Description

      Response

      Type
      Action
      Description

    Attributes

    • Name
      client
      Type
      Client
      Value

      = None

      Description

    • Name
      id
      Type
      str
      Value

      = ''

      Description

    • Name
      name
      Type
      str
      Value

      = ''

      Description

    • Name
      actions
      Type
      dict[str, Action]
      Value

      = dataclasses.field(repr=False, default_factory=dict)

      Description

  • ObservableCommandTest

    This is a test feature to test observable commands. It specifies various observable commands and returns defined answers to validate against.

    Methods

    • observable_iteration(
        self,
        number_iterations : int
      ) -> int

      Observable iteration, running NumberIterations times and returning the current count as intermediate result.

      Parameters

      • Name
        self
        Type
        Default
        Description

      • Name
        number_iterations
        Type
        int
        Default
        Description

      Response

      Type
      int
      Description

    • echo_value_async(
        self,
        value : int,
        delay_in_ms : int
      ) -> int

      Echo the given value asynchronously after the specified delay.

      Parameters

      • Name
        self
        Type
        Default
        Description

      • Name
        value
        Type
        int
        Default
        Description

      • Name
        delay_in_ms
        Type
        int
        Default
        Description

      Response

      Type
      int
      Description

    • __init__(
        self,
        id : str,
        name : str,
      ) -> None

      Parameters

      • Name
        self
        Type
        Default
        Description

      • Name
        client
        Type
        Client
        Default
        Description

      • Name
        id
        Type
        str
        Default
        = ''
        Description

      • Name
        name
        Type
        str
        Default
        = ''
        Description

      • Name
        actions
        Type
        dict[str, Action]
        Default
        Description

    • __getattr__(self, name : str) -> Action

      Parameters

      • Name
        self
        Type
        Default
        Description

      • Name
        name
        Type
        str
        Default
        Description

      Response

      Type
      Action
      Description

    • __getitem__(self, name : str) -> Action

      Parameters

      • Name
        self
        Type
        Default
        Description

      • Name
        name
        Type
        str
        Default
        Description

      Response

      Type
      Action
      Description

    Attributes

    • Name
      client
      Type
      Client
      Value

      = None

      Description

    • Name
      id
      Type
      str
      Value

      = ''

      Description

    • Name
      name
      Type
      str
      Value

      = ''

      Description

    • Name
      actions
      Type
      dict[str, Action]
      Value

      = dataclasses.field(repr=False, default_factory=dict)

      Description

  • UniteLabsExample

    A UniteLabs SiLA Python Example Server

    Methods

    • __init__(self) -> None

    • __getattr__(self, name : str) -> Module

      Parameters

      • Name
        self
        Type
        Default
        Description

      • Name
        name
        Type
        str
        Default
        Description

      Response

      Type
      Module
      Description

    • __getitem__(self, name : str) -> Module

      Parameters

      • Name
        self
        Type
        Default
        Description

      • Name
        name
        Type
        str
        Default
        Description

      Response

      Type
      Module
      Description

    Attributes

    • Name
      sila_service
      Type
      Module
      Value

      = None

      Description

    • Name
      observable_command_test
      Type
      ObservableCommandTest
      Value

      = None

      Description

    • Name
      observable_property_test
      Type
      ObservablePropertyTest
      Value

      = None

      Description

    • Name
      unobservable_command_test
      Type
      UnobservableCommandTest
      Value

      = None

      Description

    • Name
      unobservable_property_test
      Type
      UnobservablePropertyTest
      Value

      = None

      Description

    • Name
      greeting_provider
      Type
      Module
      Value

      = None

      Description

    • Name
      client
      Type
      Client
      Value

      = None

      Description

    • Name
      id
      Type
      str
      Value

      = ''

      Description

    • Name
      name
      Type
      str
      Value

      = ''

      Description

    • Name
      modules
      Type
      dict[str, Module]
      Value

      = dataclasses.field(repr=False, default_factory=dict)

      Description

Copyright © 2024