Skip to content

Commit ac6fdf9

Browse files
committed
NASA Docket No. GSC-19,200-1, and identified as "cFS Draco"
Batch update of latest cFS software release
1 parent c019d1b commit ac6fdf9

File tree

11 files changed

+47
-15
lines changed

11 files changed

+47
-15
lines changed

GroundSystem.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import os
2525
import signal
2626
import pathlib
27+
import getpass
2728

2829
from PyQt5.QtWidgets import QApplication, QMainWindow, QMessageBox
2930

@@ -163,7 +164,7 @@ def set_cmd_offsets(self):
163164
def save_offsets(self):
164165
offsets = bytes((self.sb_tlm_offset.value(), self.sb_cmd_offset_pri.value(),
165166
self.sb_cmd_offset_sec.value()))
166-
with open("/tmp/OffsetData", "wb") as f:
167+
with open(f"/tmp/OffsetData-{getpass.getuser()}", "wb") as f:
167168
f.write(offsets)
168169

169170
# Update the combo box list in gui

RoutingService.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@
2525
import zmq
2626
from PyQt5.QtCore import QThread, pyqtSignal
2727

28+
import getpass
29+
2830
# Receive port where the CFS TO_Lab app sends the telemetry packets
29-
udp_recv_port = 1235
31+
udp_recv_port = 2234
3032

3133

3234
#
@@ -51,7 +53,7 @@ def __init__(self):
5153
# Init zeroMQ
5254
self.context = zmq.Context()
5355
self.publisher = self.context.socket(zmq.PUB)
54-
self.publisher.bind("ipc:///tmp/GroundSystem")
56+
self.publisher.bind(f"ipc:///tmp/GroundSystem-{getpass.getuser()}")
5557

5658
# Run thread
5759
def run(self):

Subsystems/Commands-Telemetry.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
## Telemetry ( tlmGUI/ directory ):
44
Telemetry is sent from the running cFE/CFS as CCSDS telemetry packets encapsulated in
55
UDP/IP packets. The `enable telemetry` command tells the TO_LAB application to start
6-
sending packets to a UDP port on the `localhost` or a specified IP. By default, the TO_LAB application
7-
listens to UDP port 1234 for commands, and sends telemetry to the tlmGUI at UDP port 1235.
6+
sending packets to a UDP port on the `localhost` or a specified IP.
7+
By default, the cFS listens to UDP port 1234 for commands,
8+
and sends telemetry to the tlmGUI at UDP port 2234.
89

910
Start the telemetry system using the Ground System's main window.
1011

Subsystems/cmdGui/MiniCmdUtil.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import socket
2424
from collections import namedtuple
2525

26+
import getpass
2627

2728
class MiniCmdUtil:
2829
# Class objects
@@ -61,7 +62,7 @@ def __init__(self,
6162
self.parameters = parameters
6263
self.payload = bytearray()
6364
self.packet = bytearray()
64-
with open("/tmp/OffsetData", "r+b") as f:
65+
with open(f"/tmp/OffsetData-{getpass.getuser()}", "r+b") as f:
6566
self.mm = mmap.mmap(f.fileno(), 0, prot=mmap.PROT_READ)
6667

6768
self.cmd_offset_pri = 0

Subsystems/tlmGUI/EventMessage.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@
6161

6262
from UiEventmessagedialog import UiEventmessagedialog
6363

64+
import getpass
65+
6466
ROOTDIR = Path(sys.argv[0]).resolve().parent
6567

6668

@@ -77,7 +79,7 @@ def __init__(self, aid):
7779
4: "CRITICAL"
7880
}
7981

80-
with open("/tmp/OffsetData", "r+b") as f:
82+
with open(f"/tmp/OffsetData-{getpass.getuser()}", "r+b") as f:
8183
self.mm = mmap.mmap(f.fileno(), 0, prot=mmap.PROT_READ)
8284

8385
def init_em_tlm_receiver(self, subscr):
@@ -141,7 +143,7 @@ def __init__(self, subscr, aid):
141143
# Init zeroMQ
142144
self.context = zmq.Context()
143145
self.subscriber = self.context.socket(zmq.SUB)
144-
self.subscriber.connect("ipc:///tmp/GroundSystem")
146+
self.subscriber.connect(f"ipc:///tmp/GroundSystem-{getpass.getuser()}")
145147
subscription_string = f"{subscr}.Spacecraft1.TelemetryPackets.{app_id}"
146148
self.subscriber.setsockopt_string(zmq.SUBSCRIBE, subscription_string)
147149

Subsystems/tlmGUI/GenericTelemetry.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131

3232
from UiGenerictelemetrydialog import UiGenerictelemetrydialog
3333

