mbdlyb_ui.functional.hardware

Copyright (c) 2023 - 2026 TNO-ESI All rights reserved.

Classes

AffectsRelationCreatePage

Display the affects relation create editing page.

AffectsRelationUpdatePage

Display the affects relation update editing page.

Fault

Represent an editable hardware fault.

HardwareCreatePage

Display the hardware create editing page.

HardwareDetailsPage

Display the hardware details properties and relations.

HardwareUpdatePage

Display the hardware update editing page.

ObservesRelationCreatePage

Display the observes relation create editing page.

ObservesRelationUpdatePage

Display the observes relation update editing page.

RealizesRelationCreatePage

Display the realizes relation create editing page.

RealizesRelationUpdatePage

Display the realizes relation update editing page.

TestsRelationCreatePage

Display the tests relation create editing page.

TestsRelationUpdatePage

Display the tests relation update editing page.

Functions

add_fault(fault_rates)

Append a hardware fault and refresh the fault table.

affects_relation_form(relation, root)

Render the affected node and relation weight controls.

drop_fault(fault_rates, fault)

Remove a hardware fault and refresh the fault table.

fault_table(fault_rates)

Render editable hardware fault rows.

hardware_form(hardware, fault_rates, cluster[, update])

Render the hardware name, states, and fault controls.

observes_relation_form(o_relation)

Render the observed node and relation weight controls.

realizes_relation_form(relation)

Render the realized function and relation weight controls.

tests_relation_form(t_relation)

Render the tested node and relation weight controls.

Module Contents

class mbdlyb_ui.functional.hardware.AffectsRelationCreatePage(hardware_id: str)

Bases: mbdlyb_ui.functional.base.FunctionalPage

Display the affects relation create editing page.

hardware: mbdlyb.functional.gdb.GHardware
relation: mbdlyb_ui.functional.helpers.AffectsRelation
class mbdlyb_ui.functional.hardware.AffectsRelationUpdatePage(hardware_id: str, function_id: str)

Bases: mbdlyb_ui.functional.base.FunctionalPage

Display the affects relation update editing page.

hardware: mbdlyb.functional.gdb.GHardware
relation: mbdlyb_ui.functional.helpers.AffectsRelation
class mbdlyb_ui.functional.hardware.Fault(name: str, prior: float)

Represent an editable hardware fault.

classmethod from_list(l: list[Fault])

Convert editable fault entries to stored prior probabilities.

Parameters:

l – Editable cost or fault entries to convert into a stored mapping.

Returns:

Mapping of entry names to their configured numeric values.

classmethod to_list(d: dict[str, float]) → list[Fault]

Convert stored fault rates to editable fault entries.

Parameters:

d – Stored name-to-value pairs to convert into editable entries.

Returns:

Editable entries created from the stored name-to-value mapping.

name
prior
class mbdlyb_ui.functional.hardware.HardwareCreatePage(cluster_id: str)

Bases: mbdlyb_ui.functional.base.FunctionalPage

Display the hardware create editing page.

fault_rates
hardware: mbdlyb.functional.gdb.GHardware
class mbdlyb_ui.functional.hardware.HardwareDetailsPage(hardware_id: str)

Bases: mbdlyb_ui.functional.base.FunctionalPage

Display the hardware details properties and relations.

hardware: mbdlyb.functional.gdb.GHardware
class mbdlyb_ui.functional.hardware.HardwareUpdatePage(hardware_id)

Bases: mbdlyb_ui.functional.base.FunctionalPage

Display the hardware update editing page.

fault_rates: list[Fault]
hardware: mbdlyb.functional.gdb.GHardware
class mbdlyb_ui.functional.hardware.ObservesRelationCreatePage(hardware_id: str)

Bases: mbdlyb_ui.functional.base.FunctionalPage

Display the observes relation create editing page.

