sgr_commhandler.driver.contact

Provides the digital contact interface driver.

Submodules

Classes

ContactDataPoint

Implements a data point of a contact interface.

ContactFunctionalProfile

Implements a functional profile of a contact interface.

SGrContactInterface

SmartGridready External Interface Class for Contact Protocols

Package Contents

class sgr_commhandler.driver.contact.ContactDataPoint(dp_spec, fp_spec, interface)

Bases: sgr_commhandler.api.data_point_api.DataPointProtocol[sgr_specification.v0.product.ContactFunctionalProfile, sgr_specification.v0.generic.DataPointBase]

Implements a data point of a contact interface.

Parameters:
  • dp_spec (sgr_specification.v0.generic.DataPointBase)

  • fp_spec (sgr_specification.v0.product.ContactFunctionalProfile)

  • interface (SGrContactInterface)

_fp_name = ''
_dp_name = ''
_interface
async get_val(parameters=None, skip_cache=False)
Parameters:
  • parameters (Optional[dict[str, str]])

  • skip_cache (bool)

Return type:

Any

async set_val(value)
Parameters:

value (Any)

class sgr_commhandler.driver.contact.ContactFunctionalProfile(fp_spec, interface)

Bases: sgr_commhandler.api.functional_profile_api.FunctionalProfile[sgr_specification.v0.product.ContactFunctionalProfile]

Implements a functional profile of a contact interface.

Parameters:
  • fp_spec (sgr_specification.v0.product.ContactFunctionalProfile)

  • interface (SGrContactInterface)

_interface
_data_points
get_data_points()
Return type:

dict[tuple[str, str], sgr_commhandler.api.data_point_api.DataPoint]

class sgr_commhandler.driver.contact.SGrContactInterface(frame)

Bases: sgr_commhandler.api.device_api.SGrBaseInterface

SmartGridready External Interface Class for Contact Protocols Note: we do not implement a complete driver here, because it is very application-dependent!

Parameters:

frame (sgr_specification.v0.product.DeviceFrame)

number_of_contacts
contact_stabilization_time
functional_profiles
is_connected()
async disconnect_async()
async connect_async()