RTC Toolkit 6.0.0
Loading...
Searching...
No Matches
comms.repository.RuntimeRepoControl Class Reference

Interface for accessing the Runtime Configuration Repository asynchronously and mapping to Qt signals. More...

Inheritance diagram for comms.repository.RuntimeRepoControl:
comms.repository.RepositoryControl

Classes

class  BatchRequest
 A class representing a batch of individual datapoint requests to be sent to the repository adapter for handling. More...
 

Public Member Functions

 __init__ (self, *args, **kwargs)
 
- Public Member Functions inherited from comms.repository.RepositoryControl
 __init__ (self, RepositoryIf repository, *args, logger=None, **kwargs)
 
 get_repository (self)
 Return the repository adapter this control object was constructed with.
 
None send_requests (self, BatchRequest batch)
 Sends a BatchRequest object to the repository adapter for processing.
 

Static Public Attributes

 subscribe_complete = Signal(object, object, object)
 Signal indicating that a subscribe request has completed successfully.
 
 subscribe_failed = Signal(object, object, object)
 Signal indicating that a subscribe request has failed.
 
 unsubscribe_complete = Signal(object, object)
 Signal indicating that an unsubscribe request has completed successfully.
 
 unsubscribe_failed = Signal(object, object, object)
 Signal indicating that an unsubscribe request has failed.
 
 data_point_created = Signal(object, object)
 Signal indicating that a new datapoint was created.
 
 data_point_deleted = Signal(object, object)
 Signal indicating that a datapoint was deleted.
 
 data_point_changed = Signal(object, object, object)
 Signal indicating that a datapoint's value has changed.
 
 subscription_error = Signal(object, object, object)
 Signal indicating that an error was detected on an existing subscription.
 
- Static Public Attributes inherited from comms.repository.RepositoryControl
 get_children_complete = Signal(object, list, list, object)
 Signal indicating that a get_children request has completed successfully.
 
 get_children_failed = Signal(object, object, object)
 Signal indicating that a get_children request has failed.
 
 data_point_exists_complete = Signal(object, bool, object)
 Signal indicating that a data_point_exists request has completed successfully.
 
 data_point_exists_failed = Signal(object, object, object)
 Signal indicating that a data_point_exists request has failed.
 
 create_data_point_complete = Signal(object, object)
 Signal indicating that a create_data_point request has completed successfully.
 
 create_data_point_failed = Signal(object, object, object)
 Signal indicating that a create_data_point request has failed.
 
 delete_data_point_complete = Signal(object, object)
 Signal indicating that a delete_data_point request has completed successfully.
 
 delete_data_point_failed = Signal(object, object, object)
 Signal indicating that a delete_data_point request has failed.
 
 read_meta_data_complete = Signal(object, object, object)
 Signal indicating that a read_meta_data request has completed successfully.
 
 read_meta_data_failed = Signal(object, object, object)
 Signal indicating that a read_meta_data request has failed.
 
 write_meta_data_complete = Signal(object, object)
 Signal indicating that a write_meta_data request has completed successfully.
 
 write_meta_data_failed = Signal(object, object, object)
 Signal indicating that a write_meta_data request has failed.
 
 read_data_point_complete = Signal(object, object)
 Signal indicating that a read_data_point request has completed successfully.
 
 read_data_point_failed = Signal(object, object, object)
 Signal indicating that a read_data_point request has failed.
 
 write_data_point_complete = Signal(object, object)
 Signal indicating that a write_data_point request has completed successfully.
 
 write_data_point_failed = Signal(object, object, object)
 Signal indicating that a write_data_point request has failed.
 
 partial_read_data_point_complete = Signal(object, object)
 Signal indicating that a partial_read_data_point request has completed successfully.
 
 partial_read_data_point_failed = Signal(object, object, object)
 Signal indicating that a partial_read_data_point request has failed.
 
 partial_write_data_point_complete = Signal(object, object)
 Signal indicating that a partial_write_data_point request has completed successfully.
 
 partial_write_data_point_failed = Signal(object, object, object)
 Signal indicating that a partial_write_data_point request has failed.
 
 data_point_updated = Signal(object, object, object)
 Signal sent whenever a datapoint has been updated.
 
 metadata_updated = Signal(object, dict, object)
 Signal sent whenever a datapoint's metadata has been updated.
 
 create_symlink_complete = Signal(object, object)
 Signal indicating that a create_symlink request has completed successfully.
 
 create_symlink_failed = Signal(object, object, object)
 Signal indicating that a create_symlink request has failed.
 
 update_symlink_complete = Signal(object, object)
 Signal indicating that an update_symlink request has completed successfully.
 
 update_symlink_failed = Signal(object, object, object)
 Signal indicating that an update_symlink request has failed.
 

Protected Member Functions

 _create_adapter_request (self)
 This method must create a correct BatchRequest object from the adapter in derived child classes.
 
