|
RTC Toolkit 6.0.0
|
Interface for accessing a repository deriving from RepositoryIf asynchronously and mapping to Qt signals. More...
Classes | |
| class | _CreateDeleteSubscribeRequest |
| class | _CreateRequest |
| class | _CreateSymlinkRequest |
| class | _DeleteRequest |
| class | _ExistsRequest |
| class | _GetChildrenRequest |
| class | _PartialReadRequest |
| class | _PartialWriteRequest |
| class | _ReadMetaDataRequest |
| class | _ReadRequest |
| class | _ResponseContext |
| class | _UnsubscribeRequest |
| class | _UpdateSymlinkRequest |
| class | _ValueSubscribeRequest |
| class | _WriteMetaDataRequest |
| class | _WriteRequest |
| class | BatchRequest |
| A class representing a batch of individual datapoint requests to be sent to the repository adapter for handling. More... | |
| class | RequestSkipped |
| Exception created when an individual repository request was marked as skipped. More... | |
Public Member Functions | |
| __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 | |
| 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_handler_thread (self) | |
| _create_adapter_request (self) | |
| This method must create a correct BatchRequest object from the adapter in derived child classes. | |
| _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. | |
Protected Attributes | |
| _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) | |
Interface for accessing a repository deriving from RepositoryIf asynchronously and mapping to Qt signals.
| comms.repository.RepositoryControl.__init__ | ( | self, | |
| RepositoryIf | repository, | ||
| * | args, | ||
| logger = None, | |||
| ** | kwargs ) |
|
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 in comms.repository.PersistentRepoControl, and comms.repository.RuntimeRepoControl.
|
protected |
|
protected |
Processes response objects created in send_requests when batch requests are sent to the repository adapter.
This method is called by regular timer signals from "_timer".
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| comms.repository.RepositoryControl.get_repository | ( | self | ) |
Return the repository adapter this control object was constructed with.
| None comms.repository.RepositoryControl.send_requests | ( | self, | |
| BatchRequest | batch ) |
Sends a BatchRequest object to the repository adapter for processing.
All responses are mapped back to Qt signals.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
static |
Signal indicating that a create_data_point request has completed successfully.
The signal will receive the following arguments: the path of the created datapoint, the tag. The tag object is the one provided by the user in the request, which can be None if no tag was provided.
|
static |
Signal indicating that a create_data_point request has failed.
The signal will receive the following arguments: the path being created, the exception object, the tag. The tag object is the one provided by the user in the request, which can be None if no tag was provided.
|
static |
Signal indicating that a create_symlink request has completed successfully.
The signal will receive the following arguments: the path of the created symlink, the tag. The tag object is the one provided by the user in the request, which can be None if no tag was provided.
|
static |
Signal indicating that a create_symlink request has failed.
The signal will receive the following arguments: the symlink path being created, the exception object, the tag. The tag object is the one provided by the user in the request, which can be None if no tag was provided.
|
static |
Signal indicating that a data_point_exists request has completed successfully.
The signal will receive the following arguments: the path queried, the boolean result, the tag. The tag object is the one provided by the user in the request, which can be None if no tag was provided.
|
static |
Signal indicating that a data_point_exists request has failed.
The signal will receive the following arguments: the path queried, the exception object, the tag. The tag object is the one provided by the user in the request, which can be None if no tag was provided.
|
static |
Signal sent whenever a datapoint has been updated.
The signal will receive the following arguments: the path to the datapoint, the buffer object containing the new value, the tag. The tag object is the one provided by the user in the request, which can be None if no tag was provided.
|
static |
Signal indicating that a delete_data_point request has completed successfully.
The signal will receive the following arguments: path of the deleted datapoint, the tag. The tag object is the one provided by the user in the request, which can be None if no tag was provided.
|
static |
Signal indicating that a delete_data_point request has failed.
The signal will receive the following arguments: the path being deleted, the exception object, the tag. The tag object is the one provided by the user in the request, which can be None if no tag was provided.
|
static |
Signal indicating that a get_children request has completed successfully.
The signal will receive the following arguments: the path queried, the child datapoint paths, the sub paths, the tag. The tag object is the one provided by the user in the request, which can be None if no tag was provided.
|
static |
Signal indicating that a get_children request has failed.
The signal will receive the following arguments: the path queried, the exception object, the tag. The tag object is the one provided by the user in the request, which can be None if no tag was provided.
|
static |
Signal sent whenever a datapoint's metadata has been updated.
The signal will receive the following arguments: the path to the datapoint, the metadata dictionary, the tag. The tag object is the one provided by the user in the original request, which can be None if no tag was provided.
|
static |
Signal indicating that a partial_read_data_point request has completed successfully.
The signal will receive the following arguments: the path queried, the tag. The tag object is the one provided by the user in the request, which can be None if no tag was provided.
|
static |
Signal indicating that a partial_read_data_point request has failed.
The signal will receive the following arguments: the path queried, the exception object, the tag. The tag object is the one provided by the user in the request, which can be None if no tag was provided.
|
static |
Signal indicating that a partial_write_data_point request has completed successfully.
The signal will receive the following arguments: the path being updated, the tag. The tag object is the one provided by the user in the request, which can be None if no tag was provided.
|
static |
Signal indicating that a partial_write_data_point request has failed.
The signal will receive the following arguments: the path queried, the exception object, the tag. The tag object is the one provided by the user in the request, which can be None if no tag was provided.
|
static |
Signal indicating that a read_data_point request has completed successfully.
The signal will receive the following arguments: the path queried, the tag. The tag object is the one provided by the user in the request, which can be None if no tag was provided.
|
static |
Signal indicating that a read_data_point request has failed.
The signal will receive the following arguments: the path queried, the exception object, the tag. The tag object is the one provided by the user in the request, which can be None if no tag was provided.
|
static |
Signal indicating that a read_meta_data request has completed successfully.
The signal will receive the following arguments: the path queried, a dictionary containing the metadata, the tag. The tag object is the one provided by the user in the request, which can be None if no tag was provided.
|
static |
Signal indicating that a read_meta_data request has failed.
The signal will receive the following arguments: the path queried, the exception object, the tag. The tag object is the one provided by the user in the request, which can be None if no tag was provided.
|
static |
Signal indicating that an update_symlink request has completed successfully.
The signal will receive the following arguments: the path of the updated symlink, the tag. The tag object is the one provided by the user in the request, which can be None if no tag was provided.
|
static |
Signal indicating that an update_symlink request has failed.
The signal will receive the following arguments: the symlink path being updated, the exception object, the tag. The tag object is the one provided by the user in the request, which can be None if no tag was provided.
|
static |
Signal indicating that a write_data_point request has completed successfully.
The signal will receive the following arguments: the path being updated, the tag. The tag object is the one provided by the user in the request, which can be None if no tag was provided.
|
static |
Signal indicating that a write_data_point request has failed.
The signal will receive the following arguments: the path being updated, the exception object, the tag. The tag object is the one provided by the user in the request, which can be None if no tag was provided.
|
static |
Signal indicating that a write_meta_data request has completed successfully.
The signal will receive the following arguments: the path being updated, the tag. The tag object is the one provided by the user in the request, which can be None if no tag was provided.
|
static |
Signal indicating that a write_meta_data request has failed.
The signal will receive the following arguments: the path being updated, the exception object, the tag. The tag object is the one provided by the user in the request, which can be None if no tag was provided.