Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tango
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira issues
Open 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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LOFAR2.0
tango
Commits
1c207fa9
Commit
1c207fa9
authored
3 years ago
by
Jan David Mol
Browse files
Options
Downloads
Patches
Plain Diff
L2SS-244
: Removed unused variables, name cleanup
parent
9ab2f542
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!56
L2SS-244: Expose the SSTs in MPs
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
devices/Statistics.py
+3
-3
3 additions, 3 deletions
devices/Statistics.py
devices/clients/sst_client.py
+6
-13
6 additions, 13 deletions
devices/clients/sst_client.py
with
9 additions
and
16 deletions
devices/Statistics.py
+
3
−
3
View file @
1c207fa9
...
...
@@ -47,9 +47,9 @@ class SST(hardware_device):
# SST client annotation consists of a dict that contains the parameter name that needs to be read.
# Example: comms_annotation={"parameter": "this_value_R"}
packet_count_R
=
attribute_wrapper
(
comms_annotation
=
{
"
parameter
"
:
"
packet
_count_R
"
},
datatype
=
numpy
.
int64
)
last_packet_timestamp_R
=
attribute_wrapper
(
comms_annotation
=
{
"
parameter
"
:
"
last_packet_timestamp
_R
"
},
datatype
=
numpy
.
int64
)
queue_percentage_used_R
=
attribute_wrapper
(
comms_annotation
=
{
"
parameter
"
:
"
queue_percentage
_used_R
"
},
datatype
=
numpy
.
double
)
packet_count_R
=
attribute_wrapper
(
comms_annotation
=
{
"
parameter
"
:
"
nof_
packet
s
"
},
datatype
=
numpy
.
int64
)
last_packet_timestamp_R
=
attribute_wrapper
(
comms_annotation
=
{
"
parameter
"
:
"
last_packet_timestamp
"
},
datatype
=
numpy
.
int64
)
queue_percentage_used_R
=
attribute_wrapper
(
comms_annotation
=
{
"
parameter
"
:
"
queue_
fill_
percentage
"
},
datatype
=
numpy
.
double
)
# --------
# overloaded functions
...
...
This diff is collapsed.
Click to expand it.
devices/clients/sst_client.py
+
6
−
13
View file @
1c207fa9
...
...
@@ -158,17 +158,10 @@ class SST(Thread):
self
.
queue
=
queue
self
.
last_packet
=
None
# holder for the currently constructed SST array,
# actual type will be created on the fly
self
.
collecting_values
=
None
# timestamp of the collecting_values
self
.
collecting_timestamp
=
datetime
.
min
self
.
parameters
=
{
"
packet
_count_R
"
:
numpy
.
int64
(
0
),
"
last_packet_timestamp
_R
"
:
numpy
.
int64
(
0
),
"
queue_percentage
_used_R
"
:
numpy
.
double
(
100
*
self
.
queue
.
qsize
()
/
self
.
queue
.
maxsize
),
"
nof_
packet
s
"
:
numpy
.
u
int64
(
0
),
"
last_packet_timestamp
"
:
numpy
.
u
int64
(
0
),
"
queue_
fill_
percentage
"
:
numpy
.
double
(
100
*
self
.
queue
.
qsize
()
/
self
.
queue
.
maxsize
),
# Packet count for packets that could not be parsed as SSTs
"
nof_invalid_packets
"
:
numpy
.
uint64
(
0
),
...
...
@@ -205,9 +198,9 @@ class SST(Thread):
self
.
join
()
def
process_packet
(
self
,
packet
):
self
.
parameters
[
"
packet
_count_R
"
]
+=
1
self
.
parameters
[
"
last_packet_timestamp
_R
"
]
=
numpy
.
int64
(
int
(
time
.
time
()))
self
.
parameters
[
"
queue_percentage
_used_R
"
]
=
numpy
.
double
(
100
*
self
.
queue
.
qsize
()
/
self
.
queue
.
maxsize
)
self
.
parameters
[
"
nof_
packet
s
"
]
+=
1
self
.
parameters
[
"
last_packet_timestamp
"
]
=
numpy
.
u
int64
(
int
(
time
.
time
()))
self
.
parameters
[
"
queue_
fill_
percentage
"
]
=
numpy
.
double
(
100
*
self
.
queue
.
qsize
()
/
self
.
queue
.
maxsize
)
try
:
fields
=
StatisticsPacket
(
packet
)
...
...
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