- Protected Member Functions inherited from comms.repository.RepositoryControl
 _create_handler_thread (self)
 
 _prepare_get_children_request (self, adapter_request, request)
 
 _prepare_exists_request (self, adapter_request, request)
 
 _prepare_create_request (self, adapter_request, request)
 
 _prepare_delete_request (self, adapter_request, request)
 
 _prepare_read_meta_data_request (self, adapter_request, request)
 
 _prepare_write_meta_data_request (self, adapter_request, request)
 
 _prepare_read_request (self, adapter_request, request)
 
 _prepare_write_request (self, adapter_request, request)
 
 _prepare_partial_read_request (self, adapter_request, request)
 
 _prepare_partial_write_request (self, adapter_request, request)
 
 _prepare_create_symlink_request (self, adapter_request, request)
 
 _prepare_update_symlink_request (self, adapter_request, request)
 
 _prepare_create_delete_subscribe_request (self, adapter_request, request)
 
 _prepare_value_subscribe_request (self, adapter_request, request)
 
 _prepare_unsubscribe_request (self, adapter_request, request)
 
 _handle_responses (self)
 Processes response objects created in send_requests when batch requests are sent to the repository adapter.
 

Additional Inherited Members

- Protected Attributes inherited from comms.repository.RepositoryControl
 _logger = CiiLogManager.get_logger(__name__)
 
dict _prepare_request_map
 
 _repository = repository
 
list _pending_responses = []
 
 _subscriptions = set()
 
 _timer = QTimer()
 
 _handle_responses
 
 _timer_finalizer = finalize(self._timer, _cleanup_timer, self._timer)
 

Detailed Description

Interface for accessing the Runtime Configuration Repository asynchronously and mapping to Qt signals.

Constructor & Destructor Documentation

◆ __init__()

comms.repository.RuntimeRepoControl.__init__ ( self,
* args,
** kwargs )

Member Function Documentation

◆ _create_adapter_request()

comms.repository.RuntimeRepoControl._create_adapter_request ( self)
protected

This method must create a correct BatchRequest object from the adapter in derived child classes.

Note that RepositoryIf::BatchRequest and RepositorySubscriberIf::BatchRequest are not the same.

Reimplemented from comms.repository.RepositoryControl.

Member Data Documentation

◆ data_point_changed

comms.repository.RuntimeRepoControl.data_point_changed = Signal(object, object, object)
static

Signal indicating that a datapoint's value has changed.

The signal will receive the following arguments: the path of the changed datapoint, the metadata of the datapoint, the tag. The tag object is the one provided by the user in the original subscribe request, which can be None if no tag was provided.

◆ data_point_created

comms.repository.RuntimeRepoControl.data_point_created = Signal(object, object)
static

Signal indicating that a new datapoint was created.

The signal will receive the following arguments: the path of the new datapoint, the tag. The tag object is the one provided by the user in the original subscribe request, which can be None if no tag was provided.

◆ data_point_deleted

comms.repository.RuntimeRepoControl.data_point_deleted = Signal(object, object)
static

Signal indicating that a datapoint was deleted.

The signal will receive the following arguments: the path of the deleted datapoint, the tag. The tag object is the one provided by the user in the original subscribe request, which can be None if no tag was provided.

◆ subscribe_complete

comms.repository.RuntimeRepoControl.subscribe_complete = Signal(object, object, object)
static

Signal indicating that a subscribe request has completed successfully.

The signal will receive the following argument: path, id, tag. The path is the one provided by the user in the subscribe request, which can be None if no path was provided. The id object represents a unique identifier for the subscription and must be used to unsubscribe later. The tag object is the one provided by the user in the subscribe request, which can be None if no tag was provided.

◆ subscribe_failed

comms.repository.RuntimeRepoControl.subscribe_failed = Signal(object, object, object)
static

Signal indicating that a subscribe request has failed.

The signal will receive the following arguments: path, error, tag. The path is the one provided by the user in the subscribe request, which can be None if no path was provided. The error is the exception object raised by the subscribe request. The tag object is the one provided by the user in the subscribe request, which can be None if no tag was provided.

◆ subscription_error

comms.repository.RuntimeRepoControl.subscription_error = Signal(object, object, object)
static

Signal indicating that an error was detected on an existing subscription.

The signal will receive the following arguments: path, error, tag. The path is the one provided by the user in the original subscribe request, which can be None if no path was provided. The error is the exception object raised while handling a subscription update. The tag object is the one provided by the user in the original subscribe request, which can be None if no tag was provided.

◆ unsubscribe_complete

comms.repository.RuntimeRepoControl.unsubscribe_complete = Signal(object, object)
static

Signal indicating that an unsubscribe request has completed successfully.

The signal will receive the following arguments: the id and tag passed to the request. The tag object is the one provided by the user in the unsubscribe request, which can be None if no tag was provided.

◆ unsubscribe_failed

comms.repository.RuntimeRepoControl.unsubscribe_failed = Signal(object, object, object)
static

Signal indicating that an unsubscribe request has failed.

The signal will receive the following arguments: id, error, tag. The id object is the one provided in the original unsubscribe request. The error is the exception object raised by the unsubscribe request. The tag object is the one provided by the user in the unsubscribe request, which can be None if no tag was provided.


The documentation for this class was generated from the following file: