Skip to content

Commit

Permalink
[#80] Updates for YAMCS GSW - Some Botched Telem ATM
Browse files Browse the repository at this point in the history
  • Loading branch information
rjbrown2 committed Oct 30, 2024
1 parent 32a7034 commit 675dcdd
Show file tree
Hide file tree
Showing 10 changed files with 90 additions and 49 deletions.
6 changes: 3 additions & 3 deletions cfg/nos3-mission.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<!-- Note fprime gsw and fsw only operational in sc-minimal-config.xml -->

<!-- Ground Software -->
<!-- cosmos, openc3, or fprime -->
<gsw>cosmos</gsw>
<!-- cosmos, openc3, yamcs, or fprime -->
<gsw>yamcs</gsw>

<!-- Flight Software -->
<!-- cfs or fprime -->
Expand All @@ -15,7 +15,7 @@

<!-- Spacecraft 1 Configuration -->
<!-- sc-full-config.xml or sc-minimal-config.xml -->
<sc-1-cfg>sc-full-config.xml</sc-1-cfg>
<sc-1-cfg>sc-minimal-config.xml</sc-1-cfg>

<!-- Spacecraft N Configuration -->
<!-- <sc-N-cfg>sc-minimal-config.xml</sc-N-cfg> -->
Expand Down
90 changes: 45 additions & 45 deletions cfg/nos3_defs/tables/to_lab_sub.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,60 +77,60 @@ TO_LAB_Subs_t TO_LAB_Subs =
.Subs =
{
/* CFS App Subscriptions */
{CFE_SB_MSGID_WRAP_VALUE(TO_LAB_HK_TLM_MID), {0, 0}, 4},
{CFE_SB_MSGID_WRAP_VALUE(TO_LAB_DATA_TYPES_MID), {0, 0}, 4},
{CFE_SB_MSGID_WRAP_VALUE(CI_LAB_HK_TLM_MID), {0, 0}, 4},
// {CFE_SB_MSGID_WRAP_VALUE(TO_LAB_HK_TLM_MID), {0, 0}, 4},
// {CFE_SB_MSGID_WRAP_VALUE(TO_LAB_DATA_TYPES_MID), {0, 0}, 4},
// {CFE_SB_MSGID_WRAP_VALUE(CI_LAB_HK_TLM_MID), {0, 0}, 4},

/* Add these if needed */
{CFE_SB_MSGID_WRAP_VALUE(CF_CONFIG_TLM_MID), {0,0}, 4},
{CFE_SB_MSGID_WRAP_VALUE(CF_HK_TLM_MID), {0,0}, 4},
{CFE_SB_MSGID_WRAP_VALUE(FM_HK_TLM_MID), {0,0}, 4},
{CFE_SB_MSGID_WRAP_VALUE(FM_DIR_LIST_TLM_MID), {0,0}, 4},
{CFE_SB_MSGID_WRAP_VALUE(SC_HK_TLM_MID), {0,0}, 4},
{CFE_SB_MSGID_WRAP_VALUE(DS_HK_TLM_MID), {0,0}, 4},
{CFE_SB_MSGID_WRAP_VALUE(LC_HK_TLM_MID), {0,0}, 4},
// {CFE_SB_MSGID_WRAP_VALUE(CF_CONFIG_TLM_MID), {0,0}, 4},
// {CFE_SB_MSGID_WRAP_VALUE(CF_HK_TLM_MID), {0,0}, 4},
// {CFE_SB_MSGID_WRAP_VALUE(FM_HK_TLM_MID), {0,0}, 4},
// {CFE_SB_MSGID_WRAP_VALUE(FM_DIR_LIST_TLM_MID), {0,0}, 4},
// {CFE_SB_MSGID_WRAP_VALUE(SC_HK_TLM_MID), {0,0}, 4},
// {CFE_SB_MSGID_WRAP_VALUE(DS_HK_TLM_MID), {0,0}, 4},
// {CFE_SB_MSGID_WRAP_VALUE(LC_HK_TLM_MID), {0,0}, 4},

/* cFE Core subscriptions */
{CFE_SB_MSGID_WRAP_VALUE(CFE_ES_HK_TLM_MID), {0, 0}, 4},
{CFE_SB_MSGID_WRAP_VALUE(CFE_EVS_HK_TLM_MID), {0, 0}, 4},
{CFE_SB_MSGID_WRAP_VALUE(CFE_SB_HK_TLM_MID), {0, 0}, 4},
{CFE_SB_MSGID_WRAP_VALUE(CFE_TBL_HK_TLM_MID), {0, 0}, 4},
{CFE_SB_MSGID_WRAP_VALUE(CFE_TIME_HK_TLM_MID), {0, 0}, 4},
{CFE_SB_MSGID_WRAP_VALUE(CFE_TIME_DIAG_TLM_MID), {0, 0}, 4},
{CFE_SB_MSGID_WRAP_VALUE(CFE_SB_STATS_TLM_MID), {0, 0}, 4},
{CFE_SB_MSGID_WRAP_VALUE(CFE_TBL_REG_TLM_MID), {0, 0}, 4},
{CFE_SB_MSGID_WRAP_VALUE(CFE_EVS_LONG_EVENT_MSG_MID), {0, 0}, 32},
// {CFE_SB_MSGID_WRAP_VALUE(CFE_ES_HK_TLM_MID), {0, 0}, 4},
// {CFE_SB_MSGID_WRAP_VALUE(CFE_EVS_HK_TLM_MID), {0, 0}, 4},
// {CFE_SB_MSGID_WRAP_VALUE(CFE_SB_HK_TLM_MID), {0, 0}, 4},
// {CFE_SB_MSGID_WRAP_VALUE(CFE_TBL_HK_TLM_MID), {0, 0}, 4},
// {CFE_SB_MSGID_WRAP_VALUE(CFE_TIME_HK_TLM_MID), {0, 0}, 4},
// {CFE_SB_MSGID_WRAP_VALUE(CFE_TIME_DIAG_TLM_MID), {0, 0}, 4},
// {CFE_SB_MSGID_WRAP_VALUE(CFE_SB_STATS_TLM_MID), {0, 0}, 4},
// {CFE_SB_MSGID_WRAP_VALUE(CFE_TBL_REG_TLM_MID), {0, 0}, 4},
// {CFE_SB_MSGID_WRAP_VALUE(CFE_EVS_LONG_EVENT_MSG_MID), {0, 0}, 32},

/* Component Specifics */
{CFE_SB_MSGID_WRAP_VALUE(CAM_HK_TLM_MID), {0,0}, 32},
{CFE_SB_MSGID_WRAP_VALUE(CAM_EXP_TLM_MID), {0,0}, 32},
{CFE_SB_MSGID_WRAP_VALUE(GENERIC_CSS_HK_TLM_MID), {0,0}, 32},
{CFE_SB_MSGID_WRAP_VALUE(GENERIC_CSS_DEVICE_TLM_MID), {0,0}, 32},
{CFE_SB_MSGID_WRAP_VALUE(GENERIC_EPS_HK_TLM_MID), {0,0}, 32},
{CFE_SB_MSGID_WRAP_VALUE(GENERIC_FSS_HK_TLM_MID), {0,0}, 32},
{CFE_SB_MSGID_WRAP_VALUE(GENERIC_FSS_DEVICE_TLM_MID), {0,0}, 32},
{CFE_SB_MSGID_WRAP_VALUE(GENERIC_IMU_HK_TLM_MID), {0,0}, 32},
{CFE_SB_MSGID_WRAP_VALUE(GENERIC_IMU_DEVICE_TLM_MID), {0,0}, 32},
{CFE_SB_MSGID_WRAP_VALUE(GENERIC_MAG_HK_TLM_MID), {0,0}, 32},
{CFE_SB_MSGID_WRAP_VALUE(GENERIC_MAG_DEVICE_TLM_MID), {0,0}, 32},
{CFE_SB_MSGID_WRAP_VALUE(GENERIC_RADIO_HK_TLM_MID), {0,0}, 32},
{CFE_SB_MSGID_WRAP_VALUE(GENERIC_RW_APP_HK_TLM_MID), {0,0}, 32},
{CFE_SB_MSGID_WRAP_VALUE(GENERIC_TORQUER_HK_TLM_MID), {0,0}, 32},
{CFE_SB_MSGID_WRAP_VALUE(NOVATEL_OEM615_HK_TLM_MID), {0,0}, 32},
{CFE_SB_MSGID_WRAP_VALUE(NOVATEL_OEM615_DEVICE_TLM_MID),{0,0}, 32},
// {CFE_SB_MSGID_WRAP_VALUE(CAM_HK_TLM_MID), {0,0}, 32},
// {CFE_SB_MSGID_WRAP_VALUE(CAM_EXP_TLM_MID), {0,0}, 32},
// {CFE_SB_MSGID_WRAP_VALUE(GENERIC_CSS_HK_TLM_MID), {0,0}, 32},
// {CFE_SB_MSGID_WRAP_VALUE(GENERIC_CSS_DEVICE_TLM_MID), {0,0}, 32},
// {CFE_SB_MSGID_WRAP_VALUE(GENERIC_EPS_HK_TLM_MID), {0,0}, 32},
// {CFE_SB_MSGID_WRAP_VALUE(GENERIC_FSS_HK_TLM_MID), {0,0}, 32},
// {CFE_SB_MSGID_WRAP_VALUE(GENERIC_FSS_DEVICE_TLM_MID), {0,0}, 32},
// {CFE_SB_MSGID_WRAP_VALUE(GENERIC_IMU_HK_TLM_MID), {0,0}, 32},
// {CFE_SB_MSGID_WRAP_VALUE(GENERIC_IMU_DEVICE_TLM_MID), {0,0}, 32},
// {CFE_SB_MSGID_WRAP_VALUE(GENERIC_MAG_HK_TLM_MID), {0,0}, 32},
// {CFE_SB_MSGID_WRAP_VALUE(GENERIC_MAG_DEVICE_TLM_MID), {0,0}, 32},
// {CFE_SB_MSGID_WRAP_VALUE(GENERIC_RADIO_HK_TLM_MID), {0,0}, 32},
// {CFE_SB_MSGID_WRAP_VALUE(GENERIC_RW_APP_HK_TLM_MID), {0,0}, 32},
// {CFE_SB_MSGID_WRAP_VALUE(GENERIC_TORQUER_HK_TLM_MID), {0,0}, 32},
// {CFE_SB_MSGID_WRAP_VALUE(NOVATEL_OEM615_HK_TLM_MID), {0,0}, 32},
// {CFE_SB_MSGID_WRAP_VALUE(NOVATEL_OEM615_DEVICE_TLM_MID),{0,0}, 32},
{CFE_SB_MSGID_WRAP_VALUE(SAMPLE_HK_TLM_MID), {0,0}, 32},
{CFE_SB_MSGID_WRAP_VALUE(SAMPLE_DEVICE_TLM_MID), {0,0}, 32},
{CFE_SB_MSGID_WRAP_VALUE(GENERIC_ADCS_HK_TLM_MID), {0,0}, 32},
{CFE_SB_MSGID_WRAP_VALUE(GENERIC_ADCS_DI_MID), {0,0}, 32},
{CFE_SB_MSGID_WRAP_VALUE(GENERIC_ADCS_AD_MID), {0,0}, 32},
{CFE_SB_MSGID_WRAP_VALUE(GENERIC_ADCS_GNC_MID), {0,0}, 32},
{CFE_SB_MSGID_WRAP_VALUE(GENERIC_ADCS_AC_MID), {0,0}, 32},
{CFE_SB_MSGID_WRAP_VALUE(GENERIC_ADCS_DO_MID), {0,0}, 32},
{CFE_SB_MSGID_WRAP_VALUE(GENERIC_STAR_TRACKER_HK_TLM_MID),{0,0}, 32},
{CFE_SB_MSGID_WRAP_VALUE(GENERIC_STAR_TRACKER_DEVICE_TLM_MID),{0,0}, 32},
{CFE_SB_MSGID_WRAP_VALUE(GENERIC_THRUSTER_HK_TLM_MID), {0,0}, 32},
// {CFE_SB_MSGID_WRAP_VALUE(GENERIC_ADCS_HK_TLM_MID), {0,0}, 32},
// {CFE_SB_MSGID_WRAP_VALUE(GENERIC_ADCS_DI_MID), {0,0}, 32},
// {CFE_SB_MSGID_WRAP_VALUE(GENERIC_ADCS_AD_MID), {0,0}, 32},
// {CFE_SB_MSGID_WRAP_VALUE(GENERIC_ADCS_GNC_MID), {0,0}, 32},
// {CFE_SB_MSGID_WRAP_VALUE(GENERIC_ADCS_AC_MID), {0,0}, 32},
// {CFE_SB_MSGID_WRAP_VALUE(GENERIC_ADCS_DO_MID), {0,0}, 32},
// {CFE_SB_MSGID_WRAP_VALUE(GENERIC_STAR_TRACKER_HK_TLM_MID),{0,0}, 32},
// {CFE_SB_MSGID_WRAP_VALUE(GENERIC_STAR_TRACKER_DEVICE_TLM_MID),{0,0}, 32},
// {CFE_SB_MSGID_WRAP_VALUE(GENERIC_THRUSTER_HK_TLM_MID), {0,0}, 32},

{CFE_SB_MSGID_WRAP_VALUE(SYN_HK_TLM_MID), {0,0}, 32},
// {CFE_SB_MSGID_WRAP_VALUE(SYN_HK_TLM_MID), {0,0}, 32},

}
};
Expand Down
5 changes: 5 additions & 0 deletions scripts/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@
gsw_identified = 1
os.system('cp ./scripts/gsw_ait_build.sh ./cfg/build/gsw_build.sh')
os.system('cp ./scripts/gsw_ait_launch.sh ./cfg/build/gsw_launch.sh')
if (gsw_cfg == 'yamcs'):
# Copy YAMCS script into ./cfg/build
gsw_identified = 1
os.system('cp ./scripts/gsw_yamcs_build.sh ./cfg/build/gsw_build.sh')
os.system('cp ./scripts/gsw_yamcs_launch.sh ./cfg/build/gsw_launch.sh')
if (gsw_identified == 0):
print('Invalid GSW in configuration file!')
print('Exiting due to error...')
Expand Down
3 changes: 2 additions & 1 deletion scripts/docker_debug.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
source $SCRIPT_DIR/env.sh

mkdir -p $BASE_DIR/fsw/build
$DFLAGS_CPUS -v $BASE_DIR:$BASE_DIR -v $USER_NOS3_DIR:$USER_NOS3_DIR -w $BASE_DIR --sysctl fs.mqueue.msg_max=10000 --ulimit rtprio=99 --cap-add=sys_nice --name "nos3_debug" $DBOX bash
# $DFLAGS_CPUS -v $BASE_DIR:$BASE_DIR -v $USER_NOS3_DIR:$USER_NOS3_DIR -w $BASE_DIR --sysctl fs.mqueue.msg_max=10000 --ulimit rtprio=99 --cap-add=sys_nice --name "nos3_debug" $DBOX bash
$DFLAGS_CPUS -v $BASE_DIR:$BASE_DIR -v $USER_NOS3_DIR:$USER_NOS3_DIR -v $USER_YAMCS_DIR:$USER_YAMCS_DIR -p 8090:8090 -w $BASE_DIR --sysctl fs.mqueue.msg_max=10000 --ulimit rtprio=99 --cap-add=sys_nice --name "nos3_debug" $DBOX bash
1 change: 1 addition & 0 deletions scripts/docker_stop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ $DCALL ps --filter=name="ait*" -aq | xargs $DCALL stop > /dev/null 2>&1 &
$DCALL ps --filter=name="influxdb*" -aq | xargs $DCALL stop > /dev/null 2>&1 &
$DCALL ps --filter=name="ttc-command*" -aq | xargs $DCALL stop > /dev/null 2>&1 &
$DCALL ps --filter ancestor="ballaerospace/cosmos:4.5.0" -aq | xargs $DCALL stop > /dev/null 2>&1 &
$DCALL ps --filter=name="cosmos*" -aq | xargs $DCALL stop > /dev/null 2>&1 &

