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: IEC61850DataAttribute

Methods

__init__

add_child

add_data_attribute

add_on_change_callback

add_on_update_callback

async_read_value_from_server

Attempts to asynchronously read the object from the server and update its value.

async_write_value_to_server

Sends a command to the server to update the attribute's value.

ensure_data_attributes

ensure_remote_data_attributes

get_controllable_object

get_data_attribute

get_last_value

get_mms_integer_size

get_mms_value_type

get_protocol_data

has_child

has_data_attribute

read_value_from_server

remove_on_change_callback

remove_on_update_callback

set_value

write_value_to_server

Sends 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