Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
calng
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
calibration
calng
Commits
f6912087
Commit
f6912087
authored
3 years ago
by
Philipp Schmidt
Committed by
sqsonc
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
manager: Move autostart for matcher and bridges to module groups
parent
b6dc9170
No related branches found
No related tags found
1 merge request
!12
Snapshot: field test deployed version as of end of run 202201
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/calng/CalibrationManager.py
+14
-29
14 additions, 29 deletions
src/calng/CalibrationManager.py
with
14 additions
and
29 deletions
src/calng/CalibrationManager.py
+
14
−
29
View file @
f6912087
...
@@ -167,10 +167,16 @@ class ModuleGroupRow(Configurable):
...
@@ -167,10 +167,16 @@ class ModuleGroupRow(Configurable):
displayedName
=
'
Device server
'
)
displayedName
=
'
Device server
'
)
withMatcher
=
Bool
(
withMatcher
=
Bool
(
displayedName
=
'
Matcher?
'
)
displayedName
=
'
Include matcher?
'
)
startMatcher
=
Bool
(
displayedName
=
'
Start matcher?
'
)
withBridge
=
Bool
(
withBridge
=
Bool
(
displayedName
=
'
Bridge?
'
)
displayedName
=
'
Include bridge?
'
)
startBridge
=
Bool
(
displayedName
=
'
Start bridge?
'
)
bridgePort
=
UInt16
(
bridgePort
=
UInt16
(
displayedName
=
'
Bridge port
'
,
displayedName
=
'
Bridge port
'
,
...
@@ -255,22 +261,6 @@ class RestoredConfigurationRow(Configurable):
...
@@ -255,22 +261,6 @@ class RestoredConfigurationRow(Configurable):
displayedName
=
'
Key pattern
'
)
displayedName
=
'
Key pattern
'
)
class
InstantiationOptionsNode
(
Configurable
):
autoActivateGroupBridges
=
Bool
(
displayedName
=
'
Activate bridges automatically
'
,
description
=
'
Whether to activate all group bridges immediately after
'
'
instantation.
'
,
defaultValue
=
False
,
accessMode
=
AccessMode
.
RECONFIGURABLE
)
autoActivateGroupMatchers
=
Bool
(
displayedName
=
'
Activate group matchers automatically
'
,
description
=
'
Whether to activate all group matchers immediately after
'
'
instantation.
'
,
defaultValue
=
False
,
accessMode
=
AccessMode
.
RECONFIGURABLE
)
class
ManagedKeysNode
(
Configurable
):
class
ManagedKeysNode
(
Configurable
):
pass
pass
...
@@ -400,11 +390,6 @@ class CalibrationManager(DeviceClientBase, Device):
...
@@ -400,11 +390,6 @@ class CalibrationManager(DeviceClientBase, Device):
for
enabled
,
member_pattern
,
key_pattern
in
new_configs
.
value
for
enabled
,
member_pattern
,
key_pattern
in
new_configs
.
value
if
enabled
}
if
enabled
}
instantiationOptions
=
Node
(
InstantiationOptionsNode
,
displayedName
=
'
Instantiation options
'
,
description
=
'
Optional flags controlling the pipeline instantiation.
'
)
doNotCompressEvents
=
Bool
(
doNotCompressEvents
=
Bool
(
requiredAccessLevel
=
AccessLevel
.
GOD
,
requiredAccessLevel
=
AccessLevel
.
GOD
,
accessMode
=
AccessMode
.
READONLY
,
accessMode
=
AccessMode
.
READONLY
,
...
@@ -656,7 +641,7 @@ class CalibrationManager(DeviceClientBase, Device):
...
@@ -656,7 +641,7 @@ class CalibrationManager(DeviceClientBase, Device):
"""
"""
correction_device_servers
=
[
correction_device_servers
=
[
server
for
_
,
server
,
_
,
_
,
_
,
_
in
self
.
moduleGroups
.
value
]
server
for
_
,
server
,
_
,
_
,
_
,
_
,
_
,
_
in
self
.
moduleGroups
.
value
]
up_corr_servers
=
await
self
.
_get_servers_in_state
(
up_corr_servers
=
await
self
.
_get_servers_in_state
(
'
up
'
,
servers
=
correction_device_servers
)
'
up
'
,
servers
=
correction_device_servers
)
...
@@ -1157,7 +1142,7 @@ class CalibrationManager(DeviceClientBase, Device):
...
@@ -1157,7 +1142,7 @@ class CalibrationManager(DeviceClientBase, Device):
getattr
(
self
.
deviceIds
,
f
'
{
role
}
Suffix
'
)
getattr
(
self
.
deviceIds
,
f
'
{
role
}
Suffix
'
)
# Servers by group and layer.
# Servers by group and layer.
server_by_group
=
{
group
:
server
for
group
,
server
,
_
,
_
,
_
,
_
server_by_group
=
{
group
:
server
for
group
,
server
,
_
,
_
,
_
,
_
,
_
,
_
in
self
.
moduleGroups
.
value
}
in
self
.
moduleGroups
.
value
}
server_by_layer
=
{
layer
:
server
for
layer
,
_
,
server
server_by_layer
=
{
layer
:
server
for
layer
,
_
,
server
in
self
.
previewLayers
.
value
}
in
self
.
previewLayers
.
value
}
...
@@ -1220,8 +1205,8 @@ class CalibrationManager(DeviceClientBase, Device):
...
@@ -1220,8 +1205,8 @@ class CalibrationManager(DeviceClientBase, Device):
# Instantiate group matchers and bridges.
# Instantiate group matchers and bridges.
for
row
in
self
.
moduleGroups
.
value
:
for
row
in
self
.
moduleGroups
.
value
:
group
,
server
,
with_matcher
,
with_bridge
,
bridge
_port
,
\
group
,
server
,
with_matcher
,
start_matcher
,
with_
bridge
,
\
bridge_pattern
=
row
start_bridge
,
bridge_port
,
bridge_pattern
=
row
# Group matcher, if applicable.
# Group matcher, if applicable.
if
with_matcher
:
if
with_matcher
:
...
@@ -1242,7 +1227,7 @@ class CalibrationManager(DeviceClientBase, Device):
...
@@ -1242,7 +1227,7 @@ class CalibrationManager(DeviceClientBase, Device):
matcher_device_id
,
config
matcher_device_id
,
config
):
):
return
return
elif
s
elf
.
instantiationOptions
.
autoActivateGroupM
atcher
s
:
elif
s
tart_m
atcher
:
async
def
_activate_matcher
(
device_id
):
async
def
_activate_matcher
(
device_id
):
with
await
getDevice
(
device_id
)
as
device
:
with
await
getDevice
(
device_id
)
as
device
:
await
sleep
(
3
)
await
sleep
(
3
)
...
@@ -1267,7 +1252,7 @@ class CalibrationManager(DeviceClientBase, Device):
...
@@ -1267,7 +1252,7 @@ class CalibrationManager(DeviceClientBase, Device):
server
,
class_ids
[
'
bridge
'
],
bridge_device_id
,
config
server
,
class_ids
[
'
bridge
'
],
bridge_device_id
,
config
):
):
return
return
elif
s
elf
.
instantiationOptions
.
autoActivateGroupB
ridge
s
:
elif
s
tart_b
ridge
:
# Delay the slot a bit since it will get lost during
# Delay the slot a bit since it will get lost during
# instantation.
# instantation.
...
...
This diff is collapsed.
Click to expand it.
David Hammer
@hammerd
mentioned in commit
3566342d
·
2 years ago
mentioned in commit
3566342d
mentioned in commit 3566342d031db1bb435b6430f100afdbaaa6c4bf
Toggle commit list
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