preheat_open.interfaces.BuildingModel

class preheat_open.interfaces.BuildingModel(component_query_type, component_type, unit_query_type, unit_type, unit_subtype, device_query_type, device_type, zone_query_type, zone_type, control_setting_type)

Bases: object

Configuration class that defines the types used by a building management system.

This class acts as a registry of types used for different building components, queries, and operations. It allows adapters to specify which concrete types they work with for different building elements.

Parameters:
  • component_query_type (type) – Type used for querying components

  • component_type (type) – Type representing building components

  • unit_query_type (type) – Type used for querying units

  • unit_type (type) – Type representing building units

  • unit_subtype (type) – Subtype of units for specialization

  • device_query_type (type) – Type used for querying devices

  • device_type (type) – Type representing building devices

  • zone_query_type (type) – Type used for querying zones

  • zone_type (type) – Type representing building zones

  • control_setting_type (type) – Type for control settings

Example:
>>> # Create a simple building model configuration
>>> class SimpleComponent: pass
>>> class SimpleQuery: pass
>>>
>>> model = BuildingModel(
...     component_query_type=SimpleQuery,
...     component_type=SimpleComponent,
...     unit_query_type=SimpleQuery,
...     unit_type=SimpleComponent,
...     unit_subtype=SimpleComponent,
...     device_query_type=SimpleQuery,
...     device_type=SimpleComponent,
...     zone_query_type=SimpleQuery,
...     zone_type=SimpleComponent,
...     control_setting_type=SimpleComponent
... )
>>> model.component_type == SimpleComponent
True
__init__(component_query_type, component_type, unit_query_type, unit_type, unit_subtype, device_query_type, device_type, zone_query_type, zone_type, control_setting_type)

Methods

__init__(component_query_type, ...)

Attributes

component_query_type

component_type

unit_query_type

unit_type

unit_subtype

device_query_type

device_type

zone_query_type

zone_type

control_setting_type