Skip to content

Commit

Permalink
Merge pull request #299 from #269
Browse files Browse the repository at this point in the history
[#269] Local COSMOS functional;
  • Loading branch information
jlucas9 authored May 8, 2024
2 parents 22e7b9d + 037bc8c commit 071f6e6
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 144 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ build-sim:
$(MAKE) --no-print-directory -C $(SIMBUILDDIR) install

checkout:
./scripts/checkout.sh
./scripts/docker_checkout.sh

clean:
$(MAKE) clean-fsw
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,17 @@ The best source of documentation can be found at [the wiki](https://github.com/n

### Prerequisites
Each of the applications listed below are required prior to performing the installation procedure:
* Option A
* Option A, you already use Linux
* [Git 2.36+](https://git-scm.com/)
* Linux with docker and docker compose installed
* Option B
* Option B, deployment of a virtual machine (VM)
* [Git 2.36+](https://git-scm.com/)
* [Vagrant 2.3.4+](https://www.vagrantup.com/)
* [VirtualBox 7.0+](https://www.virtualbox.org/)

### Installing
Option B only.
Will provision a VM with all required packages installed to be used immediately.
1. Clone the repository `git clone https://github.com/nasa/nos3.git`
2. `cd nos3`
3. Clone the submodules `git submodule update --init --recursive`
Expand Down
12 changes: 1 addition & 11 deletions cfg/InOut/Inp_IPC.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
<<<<<<<<<<<<<<< 42: InterProcess Comm Configuration File >>>>>>>>>>>>>>>>
17 ! Number of Sockets
********************************** Sample IPC *****************************
TX ! IPC Mode (OFF,TX,RX,TXRX,ACS,WRITEFILE,READFILE)
0 ! AC.ID for ACS mode
"State00.42" ! File name for WRITE or READ
SERVER ! Socket Role (SERVER,CLIENT,GMSEC_CLIENT)
fortytwo 4242 ! Server Host Name, Port
FALSE ! Allow Blocking (i.e. wait on RX)
FALSE ! Echo to stdout
1 ! Number of TX prefixes
"SC" ! Prefix 0
16 ! Number of Sockets
********************************** RW 0 to 42 *****************************
RX ! IPC Mode (OFF,TX,RX,TXRX,ACS,WRITEFILE,READFILE)
0 ! AC.ID for ACS mode
Expand Down
3 changes: 3 additions & 0 deletions cfg/sims/nos3-simulator.xml
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,15 @@
</connection>
</connections>
<data-provider>
<type>SAMPLE_PROVIDER</type>
<!--
<type>SAMPLE_42_PROVIDER</type>
<hostname>fortytwo</hostname>
<port>4242</port>
<max-connection-attempts>30</max-connection-attempts>
<retry-wait-seconds>1</retry-wait-seconds>
<spacecraft>0</spacecraft>
-->
</data-provider>
</hardware-model>
</simulator>
Expand Down
2 changes: 1 addition & 1 deletion gsw/cosmos
Submodule cosmos updated 1 files
+28 −28 config/system/system.txt
112 changes: 0 additions & 112 deletions scripts/docker-compose.yml

This file was deleted.

Empty file modified scripts/docker_build_cryptolib.sh
100644 → 100755
Empty file.
9 changes: 4 additions & 5 deletions scripts/checkout.sh → scripts/docker_checkout.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@ echo ""
# Replace `--tab` with `--window-with-profile=KeepOpen` once you've created this gnome-terminal profile manually

#echo "42..."
#cd /opt/nos3/42/
#rm -rf NOS3InOut
#cp -r $BASE_DIR/sims/cfg/InOut /opt/nos3/42/NOS3InOut
#rm -rf $USER_NOS3_DIR/42/NOS3InOut
#cp -r $BASE_DIR/cfg/build/InOut $USER_NOS3_DIR/42/NOS3InOut
#xhost +local:*
#gnome-terminal --window-with-profile=KeepOpen --title="42" -- $DFLAGS -e DISPLAY=$DISPLAY -v /opt/nos3/42/NOS3InOut:/opt/nos3/42/NOS3InOut -v /tmp/.X11-unix:/tmp/.X11-unix:ro --name $SC_NUM"_fortytwo" -h fortytwo --network=$SC_NETNAME -w /opt/nos3/42 -t $DBOX /opt/nos3/42/42 NOS3InOut
#gnome-terminal --tab --title=$SC_NUM" - 42" -- $DFLAGS -e DISPLAY=$DISPLAY -v $USER_NOS3_DIR:$USER_NOS3_DIR -v /tmp/.X11-unix:/tmp/.X11-unix:ro --name $SC_NUM"_fortytwo" -h fortytwo --network=$SC_NETNAME -w $USER_NOS3_DIR/42 -t $DBOX $USER_NOS3_DIR/42/42 NOS3InOut
#echo ""

echo "NOS Core..."
Expand All @@ -44,6 +43,6 @@ gnome-terminal --tab --title="Sample Sim" -- $DFLAGS -v $SIM_DIR:$SIM_DIR --na
# make

# Rename for your checkout under test to allow checkout
gnome-terminal --title="Sample Sim" -- $DFLAGS -v $BASE_DIR:$BASE_DIR --name $SC_NUM"_sample_checkout" --network=$SC_NETNAME -w $BASE_DIR $DBOX ./components/sample/support/build/sample_checkout
gnome-terminal --title="Sample Checkout" -- $DFLAGS -v $BASE_DIR:$BASE_DIR --name $SC_NUM"_sample_checkout" --network=$SC_NETNAME -w $BASE_DIR $DBOX ./components/sample/support/build/sample_checkout

echo ""
17 changes: 7 additions & 10 deletions scripts/gsw_cosmos_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,11 @@ CFG_BUILD_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd
SCRIPT_DIR=$CFG_BUILD_DIR/../../scripts
source $SCRIPT_DIR/env.sh

# Debugging
#echo "Script directory = " $SCRIPT_DIR
#echo "Base directory = " $BASE_DIR
#exit

#echo "Make /tmp folders..."
#mkdir /tmp/data 2> /dev/null
#mkdir /tmp/data/hk 2> /dev/null
#mkdir /tmp/uplink 2> /dev/null

echo "COSMOS build..."
mkdir $GSW_DIR/COMPONENTS 2> /dev/null
rm -r $GSW_DIR/COMPONENTS/* 2> /dev/null
for i in $(find $BASE_DIR/components/ -name "gsw" -type d)
do
#echo "$i"
cp -r $i/* $GSW_DIR/COMPONENTS/
done
1 change: 0 additions & 1 deletion scripts/prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ echo ""
echo "Clone openc3-cosmos into local user directory..."
cd $USER_NOS3_DIR
git clone https://github.com/nasa-itc/openc3-nos3.git --depth 1 -b main $USER_NOS3_DIR/cosmos
git reset --hard
echo ""
echo ""

Expand Down

0 comments on commit 071f6e6

Please sign in to comment.