Sensor

MRO

Methods

  • __call__(
      self,
      interval : typing.Optional[int],
      **kwargs
    ) -> None

    Parameters

    • Name
      self
      Type
      Default
      Description

    • Name
      interval
      Type
      typing.Optional[int]
      Default
      = None
      Description

    • Name
      **kwargs
      Type
      Default
      = {}
      Description

  • __init__(
      self,
      id : str,
      name : str,
      type : typing.Literal['PROPERTY', 'SENSOR', 'CONTROL', 'DIAGNOSTIC'],
    ) -> 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
      type
      Type
      typing.Literal['PROPERTY', 'SENSOR', 'CONTROL', 'DIAGNOSTIC']
      Default
      = 'CONTROL'
      Description

    • Name
      parameters
      Type
      dict[str, Parameter]
      Default
      Description

    • Name
      output
      Type
      dict[str, Output]
      Default
      Description

    • Name
      responses
      Type
      dict[str, Response]
      Default
      Description

  • _parse_parameters(self, parameters : dict) -> dict

    Parameters

    • Name
      self
      Type
      Default
      Description

    • Name
      parameters
      Type
      dict
      Default
      Description

    Response

    Type
    dict
    Description

  • _parse_output(self, outputs : dict) -> None

    Parameters

    • Name
      self
      Type
      Default
      Description

    • Name
      outputs
      Type
      dict
      Default
      Description

  • _parse_responses(self, responses : dict) -> None

    Parameters

    • Name
      self
      Type
      Default
      Description

    • Name
      responses
      Type
      dict
      Default
      Description

  • _parse_data_type(self, value : typing.Optional[typing.Any], schema : StructureElementModel) -> typing.Union[str, int, float, bool, bytes, date, unitelabs.sdk.datetime.time, unitelabs.sdk.datetime.datetime, list, dict]

    Parameters

    • Name
      self
      Type
      Default
      Description

    • Name
      value
      Type
      typing.Optional[typing.Any]
      Default
      Description

    • Name
      schema
      Type
      StructureElementModel
      Default
      Description

    Response

    Type
    typing.Union[str, int, float, bool, bytes, date, unitelabs.sdk.datetime.time, unitelabs.sdk.datetime.datetime, list, dict]
    Description

  • _to_data_type(self, value : typing.Optional[typing.Any], schema : StructureElementModel) -> typing.Union[str, int, float, bool, bytes, date, unitelabs.sdk.datetime.time, unitelabs.sdk.datetime.datetime, list, dict]

    Parameters

    • Name
      self
      Type
      Default
      Description

    • Name
      value
      Type
      typing.Optional[typing.Any]
      Default
      Description

    • Name
      schema
      Type
      StructureElementModel
      Default
      Description

    Response

    Type
    typing.Union[str, int, float, bool, bytes, date, unitelabs.sdk.datetime.time, unitelabs.sdk.datetime.datetime, list, dict]
    Description

Attributes

  • Name
    type
    Type
    typing.Literal[]
    Value

    = 'SENSOR'

    Description

  • Name
    client
    Type
    Client
    Value

    = None

    Description

  • Name
    id
    Type
    str
    Value

    = ''

    Description

  • Name
    name
    Type
    str
    Value

    = ''

    Description

  • Name
    parameters
    Type
    dict[str, Parameter]
    Value

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

    Description

  • Name
    output
    Type
    dict[str, Output]
    Value

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

    Description

  • Name
    responses
    Type
    dict[str, Response]
    Value

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

    Description

Copyright © 2024