Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CCS
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marko Mecina
CCS
Commits
11384e94
Commit
11384e94
authored
4 years ago
by
moeslinged94
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'origin/marko' into dominik
parents
da1369ef
4ff8e4f8
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
Makefile
+0
-12
0 additions, 12 deletions
Makefile
SYSTEM_SETUP.txt
+44
-0
44 additions, 0 deletions
SYSTEM_SETUP.txt
Tst/log_viewer/log_viewer.py
+2
-1
2 additions, 1 deletion
Tst/log_viewer/log_viewer.py
Tst/testing_library/testlib/tm.py
+2
-35
2 additions, 35 deletions
Tst/testing_library/testlib/tm.py
with
48 additions
and
48 deletions
Makefile
+
0
−
12
View file @
11384e94
...
...
@@ -63,15 +63,3 @@ set-start-scripts-permissions:
@
echo
"| setting permissions for the start scripts (execute) |"
@
echo
"+-----------------------------------------------------+"
$(
MAKE
)
all
-C
$(
CURDIR
)
/Tst/
build-fw-profile
:
$(
MAKE
)
ifsw-pc
-C
$(
CURDIR
)
/FwProfile
build-crplm
:
$(
MAKE
)
ifsw-pc
-C
$(
CURDIR
)
/CrPlm
build-cria
:
$(
MAKE
)
ifsw-pc
-C
$(
CURDIR
)
/CrIa
build-crfee
:
$(
MAKE
)
ifsw-pc
-C
$(
CURDIR
)
/CrFee
This diff is collapsed.
Click to expand it.
SYSTEM_SETUP.txt
0 → 100644
+
44
−
0
View file @
11384e94
This file documents the required steps to get the SMILE SXI EGSE up and running on a freshly installed linux system.
manjaro-xfce-21.0.5 linux5.10 VBOX
1) install MySQL/MariaDB and set it up
- mariadb
- mysql-workbench (optional)
$> sudo mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
$> sudo systemctl enable --now mariadb
$> sudo mariadb-secure-installation
mysql> CREATE USER 'egse'@'localhost' IDENTIFIED BY 'xrayvision';
mysql> GRANT ALL PRIVILEGES ON * . * TO 'egse'@'localhost';
mysql> FLUSH PRIVILEGES;
2) install packages/devtools
- gtksourceview3 [<=3.24.11-1]
- ipython
- make
3) install python modules
- python-numpy
- python-scipy
- python-matplotlib
- python-cairocffi
- python-mysqlclient
- python-sqlalchemy
- python-wheel
- python-sphinx
- python-sphinx_rtd_theme
- python-astropy
- python-crcmod
- python-psutil
4) get EGSE repository
$> git clone gitlab.phaidra.org/mecinam2/CCS.git
5) In CCS, make DB schemas and Python packages
- first configure egse.cfg
$> make ccs-storage
$> make codeblockreusefeature
$> make install-confignator
$> make install-testlib
This diff is collapsed.
Click to expand it.
Tst/log_viewer/log_viewer.py
+
2
−
1
View file @
11384e94
...
...
@@ -498,10 +498,11 @@ class LogView(Gtk.Box):
while
len
(
line
)
<
len
(
column_cnt
)
-
1
:
line
.
append
(
''
)
# add element in the list for the background color
background
=
'
#767d89
'
#
background = '#767d89'
background
=
None
line
.
append
(
background
)
if
len
(
line
)
!=
len
(
column_cnt
):
line
=
line
[:
len
(
column_cnt
)]
#TODO: line sometimes larger than column_cnt!?
raise
ValueError
# if it is a traceback make it a child, otherwise just append the line
if
line
[
0
]
==
'
TRACEBACK
'
:
...
...
This diff is collapsed.
Click to expand it.
Tst/testing_library/testlib/tm.py
+
2
−
35
View file @
11384e94
...
...
@@ -55,8 +55,6 @@ import logging
import
sys
import
time
import
bitstring
import
confignator
sys
.
path
.
append
(
confignator
.
get_option
(
'
paths
'
,
'
ccs
'
))
import
ccs_function_lib
as
cfl
...
...
@@ -968,19 +966,12 @@ def get_st_and_sst(pool_name, apid, ssc, is_tm=False, t_from=None):
def
extract_ssc_from_psc
(
psc
):
"""
The Source Sequence Counter (SSC) is embedded in the Packet Sequence Control (PSC).
The provided integer will be transformed into bits. Then a bit mask is used with & to remove the first two bits.
This removes the information of the Segmentation Flags.
After this the bits will be converted back to an integer which is the SSC.
Background information: (see CHEOPS Instrument Application SW - TM/TC ICD document for further information)
The PSC consists out of 16 bits, where the first 2 bits are the Segmentation Flags and the other 14 bits are
the SSC.
For a
'
stand-alone
'
packet the Segmentation Flags are
'
11
'
and thus the PSC with a SSC of 1 will be:
1100 0000 0000 0001
Bit mask to remove the first two bits from the left:
0011 1111 1111 1111
Use the bit mask with & leads to:
0000 0000 0000 0001
:param psc: int
Decimal notation of the PSC
...
...
@@ -988,16 +979,7 @@ def extract_ssc_from_psc(psc):
Source Sequence Counter (SSC) as integer
"""
assert
isinstance
(
psc
,
int
)
# parse the integer into bits
psc_bin
=
bitstring
.
BitArray
(
uint
=
psc
,
length
=
16
)
# the bit mask to remove the first two bits from left
mask
=
bitstring
.
BitArray
(
bin
=
'
0011 1111 1111 1111
'
)
# apply the mask with the & operator
ssc_bin
=
psc_bin
&
mask
# get the decimal value
ssc
=
ssc_bin
.
int
ssc
=
psc
&
0x3fff
return
ssc
...
...
@@ -1005,9 +987,6 @@ def extract_ssc_from_psc(psc):
def
extract_apid_from_packetid
(
packet_id
):
"""
The Application Process ID (APID) is embedded in the Packet ID.
The provided integer will be transformed into bits. Then a bit mask is used with & to remove the first 5 bits.
This removes the all other information like Version Number, Packet Type and Data Field Header Flag.
After this the bits will be converted back to an integer which is the APID.
Background information: (see CHEOPS Instrument Application SW - TM/TC ICD document for further information)
The Packet ID consists out of 16 bits, where
...
...
@@ -1016,25 +995,13 @@ def extract_apid_from_packetid(packet_id):
* 1 bit for the Data Field Header Flag
* 11 bit for the APID
Bit mask to remove the first two bits from the left:
0000 0111 1111 1111
:param packet_id: int
Decimal notation of the Packet ID
:return: int
APID in decimal notation
"""
assert
isinstance
(
packet_id
,
int
)
# parse the integer into bits
psc_bin
=
bitstring
.
BitArray
(
uint
=
packet_id
,
length
=
16
)
# the bit mask to remove the first 5 bits from left
mask
=
bitstring
.
BitArray
(
bin
=
'
0000 0111 1111 1111
'
)
# apply the mask with the & operator
ssc_bin
=
psc_bin
&
mask
# get the decimal value
apid
=
ssc_bin
.
int
apid
=
packet_id
&
0x7ff
return
apid
...
...
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