Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/simulation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,5 @@ The simulation example is controlled via a makefile with multiple targets:
* `make station`: Build the `testsim` station variant which provides a Unix domain socket adapter to the lgw API
* `make sim`: Run the simulation in a single process. Log output of all components is interleaved in one terminal
* `make tmux`: Run the simulation in multiple processes inside different panes of a tmux split window.
* `make stationsim`: Start a basic station that generates an uplink every 10 seconds. Edit `tc.uri` with the LNS endpoint.
* `make clean`: Clean local directory of temporary files
3 changes: 3 additions & 0 deletions examples/simulation/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ station:
sim: station
PATH=${TD}/build-${platform}-${variant}/bin:${PATH} python sim.py

stationsim: station
PATH=${TD}/build-${platform}-${variant}/bin:${PATH} python sim.py stationsim

tmux: station
@if [ -z "${TMUX}" ]; then \
echo "Starting new tmux session" ; \
Expand Down
5 changes: 5 additions & 0 deletions examples/simulation/sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,16 @@ async def start_test():
await start_sim()
await start_station()

async def start_stationsim():
await start_lgwsim()
await start_station()

func = None
if len(sys.argv) > 1:
func = {
'tc': start_tcsim,
'lgwsim': start_lgwsim,
'stationsim': start_stationsim,
'sim': start_sim,
'station': start_station
}.get(sys.argv[1], None)
Expand Down