openpectus.aggregator.models
Attributes
Represents the possible types of a tag value |
Classes
!!! abstract "Usage Documentation" |
|
!!! abstract "Usage Documentation" |
|
!!! abstract "Usage Documentation" |
|
Enum where members are also (and must be) strings |
|
!!! abstract "Usage Documentation" |
|
Represents data that strictly belongs in a specific run. |
|
Represents a user looking at the frontend details page for a process unit |
|
Represents a contributor to a process unit |
|
Data stored by aggregator for each connected engine. |
|
Enum where members are also (and must be) strings |
|
Enum where members are also (and must be) strings |
|
!!! abstract "Usage Documentation" |
|
!!! abstract "Usage Documentation" |
|
!!! abstract "Usage Documentation" |
|
!!! abstract "Usage Documentation" |
Module Contents
- openpectus.aggregator.models.logger
- openpectus.aggregator.models.RunLogLine
- openpectus.aggregator.models.RunLog
- openpectus.aggregator.models.ControlState
- openpectus.aggregator.models.MethodLine
- openpectus.aggregator.models.MethodState
- openpectus.aggregator.models.ReadingCommand
- openpectus.aggregator.models.ReadingInfo
- openpectus.aggregator.models.CommandInfo
- openpectus.aggregator.models.TagValue
- openpectus.aggregator.models.PlotColorRegion
- openpectus.aggregator.models.PlotAxis
- openpectus.aggregator.models.SubPlot
- openpectus.aggregator.models.PlotConfiguration
- openpectus.aggregator.models.ErrorLogEntry
- openpectus.aggregator.models.ErrorLog
- openpectus.aggregator.models.SystemStateEnum
- openpectus.aggregator.models.TagDirection
- openpectus.aggregator.models.UodDefinition
- class openpectus.aggregator.models.Method(/, **data)
Bases:
openpectus.protocol.models.Method- !!! abstract “Usage Documentation”
[Models](../concepts/models.md)
A base class for creating Pydantic models.
- Attributes:
__class_vars__: The names of the class variables defined on the model. __private_attributes__: Metadata about the private attributes of the model. __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
__pydantic_complete__: Whether model building is completed, or if there are still undefined fields. __pydantic_core_schema__: The core schema of the model. __pydantic_custom_init__: Whether the model has a custom __init__ function. __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
- __pydantic_generic_metadata__: Metadata for generic models; contains data used for a similar purpose to
__args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
__pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models. __pydantic_post_init__: The name of the post-init method for the model, if defined. __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel]. __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model. __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
__pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects. __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
- __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra]
is set to ‘allow’.
__pydantic_fields_set__: The names of fields explicitly set during instantiation. __pydantic_private__: Values of private attributes set on the model instance.
- Parameters:
data (Any)
- version: int
- last_author: str
- class openpectus.aggregator.models.AggregatedErrorLogEntry(/, **data)
Bases:
pydantic.BaseModel- !!! abstract “Usage Documentation”
[Models](../concepts/models.md)
A base class for creating Pydantic models.
- Attributes:
__class_vars__: The names of the class variables defined on the model. __private_attributes__: Metadata about the private attributes of the model. __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
__pydantic_complete__: Whether model building is completed, or if there are still undefined fields. __pydantic_core_schema__: The core schema of the model. __pydantic_custom_init__: Whether the model has a custom __init__ function. __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
- __pydantic_generic_metadata__: Metadata for generic models; contains data used for a similar purpose to
__args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
__pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models. __pydantic_post_init__: The name of the post-init method for the model, if defined. __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel]. __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model. __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
__pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects. __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
- __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra]
is set to ‘allow’.
__pydantic_fields_set__: The names of fields explicitly set during instantiation. __pydantic_private__: Values of private attributes set on the model instance.
- Parameters:
data (Any)
- message: str
- created_time: float
- severity: int
- occurrences: int = 1
- __str__()
- Return type:
str
- static from_entry(entry)
- Parameters:
entry (ErrorLogEntry)
- class openpectus.aggregator.models.AggregatedErrorLog(/, **data)
Bases:
pydantic.BaseModel- !!! abstract “Usage Documentation”
[Models](../concepts/models.md)
A base class for creating Pydantic models.
- Attributes:
__class_vars__: The names of the class variables defined on the model. __private_attributes__: Metadata about the private attributes of the model. __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
__pydantic_complete__: Whether model building is completed, or if there are still undefined fields. __pydantic_core_schema__: The core schema of the model. __pydantic_custom_init__: Whether the model has a custom __init__ function. __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
- __pydantic_generic_metadata__: Metadata for generic models; contains data used for a similar purpose to
__args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
__pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models. __pydantic_post_init__: The name of the post-init method for the model, if defined. __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel]. __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model. __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
__pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects. __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
- __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra]
is set to ‘allow’.
__pydantic_fields_set__: The names of fields explicitly set during instantiation. __pydantic_private__: Values of private attributes set on the model instance.
- Parameters:
data (Any)
- entries: list[AggregatedErrorLogEntry]
- __str__()
- Return type:
str
- static empty()
- Return type:
- clear()
- class openpectus.aggregator.models.ChannelStatusEnum
Bases:
enum.StrEnumEnum where members are also (and must be) strings
- Unknown
- Connected
- Registered
- Disconnected
- openpectus.aggregator.models.TagValueType
Represents the possible types of a tag value
- class openpectus.aggregator.models.TagsInfo(/, **data)
Bases:
pydantic.BaseModel- !!! abstract “Usage Documentation”
[Models](../concepts/models.md)
A base class for creating Pydantic models.
- Attributes:
__class_vars__: The names of the class variables defined on the model. __private_attributes__: Metadata about the private attributes of the model. __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
__pydantic_complete__: Whether model building is completed, or if there are still undefined fields. __pydantic_core_schema__: The core schema of the model. __pydantic_custom_init__: Whether the model has a custom __init__ function. __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
- __pydantic_generic_metadata__: Metadata for generic models; contains data used for a similar purpose to
__args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
__pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models. __pydantic_post_init__: The name of the post-init method for the model, if defined. __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel]. __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model. __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
__pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects. __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
- __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra]
is set to ‘allow’.
__pydantic_fields_set__: The names of fields explicitly set during instantiation. __pydantic_private__: Values of private attributes set on the model instance.
- Parameters:
data (Any)
- map: dict[str, openpectus.protocol.models.TagValue]
- get(tag_name)
- Parameters:
tag_name (str)
- upsert(tag_value)
- Parameters:
tag_value (openpectus.protocol.models.TagValue)
- Return type:
bool
- __str__()
- Return type:
str
- get_last_modified_time()
- Return type:
datetime.datetime | None
- class openpectus.aggregator.models.RunData(/, **data)
Bases:
pydantic.BaseModelRepresents data that strictly belongs in a specific run.
- Parameters:
data (Any)
- run_id: str
- run_started: datetime.datetime
- latest_persisted_tick_time: float | None = None
The time assigned to the last persisted set of values
- latest_tag_time: float | None = None
The time of the latest tag update, persisted or not
- interrupted_by_error: bool = False
- __str__()
- Return type:
str
- class openpectus.aggregator.models.ActiveUser(/, **data)
Bases:
pydantic.BaseModelRepresents a user looking at the frontend details page for a process unit
- Parameters:
data (Any)
- id: str
- name: str
- class openpectus.aggregator.models.Contributor(/, **data)
Bases:
pydantic.BaseModelRepresents a contributor to a process unit
- Parameters:
data (Any)
- id: str | None
- name: str
- __hash__()
- class openpectus.aggregator.models.EngineData(engine_id, computer_name, engine_version, uod_name, uod_author_name, uod_author_email, uod_filename, location, hardware_str='N/A', data_log_interval_seconds=math.inf)
Data stored by aggregator for each connected engine.
- Parameters:
engine_id (str)
computer_name (str)
engine_version (str)
uod_name (str)
uod_author_name (str)
uod_author_email (str)
uod_filename (str)
location (str)
hardware_str (str)
data_log_interval_seconds (float)
- engine_id: str
- computer_name: str
- engine_version: str
- uod_name: str
- uod_author_name: str
- uod_author_email: str
- uod_filename: str
- location: str
- readings: list[openpectus.protocol.models.ReadingInfo] = []
Contains the definition of the engine’s process values.
- commands: list[openpectus.protocol.models.CommandInfo] = []
Contains the uod commands that are not related to a process value.
- uod_definition: openpectus.protocol.models.UodDefinition | None = None
- control_state: ControlState
- error_log: AggregatedErrorLog
- method_state: MethodState
- plot_configuration: PlotConfiguration
- contributors: set[Contributor]
- active_users: dict[str, ActiveUser]
- required_roles: set[str]
- hardware_str: str = 'N/A'
- data_log_interval_seconds: float = inf
- __str__()
- Return type:
str
- property runtime
- property system_state
- has_run()
Determine whether run_data is available, that is, whether a run is active.
- Return type:
bool
- reset_run()
Clear all data associated with a run, control_state, error_log, method state (not method content) and run_data, including run log and run_id. Call when run is complete to get ready for a new run.
- class openpectus.aggregator.models.NotificationScope
Bases:
enum.StrEnumEnum where members are also (and must be) strings
- PROCESS_UNITS_WITH_RUNS_IVE_CONTRIBUTED_TO
- PROCESS_UNITS_I_HAVE_ACCESS_TO
- SPECIFIC_PROCESS_UNITS
- class openpectus.aggregator.models.NotificationTopic
Bases:
enum.StrEnumEnum where members are also (and must be) strings
- RUN_START
- RUN_STOP
- RUN_PAUSE
- BLOCK_START
- NOTIFICATION_CMD
- WATCH_TRIGGERED
- NEW_CONTRIBUTOR
- METHOD_ERROR
- NETWORK_ERRORS
- class openpectus.aggregator.models.WebPushNotificationPreferences(/, **data)
Bases:
pydantic.BaseModel- !!! abstract “Usage Documentation”
[Models](../concepts/models.md)
A base class for creating Pydantic models.
- Attributes:
__class_vars__: The names of the class variables defined on the model. __private_attributes__: Metadata about the private attributes of the model. __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
__pydantic_complete__: Whether model building is completed, or if there are still undefined fields. __pydantic_core_schema__: The core schema of the model. __pydantic_custom_init__: Whether the model has a custom __init__ function. __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
- __pydantic_generic_metadata__: Metadata for generic models; contains data used for a similar purpose to
__args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
__pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models. __pydantic_post_init__: The name of the post-init method for the model, if defined. __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel]. __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model. __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
__pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects. __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
- __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra]
is set to ‘allow’.
__pydantic_fields_set__: The names of fields explicitly set during instantiation. __pydantic_private__: Values of private attributes set on the model instance.
- Parameters:
data (Any)
- model_config
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- user_id: str
- user_roles: set[str]
- scope: NotificationScope
- topics: set[NotificationTopic]
- process_units: set[str]
- class openpectus.aggregator.models.WebPushAction(/, **data)
Bases:
pydantic.BaseModel- !!! abstract “Usage Documentation”
[Models](../concepts/models.md)
A base class for creating Pydantic models.
- Attributes:
__class_vars__: The names of the class variables defined on the model. __private_attributes__: Metadata about the private attributes of the model. __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
__pydantic_complete__: Whether model building is completed, or if there are still undefined fields. __pydantic_core_schema__: The core schema of the model. __pydantic_custom_init__: Whether the model has a custom __init__ function. __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
- __pydantic_generic_metadata__: Metadata for generic models; contains data used for a similar purpose to
__args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
__pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models. __pydantic_post_init__: The name of the post-init method for the model, if defined. __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel]. __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model. __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
__pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects. __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
- __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra]
is set to ‘allow’.
__pydantic_fields_set__: The names of fields explicitly set during instantiation. __pydantic_private__: Values of private attributes set on the model instance.
- Parameters:
data (Any)
- action: Literal['navigate']
- title: str
- icon: str | None = None
- class openpectus.aggregator.models.WebPushData(/, **data)
Bases:
pydantic.BaseModel- !!! abstract “Usage Documentation”
[Models](../concepts/models.md)
A base class for creating Pydantic models.
- Attributes:
__class_vars__: The names of the class variables defined on the model. __private_attributes__: Metadata about the private attributes of the model. __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
__pydantic_complete__: Whether model building is completed, or if there are still undefined fields. __pydantic_core_schema__: The core schema of the model. __pydantic_custom_init__: Whether the model has a custom __init__ function. __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
- __pydantic_generic_metadata__: Metadata for generic models; contains data used for a similar purpose to
__args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
__pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models. __pydantic_post_init__: The name of the post-init method for the model, if defined. __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel]. __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model. __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
__pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects. __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
- __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra]
is set to ‘allow’.
__pydantic_fields_set__: The names of fields explicitly set during instantiation. __pydantic_private__: Values of private attributes set on the model instance.
- Parameters:
data (Any)
- process_unit_id: str | None = None
- contributor_id: str | None = None
- class openpectus.aggregator.models.WebPushNotification(/, **data)
Bases:
pydantic.BaseModel- !!! abstract “Usage Documentation”
[Models](../concepts/models.md)
A base class for creating Pydantic models.
- Attributes:
__class_vars__: The names of the class variables defined on the model. __private_attributes__: Metadata about the private attributes of the model. __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
__pydantic_complete__: Whether model building is completed, or if there are still undefined fields. __pydantic_core_schema__: The core schema of the model. __pydantic_custom_init__: Whether the model has a custom __init__ function. __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
- __pydantic_generic_metadata__: Metadata for generic models; contains data used for a similar purpose to
__args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
__pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models. __pydantic_post_init__: The name of the post-init method for the model, if defined. __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel]. __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model. __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
__pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects. __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
- __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra]
is set to ‘allow’.
__pydantic_fields_set__: The names of fields explicitly set during instantiation. __pydantic_private__: Values of private attributes set on the model instance.
- Parameters:
data (Any)
- actions: list[WebPushAction] = None
- badge: str | None = None
- body: str | None = None
- data: WebPushData = None
- icon: str | None = '/assets/icons/icon-192x192.png'
- image: str | None = None
- renotify: bool | None = None
- requireInteraction: bool | None = None
- silent: bool | None = None
- tag: str | None = None
- timestamp: pydantic.NonNegativeInt | None = None
- title: str
- vibrate: list[pydantic.NonNegativeInt] | None = None