IEC61850RemoteDataAttribute#
- class wattson.iec61850.iec61850_remote_data_attribute.IEC61850RemoteDataAttribute(name: str, mms_type: MmsType, functional_constraint: MMSFunctionalConstraints, parent: IEC61850RemoteDataAttribute | IEC61850DataObject | None = None, children: List[IEC61850RemoteDataAttribute] | None = None)#
Bases:
IEC61850DataAttributeMethods
add_childadd_data_attributeadd_on_change_callbackadd_on_update_callbackAttempts to asynchronously read the object from the server and update its value.
Sends a command to the server to update the attribute's value.
ensure_data_attributesensure_remote_data_attributesget_controllable_objectget_data_attributeget_last_valueget_mms_integer_sizeget_mms_value_typeget_protocol_datahas_childhas_data_attributeread_value_from_serverremove_on_change_callbackremove_on_update_callbackset_valueSends a command to the server to update the attribute's value.
Attributes
name- __init__(name: str, mms_type: MmsType, functional_constraint: MMSFunctionalConstraints, parent: IEC61850RemoteDataAttribute | IEC61850DataObject | None = None, children: List[IEC61850RemoteDataAttribute] | None = None) None#
- async_read_value_from_server(callback: Callable[[bool, IEC61850RemoteDataAttribute, Any, str | None], None], custom_id: str | None = None) bool#
Attempts to asynchronously read the object from the server and update its value. This method returns before the request finishes. When the request cannot be created, the callback is not called.
- Parameters:
callback (Callable[[bool, 'IEC61850RemoteDataAttribute', Any, Optional[str]], None]) – The callback to call when the response is ready. Parameters: success, data_attribute, new_value, custom_id
custom_id (Optional[str], optional) – An optional custom ID to be passed to the callback to identify different calls. (Default value = None)
- Returns:
True iff the request has been successfully created
- Return type:
bool
- async_write_value_to_server(value: Any, callback: Callable[[bool, IEC61850RemoteDataAttribute, str | None], None], custom_id: str | None = None) bool#
Sends a command to the server to update the attribute’s value.
- Parameters:
value (Any) – The value to write
callback (Callable[[bool, 'IEC61850RemoteDataAttribute', Optional[str]], None]) – The callback to call when the response is ready. Parameters: success, data_attribute, custom_id
custom_id (Optional[str], optional) – An optional custom ID to be passed to the callback to identify different calls. (Default value = None)
- Returns:
Whether the command could be sent - this is not an acknowledgement!
- Return type:
bool
- write_value_to_server(value: Any) bool#
Sends a command to the server to update the attribute’s value.
- Parameters:
value (Any) – The value to write
- Returns:
Whether the writing was successful
- Return type:
bool