hardware: mbdlyb.functional.gdb.GHardware
relation: mbdlyb_ui.functional.helpers.ObservesRelation
class mbdlyb_ui.functional.hardware.ObservesRelationUpdatePage(hardware_id: str, observable_id: str)

Bases: mbdlyb_ui.functional.base.FunctionalPage

Display the observes relation update editing page.

hardware: mbdlyb.functional.gdb.GHardware
relation: mbdlyb_ui.functional.helpers.ObservesRelation
class mbdlyb_ui.functional.hardware.RealizesRelationCreatePage(hardware_id: str)

Bases: mbdlyb_ui.functional.base.FunctionalPage

Display the realizes relation create editing page.

hardware: mbdlyb.functional.gdb.GHardware
relation: mbdlyb_ui.functional.helpers.RealizesRelation
class mbdlyb_ui.functional.hardware.RealizesRelationUpdatePage(hardware_id: str, function_id: str)

Bases: mbdlyb_ui.functional.base.FunctionalPage

Display the realizes relation update editing page.

hardware: mbdlyb.functional.gdb.GHardware
relation: mbdlyb_ui.functional.helpers.RealizesRelation
class mbdlyb_ui.functional.hardware.TestsRelationCreatePage(hardware_id: str)

Bases: mbdlyb_ui.functional.base.FunctionalPage

Display the tests relation create editing page.

hardware: mbdlyb.functional.gdb.GHardware
relation: mbdlyb_ui.functional.helpers.TestsRelation
class mbdlyb_ui.functional.hardware.TestsRelationUpdatePage(hardware_id: str, test_id: str)

Bases: mbdlyb_ui.functional.base.FunctionalPage

Display the tests relation update editing page.

hardware: mbdlyb.functional.gdb.GHardware
relation: mbdlyb_ui.functional.helpers.TestsRelation
mbdlyb_ui.functional.hardware.add_fault(fault_rates: list[Fault])

Append a hardware fault and refresh the fault table.

Parameters:

fault_rates – Editable hardware faults and their rates.

mbdlyb_ui.functional.hardware.affects_relation_form(relation: mbdlyb_ui.functional.helpers.AffectsRelation, root: mbdlyb.functional.gdb.GCluster)

Render the affected node and relation weight controls.

Parameters:
  • relation – Relation whose endpoints and weight are edited.

  • root – Root cluster used to list eligible relation targets.

mbdlyb_ui.functional.hardware.drop_fault(fault_rates: list[Fault], fault: Fault)

Remove a hardware fault and refresh the fault table.

Parameters:
  • fault_rates – Editable hardware faults and their rates.

  • fault – Fault or cost entry selected for removal.

mbdlyb_ui.functional.hardware.fault_table(fault_rates: list[Fault])

Render editable hardware fault rows.

Parameters:

fault_rates – Editable hardware faults and their rates.

mbdlyb_ui.functional.hardware.hardware_form(hardware: mbdlyb.functional.gdb.GHardware, fault_rates: list[Fault], cluster: mbdlyb.functional.gdb.GCluster, update: bool = True)

Render the hardware name, states, and fault controls.

Parameters:
  • hardware – Hardware node whose properties are edited.

  • fault_rates – Editable hardware faults and their rates.

  • cluster – Parent cluster used to validate the hardware name.

  • update – Whether the hardware already exists for name validation.

mbdlyb_ui.functional.hardware.observes_relation_form(o_relation: mbdlyb_ui.functional.helpers.ObservesRelation)

Render the observed node and relation weight controls.

Parameters:

o_relation – Observes relation being edited.

mbdlyb_ui.functional.hardware.realizes_relation_form(relation: mbdlyb_ui.functional.helpers.RealizesRelation)

Render the realized function and relation weight controls.

Parameters:

relation – Relation whose endpoints and weight are edited.

mbdlyb_ui.functional.hardware.tests_relation_form(t_relation: mbdlyb_ui.functional.helpers.TestsRelation)

Render the tested node and relation weight controls.

Parameters:

t_relation – Tests relation being edited.