34+
import getpass
35+
3436
# ../cFS/tools/cFS-GroundSystem/Subsystems/tlmGUI
3537
ROOTDIR = Path(sys.argv[0]).resolve().parent
3638

@@ -42,7 +44,7 @@ class SubsystemTelemetry(QDialog, UiGenerictelemetrydialog):
4244
def __init__(self):
4345
super().__init__()
4446
self.setupUi(self)
45-
with open("/tmp/OffsetData", "r+b") as f:
47+
with open(f"/tmp/OffsetData-{getpass.getuser()}", "r+b") as f:
4648
self.mm = mmap.mmap(f.fileno(), 0, prot=mmap.PROT_READ)
4749

4850
#
@@ -131,7 +133,7 @@ def __init__(self, subscr):
131133
# Init zeroMQ
132134
context = zmq.Context()
133135
self.subscriber = context.socket(zmq.SUB)
134-
self.subscriber.connect("ipc:///tmp/GroundSystem")
136+
self.subscriber.connect(f"ipc:///tmp/GroundSystem-{getpass.getuser()}")
135137
my_tlm_pg_apid = subscr.split(".", 1)
136138
my_subscription = f"GroundSystem.Spacecraft1.TelemetryPackets.{my_tlm_pg_apid[1]}"
137139
self.subscriber.setsockopt_string(zmq.SUBSCRIBE, my_subscription)

Subsystems/tlmGUI/TelemetrySystem.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333

3434
from UiTelemetrysystemdialog import UiTelemetrysystemdialog
3535

36+
import getpass
37+
3638
ROOTDIR = Path(sys.argv[0]).resolve().parent
3739

3840

@@ -151,7 +153,7 @@ def __init__(self, subscr):
151153
# Init zeroMQ
152154
context = zmq.Context()
153155
self.subscriber = context.socket(zmq.SUB)
154-
self.subscriber.connect("ipc:///tmp/GroundSystem")
156+
self.subscriber.connect(f"ipc:///tmp/GroundSystem-{getpass.getuser()}")
155157
self.subscriber.setsockopt_string(zmq.SUBSCRIBE, subscr)
156158

157159
def run(self):
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#
2+
# sample-app-hk-tlm.txt
3+
#
4+
# This file should have the following comma delimited fields:
5+
# 1. Data item description
6+
# 2. Offset of data item in packet
7+
# 3. Length of data item
8+
# 4. Python data type of item ( using python struct library )
9+
# 5. Display type of item ( Currently Dec, Hex, Str, Enm )
10+
# 6. Display string for enumerated value 0 ( or NULL if none )
11+
# 7. Display string for enumerated value 1 ( or NULL if none )
12+
# 8. Display string for enumerated value 2 ( or NULL if none )
13+
# 9. Display string for enumerated value 3 ( or NULL if none )
14+
#
15+
# Note(1): A line that begins with # is a comment
16+
# Note(2): Remove any blank lines from the end of the file
17+
#
18+
Command Counter, 12, 1, B, Dec, NULL, NULL, NULL, NULL
19+
Error Counter, 13, 1, B, Dec, NULL, NULL, NULL, NULL
20+
Spare1, 14, 1, B, Dec, NULL, NULL, NULL, NULL
21+
Spare2, 15, 1, B, Dec, NULL, NULL, NULL, NULL

Subsystems/tlmGUI/telemetry-pages.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,4 @@ SB OneSub Tlm, GenericTelemetry.py, 0x80E, cfe-sb-onesub-tlm.t
2828
ES Shell Tlm, GenericTelemetry.py, 0x80F, cfe-es-shell-tlm.txt
2929
ES MEMSTATS Tlm, GenericTelemetry.py, 0x810, cfe-es-memstats-tlm.txt
3030
ES BlockStats Tlm 1, GenericTelemetry.py, 0x810, cfe-es-blockstats_1-tlm.txt
31+
Sample App HK Tlm, GenericTelemetry.py, 0x883, sample-app-hk-tlm.txt

TlmMQRecv.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#
2020

2121
import zmq
22+
import getpass
2223

2324

2425
#
@@ -30,7 +31,7 @@ def main():
3031
# Prepare our context and publisher
3132
context = zmq.Context()
3233
subscriber = context.socket(zmq.SUB)
33-
subscriber.connect("ipc:///tmp/GroundSystem")
34+
subscriber.connect(f"ipc:///tmp/GroundSystem-{getpass.getuser()}")
3435
subscriber.setsockopt(zmq.SUBSCRIBE, b"GroundSystem")
3536

3637
while True:

0 commit comments

Comments
 (0)