Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
lmc-base-classes
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
LOFAR2.0
lmc-base-classes
Commits
f1c99e7c
Unverified
Commit
f1c99e7c
authored
Oct 11, 2021
by
SKAJohanVenter
Browse files
Options
Downloads
Patches
Plain Diff
SAR-276
Hiding queue_manager properties behind the component_manager
parent
b2bc42f7
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/ska_tango_base/base/base_device.py
+5
-5
5 additions, 5 deletions
src/ska_tango_base/base/base_device.py
src/ska_tango_base/base/component_manager.py
+47
-0
47 additions, 0 deletions
src/ska_tango_base/base/component_manager.py
with
52 additions
and
5 deletions
src/ska_tango_base/base/base_device.py
+
5
−
5
View file @
f1c99e7c
...
...
@@ -1120,7 +1120,7 @@ class SKABaseDevice(Device):
:return: tasks in the device queue
"""
return
self
.
component_manager
.
queue_manager
.
tasks_in_queue
return
self
.
component_manager
.
tasks_in_queue
def
read_longRunningCommandIDsInQueue
(
self
):
# PROTECTED REGION ID(SKABaseDevice.longRunningCommandIDsInQueue_read) ENABLED START #
...
...
@@ -1138,7 +1138,7 @@ class SKABaseDevice(Device):
:return: ID, status pairs of the currently executing commands
"""
return
self
.
component_manager
.
queue_manager
.
task_status
return
self
.
component_manager
.
task_status
def
read_longRunningCommandProgress
(
self
):
# PROTECTED REGION ID(SKABaseDevice.longRunningCommandProgress_read) ENABLED START #
...
...
@@ -1147,7 +1147,7 @@ class SKABaseDevice(Device):
:return: ID, progress of the currently executing command.
"""
return
self
.
component_manager
.
queue_manager
.
task_progress
return
self
.
component_manager
.
task_progress
def
read_longRunningCommandResult
(
self
):
# PROTECTED REGION ID(SKABaseDevice.longRunningCommandResult_read) ENABLED START #
...
...
@@ -1156,9 +1156,9 @@ class SKABaseDevice(Device):
:return: ID, ResultCode, result.
"""
if
not
self
.
component_manager
.
queue_manager
.
task_result
:
if
not
self
.
component_manager
.
task_result
:
return
[]
return
list
(
self
.
component_manager
.
queue_manager
.
task_result
)
return
list
(
self
.
component_manager
.
task_result
)
# --------
# Commands
...
...
This diff is collapsed.
Click to expand it.
src/ska_tango_base/base/component_manager.py
+
47
−
0
View file @
f1c99e7c
...
...
@@ -126,6 +126,53 @@ class BaseComponentManager:
"""
raise
NotImplementedError
(
"
BaseComponentManager is abstract.
"
)
@property
def
tasks_in_queue
(
self
):
"""
Read the long running commands in the queue.
:return: tasks in the device queue
"""
return
self
.
queue_manager
.
tasks_in_queue
@property
def
task_ids_in_queue
(
self
):
"""
Read the IDs of the long running commands in the queue.
:return: unique ids for the enqueued commands
"""
return
self
.
queue_manager
.
task_ids_in_queue
@property
def
task_status
(
self
):
"""
Read the status of the currently executing long running commands.
:return: ID, status pairs of the currently executing commands
"""
return
self
.
queue_manager
.
task_status
@property
def
task_progress
(
self
):
"""
Read the progress of the currently executing long running command.
:return: ID, progress of the currently executing command.
"""
return
self
.
queue_manager
.
task_progress
@property
def
task_result
(
self
):
"""
Read the result of the completed long running command.
:return: ID, ResultCode, result.
"""
if
not
self
.
queue_manager
.
task_result
:
return
[]
return
list
(
self
.
queue_manager
.
task_result
)
def
off
(
self
):
"""
Turn the component off.
"""
raise
NotImplementedError
(
"
BaseComponentManager is abstract.
"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment