|
RTC Toolkit 6.0.0
|
Classes | |
| class | _Context |
| This class holds objects that need to be tracked across the request completion handlers. More... | |
Public Member Functions | |
| __init__ (self, TreeNode node, _CommitCompletion._Context context) | |
| get_children_complete (self, path, dppaths, subpaths) | |
| This completion handler creates requests to delete datapoint paths for non-leaf nodes that are stale, but have been marked for deletion. | |
| get_children_failed (self, path, exception) | |
| A completion handler for failed requests to get_children. | |
| data_point_exists_complete (self, path, exists) | |
| This completion handler adds the path to the paths_that_exist set if the "exists" flag is True. | |
| data_point_exists_failed (self, path, exception) | |
| A completion handler for failed requests to data_point_exists. | |
| create_data_point_complete (self, path) | |
| This completion handler will attempt to send write requests to finally update the data in the repository. | |
| create_data_point_failed (self, path, exception) | |
| A completion handler for failed requests to create_data_point. | |
| delete_data_point_complete (self, path) | |
| This completion handler will update the paths_that_exist set that keeps track of datapoints that exist by removing the given path. | |
| delete_data_point_failed (self, path, exception) | |
| A completion handler for failed requests to delete_data_point. | |
| write_meta_data_complete (self, path) | |
| This completion handler will attempt to finalise the commit request and emit the commit_complete signal. | |
| write_meta_data_failed (self, path, exception) | |
| A completion handler for failed requests to write_meta_data. | |
| write_data_point_complete (self, path) | |
| This completion handler will mark the tree node's state flag as ready and then attempt to finalise the commit request and emit the commit_complete signal. | |
| write_data_point_failed (self, path, exception) | |
| A completion handler for failed requests to write_data_point. | |
Public Attributes | |
| node = node | |
| context = context | |
Protected Member Functions | |
| _try_send_completion_signal (self) | |
| Check to see if all requests related to the commit have finished and send the commit_complete signal in that case. | |
| _try_delete_pending_datapoints (self) | |
| Check if all pending get_children and data_point_exists requests have completed, at which point we should have up-to-date information about the existence of all datapoints being handled by this commit request. | |
| _try_create_missing_datapoints (self) | |
| Check if all datapoint deletion requests that were supposed to be sent have now been completed. | |
| _try_set_datapoint_values (self) | |
| Check if all datapoint creation requests have now been completed. | |
| gui.repository_model._CommitCompletion.__init__ | ( | self, | |
| TreeNode | node, | ||
| _CommitCompletion._Context | context ) |
|
protected |
Check if all datapoint deletion requests that were supposed to be sent have now been completed.
If that is the case, then send the requests to create the datapoints that are missing.
|
protected |
Check if all pending get_children and data_point_exists requests have completed, at which point we should have up-to-date information about the existence of all datapoints being handled by this commit request.
If this is the case, then the datapoints from the paths_to_delete set that still exist are requested to be deleted.
|
protected |
Check to see if all requests related to the commit have finished and send the commit_complete signal in that case.
The following is also ensured:
This method must be called at the end of every completion handler in _CommitCompletion.
|
protected |
Check if all datapoint creation requests have now been completed.
If that is the case, then send the requests to update all the datapoint values.
| gui.repository_model._CommitCompletion.create_data_point_complete | ( | self, | |
| path ) |
This completion handler will attempt to send write requests to finally update the data in the repository.
| gui.repository_model._CommitCompletion.create_data_point_failed | ( | self, | |
| path, | |||
| exception ) |
A completion handler for failed requests to create_data_point.
It will reset the state flags of the original node, record the failure and then continue.
| gui.repository_model._CommitCompletion.data_point_exists_complete | ( | self, | |
| path, | |||
| exists ) |
This completion handler adds the path to the paths_that_exist set if the "exists" flag is True.
If all pending data_point_exists requests have completed, then the datapoints from the paths_to_delete set that actually exist are requested to be deleted. The logic then attempts to continue with the rest of the requests that need to be generated.
| gui.repository_model._CommitCompletion.data_point_exists_failed | ( | self, | |
| path, | |||
| exception ) |
A completion handler for failed requests to data_point_exists.
It will simply record the failure and continue.
| gui.repository_model._CommitCompletion.delete_data_point_complete | ( | self, | |
| path ) |
This completion handler will update the paths_that_exist set that keeps track of datapoints that exist by removing the given path.
The logic then attempts to continue with the rest of the requests that need to be generated.
| gui.repository_model._CommitCompletion.delete_data_point_failed | ( | self, | |
| path, | |||
| exception ) |
A completion handler for failed requests to delete_data_point.
It will reset the state flags of the original node, record the failure and then continue.
| gui.repository_model._CommitCompletion.get_children_complete | ( | self, | |
| path, | |||
| dppaths, | |||
| subpaths ) |
This completion handler creates requests to delete datapoint paths for non-leaf nodes that are stale, but have been marked for deletion.
The logic then attempts to continue with the rest of the requests that need to be generated.
| gui.repository_model._CommitCompletion.get_children_failed | ( | self, | |
| path, | |||
| exception ) |
A completion handler for failed requests to get_children.
It will simply record the failure and continue.
| gui.repository_model._CommitCompletion.write_data_point_complete | ( | self, | |
| path ) |
This completion handler will mark the tree node's state flag as ready and then attempt to finalise the commit request and emit the commit_complete signal.
| gui.repository_model._CommitCompletion.write_data_point_failed | ( | self, | |
| path, | |||
| exception ) |
A completion handler for failed requests to write_data_point.
It will reset the tree node's flags, record the failure and then continue.
| gui.repository_model._CommitCompletion.write_meta_data_complete | ( | self, | |
| path ) |
This completion handler will attempt to finalise the commit request and emit the commit_complete signal.
| gui.repository_model._CommitCompletion.write_meta_data_failed | ( | self, | |
| path, | |||
| exception ) |
A completion handler for failed requests to write_meta_data.
It will simply record the failure and then continue.
| gui.repository_model._CommitCompletion.context = context |
| gui.repository_model._CommitCompletion.node = node |