# Intentionally wait to complete
wait
Expand Down
1 change: 1 addition & 0 deletions scripts/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ NUM_CPUS="$( nproc )"

USERDIR=$(cd ~/ && pwd)
USER_NOS3_DIR=$(cd ~/ && pwd)/.nos3
USER_YAMCS_DIR=$(cd ~/ && pwd)/.m2
OPENC3_DIR=$USER_NOS3_DIR/cosmos
OPENC3_PATH=$OPENC3_DIR/openc3.sh

Expand Down
10 changes: 10 additions & 0 deletions scripts/gsw_yamcs_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash -i
#
# Convenience script for NOS3 development
#

CFG_BUILD_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
SCRIPT_DIR=$CFG_BUILD_DIR/../../scripts
source $SCRIPT_DIR/env.sh

#No Build needed for YAMCS, prebuilt - utilized at runtime
11 changes: 11 additions & 0 deletions scripts/gsw_yamcs_launch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash -i
#
# Convenience script for NOS3 development
#

CFG_BUILD_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
SCRIPT_DIR=$CFG_BUILD_DIR/../../scripts
source $SCRIPT_DIR/env.sh

echo "YAMCS Launch ... "
gnome-terminal --tab --title="YAMCS" -- $DFLAGS -v $BASE_DIR:$BASE_DIR -v $USER_YAMCS_DIR:$USER_YAMCS_DIR -v $USER_NOS3_DIR:$USER_NOS3_DIR -p 8090:8090 -p 5012:5012 --name cosmos_openc3-operator_1 -h cosmos --network=nos3_core --network-alias=cosmos -w $USER_NOS3_DIR/yamcs-qs $DBOX mvn yamcs:run
9 changes: 9 additions & 0 deletions scripts/prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ $DCALL image pull $DBOX
echo ""
echo ""

echo "Clone NOS3-YAMCS-QS into local user directory ... "
cd $USER_NOS3_DIR
git clone https://github.com/nasa-itc/yamcs-qs.git
#TODO: Temporary checkout
cd yamcs-qs
git checkout yamcs-nos3
echo ""
echo ""

echo "Prepare 42..."
cd $USER_NOS3_DIR
git clone https://github.com/nasa-itc/42.git --depth 1 -b nos3-main
Expand Down
3 changes: 3 additions & 0 deletions scripts/stop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ killall -q -r -9 core-cpu*
#yes | rm -r $BASE_DIR/gsw/cosmos/COMPONENTS 2> /dev/null
#killall -q -9 firefox

#YAMCS
killall -q -r -9 YAMCS

# CryptoLib
killall -q -r -9 standalone

Expand Down

0 comments on commit 675dcdd

Please sign in to comment.