Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add imsl/irdm #328

Merged
merged 3 commits into from
Sep 17, 2024
Merged
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
11 changes: 6 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ resolver = "2"

[workspace.package]
edition = "2021"
version = "1.2.0"
version = "1.3.0"
authors = ["Fred Clausen", "Mike Nye", "Alex Austin"]
description = "ACARS Router: A Utility to ingest ACARS/VDLM2/HFDL from many sources, process, and feed out to many consumers."
description = "ACARS Router: A Utility to ingest ACARS/VDLM2/HFDL/IMSL/IRDM from many sources, process, and feed out to many consumers."
documentation = "https://github.com/sdr-enthusiasts/acars_router"
homepage = "https://github.com/sdr-enthusiasts/acars_router"
repository = "https://github.com/sdr-enthusiasts/acars_router"
Expand Down
14 changes: 13 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,31 @@ ENV AR_LISTEN_UDP_ACARS=5550 \
AR_LISTEN_TCP_VDLM2=5555 \
AR_LISTEN_UDP_HFDL=5556 \
AR_LISTEN_TCP_HFDL=5556 \
AR_LISTEN_UDP_IMSL=5557 \
AR_LISTEN_TCP_IMSL=5557 \
AR_LISTEN_UDP_IRDM=5558 \
AR_LISTEN_TCP_IRDM=5558 \
AR_LISTEN_ZMQ_ACARS=35550 \
AR_LISTEN_ZMQ_VDLM2=35555 \
AR_LISTEN_ZMQ_HFDL=35556 \
AR_LISTEN_ZMQ_IMSL=35557 \
AR_LISTEN_ZMQ_IRDM=35558 \
AR_SERVE_TCP_ACARS=15550 \
AR_SERVE_TCP_VDLM2=15555 \
AR_SERVE_TCP_HFDL=15556 \
AR_SERVE_TCP_IMSL=15557 \
AR_SERVE_TCP_IRDM=15558 \
AR_SERVE_ZMQ_ACARS=45550 \
AR_SERVE_ZMQ_VDLM2=45555 \
AR_SERVE_ZMQ_HFDL=45556 \
AR_SERVE_ZMQ_IMSL=45557 \
AR_SERVE_ZMQ_IRDM=45558 \
AR_ADD_PROXY_ID=true \
AR_DISABLE_ACARS=false \
AR_DISABLE_VDLM2=false \
AR_DISABLE_HFDL=false
AR_DISABLE_HFDL=false \
AR_DISABLE_IMSL=false \
AR_DISABLE_IRDM=false

SHELL ["/bin/bash", "-o", "pipefail", "-c"]
COPY ./rootfs /
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.build_binary
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rust:1.81.0 as builder
FROM rust:1.81.0 AS builder
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
WORKDIR /tmp/acars_router
# hadolint ignore=DL3008,DL3003,SC1091,DL3009
Expand Down
14 changes: 13 additions & 1 deletion Dockerfile.local
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,31 @@ ENV AR_LISTEN_UDP_ACARS=5550 \
AR_LISTEN_TCP_VDLM2=5555 \
AR_LISTEN_UDP_HFDL=5556 \
AR_LISTEN_TCP_HFDL=5556 \
AR_LISTEN_UDP_IMSL=5557 \
AR_LISTEN_TCP_IMSL=5557 \
AR_LISTEN_UDP_IRDM=5558 \
AR_LISTEN_TCP_IRDM=5558 \
AR_LISTEN_ZMQ_ACARS=35550 \
AR_LISTEN_ZMQ_VDLM2=35555 \
AR_LISTEN_ZMQ_HFDL=35556 \
AR_LISTEN_ZMQ_IMSL=35557 \
AR_LISTEN_ZMQ_IRDM=35558 \
AR_SERVE_TCP_ACARS=15550 \
AR_SERVE_TCP_VDLM2=15555 \
AR_SERVE_TCP_HFDL=15556 \
AR_SERVE_TCP_IMSL=15557 \
AR_SERVE_TCP_IRDM=15558 \
AR_SERVE_ZMQ_ACARS=45550 \
AR_SERVE_ZMQ_VDLM2=45555 \
AR_SERVE_ZMQ_HFDL=45556 \
AR_SERVE_ZMQ_IMSL=45557 \
AR_SERVE_ZMQ_IRDM=45558 \
AR_ADD_PROXY_ID=true \
AR_DISABLE_ACARS=false \
AR_DISABLE_VDLM2=false \
AR_DISABLE_HFDL=false
AR_DISABLE_HFDL=false \
AR_DISABLE_IMSL=false \
AR_DISABLE_IRDM=false

SHELL ["/bin/bash", "-o", "pipefail", "-c"]
COPY rootfs /
Expand Down
50 changes: 40 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# sdr-enthusiasts/acars_router

`acars_router` receives, validates, deduplicates, modifies and routes ACARS and VDLM2 JSON messages.
`acars_router` receives, validates, deduplicates, modifies and routes ACARS/VDLM2/HFDL/IMSL/IRDM JSON messages.

## Example Feeder `docker-compose.yml`

Expand Down Expand Up @@ -67,21 +67,31 @@ All ports are configurable. By default, the following ports will be used:

| Port | Protocol | Description |
| ------- | -------- | -------------------------------------------------------------------------------- |
| `5550` | `UDP` | ACARS injest. Clients will send acars data to this port via UDP. |
| `5550` | `TCP` | ACARS injest. Clients will send acars data to this port via TCP. |
| `5555` | `UDP` | VDLM2 injest. Clients will send VDLM2 data to this port via UDP. |
| `5555` | `TCP` | VDLM2 injest. Clients will send VDLM2 data to this port via TCP. |
| `5556` | `UDP` | HFDL injest. Clients will send HFDL data to this port via UDP. |
| `5556` | `TCP` | HFDL injest. Clients will send HFDL data to this port via TCP. |
| `5550` | `UDP` | ACARS ingest. Clients will send ACARS data to this port via UDP. |
| `5550` | `TCP` | ACARS ingest. Clients will send ACARS data to this port via TCP. |
| `5555` | `UDP` | VDLM2 ingest. Clients will send VDLM2 data to this port via UDP. |
| `5555` | `TCP` | VDLM2 ingest. Clients will send VDLM2 data to this port via TCP. |
| `5556` | `UDP` | HFDL ingest. Clients will send HFDL data to this port via UDP. |
| `5556` | `TCP` | HFDL ingest. Clients will send HFDL data to this port via TCP. |
| `5557` | `UDP` | IMSL ingest. Clients will send IMSL data to this port via UDP. |
| `5557` | `TCP` | IMSL ingest. Clients will send IMSL data to this port via TCP. |
| `5558` | `UDP` | IRDM ingest. Clients will send IRDM data to this port via UDP. |
| `5558` | `TCP` | IRDM ingest. Clients will send IRDM data to this port via TCP. |
| `15550` | `TCP` | ACARS server. Can be used for other clients to connect and get messages |
| `15555` | `TCP` | VDLM2 server. Can be used for other clients to connect and get messages |
| `15556` | `TCP` | HFDL server. Can be used for other clients to connect and get messages |
| `35550` | `ZMQ` | ACARS injest. Clients will connect to this port and send acars messages over ZMQ |
| `35555` | `ZMQ` | VDLM2 injest. Clients will connect to this port and send VDLM2 messages over ZMQ |
| `35556` | `ZMQ` | HFDL injest. Clients will connect to this port and send HFDL messages over ZMQ |
| `15557` | `TCP` | IMSL server. Can be used for other clients to connect and get messages |
| `15558` | `TCP` | IRDM server. Can be used for other clients to connect and get messages |
| `35550` | `ZMQ` | ACARS ingest. Clients will connect to this port and send ACARS messages over ZMQ |
| `35555` | `ZMQ` | VDLM2 ingest. Clients will connect to this port and send VDLM2 messages over ZMQ |
| `35556` | `ZMQ` | HFDL ingest. Clients will connect to this port and send HFDL messages over ZMQ |
| `35557` | `ZMQ` | IMSL ingest. Clients will connect to this port and send IMSL messages over ZMQ |
| `35558` | `ZMQ` | IRDM ingest. Clients will connect to this port and send IRDM messages over ZMQ |
| `45550` | `ZMQ` | ACARS server. Can be used for other ZMQ clients to connect and get messages |
| `45555` | `ZMQ` | VDLM2 server. Can be used for other ZMQ clients to connect and get messages |
| `45556` | `ZMQ` | HFDL server. Can be used for other ZMQ clients to connect and get messages |
| `45557` | `ZMQ` | IMSL server. Can be used for other ZMQ clients to connect and get messages |
| `45558` | `ZMQ` | IRDM server. Can be used for other ZMQ clients to connect and get messages |

If you want any port(s) to be exposed outside of the docker network, please be sure to append them to the ports section of the `docker-compose.yml` file.

Expand Down Expand Up @@ -110,15 +120,23 @@ The nomenclature for the environment variables is as follows:
| AR_SEND_UDP_ACARS | --send-udp-acars | `unset` | UDP host:port to send ACARS messages to |
| AR_SEND_UDP_VDLM2 | --send-udp-vdlm2 | `unset` | UDP host:port to send VDLM2 messages to |
| AR_SEND_UDP_HFDL | --send-udp-hfdl | `unset` | UDP host:port to send HFDL messages to |
| AR_SEND_UDP_IMSL | --send-udp-imsl | `unset` | UDP host:port to send IMSL messages to |
| AR_SEND_UDP_IRDM | --send-udp-irdm | `unset` | UDP host:port to send IRDM messages to |
| AR_SEND_TCP_ACARS | --send-tcp-acars | `unset` | TCP host:port to send ACARS messages to |
| AR_SEND_TCP_VDLM2 | --send-tcp-vdlm2 | `unset` | TCP host:port to send VDLM2 messages to |
| AR_SEND_TCP_HFDL | --send-tcp-hfdl | `unset` | TCP host:port to send HFDL messages to |
| AR_SEND_TCP_IMSL | --send-tcp-imsl | `unset` | TCP host:port to send IMSL messages to |
| AR_SEND_TCP_IRDM | --send-tcp-irdm | `unset` | TCP host:port to send IRDM messages to |
| AR_SERVE_TCP_ACARS | --serve-tcp-acars | `15550` | TCP port to serve ACARS messages to |
| AR_SERVE_TCP_VDLM2 | --serve-tcp-vdlm2 | `15555` | TCP port to serve VDLM2 messages to |
| AR_SERVE_TCP_HFDL | --serve-tcp-hfdl | `15556` | TCP port to serve HFDL messages to |
| AR_SERVE_TCP_IMSL | --serve-tcp-imsl | `15557` | TCP port to serve IMSL messages to |
| AR_SERVE_TCP_IRDM | --serve-tcp-irdm | `15558` | TCP port to serve IRDM messages to |
| AR_SERVE_ZMQ_ACARS | --serve-zmq-acars | `45550` | ZMQ port to serve ACARS messages to |
| AR_SERVE_ZMQ_VDLM2 | --serve-zmq-vdlm2 | `45555` | ZMQ port to serve VDLM2 messages to |
| AR_SERVE_ZMQ_HFDL | --serve-zmq-hfdl | `45556` | ZMQ port to serve HFDL messages to |
| AR_SERVE_ZMQ_IMSL | --serve-zmq-imsl | `45557` | ZMQ port to serve IMSL messages to |
| AR_SERVE_ZMQ_IRDM | --serve-zmq-irdm | `45558` | ZMQ port to serve IRDM messages to |

### Inbound data

Expand All @@ -127,18 +145,28 @@ The nomenclature for the environment variables is as follows:
| AR_RECV_ZMQ_ACARS | --recv-zmq-acars | `unset` | ZMQ host:port to receive ACARS messages from |
| AR_RECV_ZMQ_VDLM2 | --recv-zmq-vdlm2 | `unset` | ZMQ host:port to receive VDLM2 messages from |
| AR_RECV_ZMQ_HFDL | --recv-zmq-hfdl | `unset` | ZMQ host:port to receive HFDL messages from |
| AR_RECV_ZMQ_IMSL | --recv-zmq-imsl | `unset` | ZMQ host:port to receive IMSL messages from |
| AR_RECV_ZMQ_IRDM | --recv-zmq-irdm | `unset` | ZMQ host:port to receive IRDM messages from |
| AR_RECV_TCP_ACARS | --recv-tcp-acars | `unset` | TCP host:port to receive ACARS messages from |
| AR_RECV_TCP_VDLM2 | --recv-tcp-vdlm2 | `unset` | TCP host:port to receive VDLM2 messages from |
| AR_RECV_TCP_HFDL | --recv-tcp-hfdl | `unset` | TCP host:port to receive HFDL messages from |
| AR_RECV_TCP_IMSL | --recv-tcp-imsl | `unset` | TCP host:port to receive IMSL messages from |
| AR_RECV_TCP_IRDM | --recv-tcp-irdm | `unset` | TCP host:port to receive IRDM messages from |
| AR_LISTEN_TCP_ACARS | --listen-tcp-acars | `5550` | TCP port to listen for ACARS messages from |
| AR_LISTEN_TCP_VDLM2 | --listen-tcp-vdlm2 | `5555` | TCP port to listen for VDLM2 messages from |
| AR_LISTEN_TCP_HFDL | --listen-tcp-hfdl | `5556` | TCP port to listen for HFDL messages from |
| AR_LISTEN_TCP_IMSL | --listen-tcp-imsl | `5557` | TCP port to listen for IMSL messages from |
| AR_LISTEN_TCP_IRDM | --listen-tcp-irdm | `5558` | TCP port to listen for IRDM messages from |
| AR_LISTEN_UDP_ACARS | --listen-udp-acars | `5550` | UDP port to listen for ACARS messages from |
| AR_LISTEN_UDP_VDLM2 | --listen-udp-vdlm2 | `5555` | UDP port to listen for VDLM2 messages from |
| AR_LISTEN_UDP_HFDL | --listen-udp-hfdl | `5556` | UDP port to listen for HFDL messages from |
| AR_LISTEN_UDP_IMSL | --listen-udp-imsl | `5557` | UDP port to listen for IMSL messages from |
| AR_LISTEN_UDP_IRDM | --listen-udp-irdm | `5558` | UDP port to listen for IRDM messages from |
| AR_LISTEN_ZMQ_ACARS | --listen-zmq-acars | `35550` | ZMQ port to listen for ACARS messages from |
| AR_LISTEN_ZMQ_VDLM2 | --listen-zmq-vdlm2 | `35555` | ZMQ port to listen for VDLM2 messages from |
| AR_LISTEN_ZMQ_HFDL | --listen-zmq-hfdl | `35556` | ZMQ port to listen for HFDL messages from |
| AR_LISTEN_ZMQ_IMSL | --listen-zmq-imsl | `35557` | ZMQ port to listen for IMSL messages from |
| AR_LISTEN_ZMQ_IRDM | --listen-zmq-irdm | `35558` | ZMQ port to listen for IRDM messages from |

### General Options

Expand All @@ -157,3 +185,5 @@ The nomenclature for the environment variables is as follows:
| AR_DISABLE_ACARS | --disable-acars | `false` | Disable ACARS processing. Valid values are `true` or `false` |
| AR_DISABLE_VDLM2 | --disable-vdlm | `false` | Disable VDLM processing. Valid values are `true` or `false` |
| AR_DISABLE_HFDL | --disable-hfdl | `false` | Disable HFDL processing. Valid values are `true` or `false` |
| AR_DISABLE_IMSL | --disable-imsl | `false` | Disable IMSL processing. Valid values are `true` or `false` |
| AR_DISABLE_IRDM | --disable-irdm | `false` | Disable IRDM processing. Valid values are `true` or `false` |
80 changes: 80 additions & 0 deletions rootfs/etc/s6-overlay/scripts/acars_router
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,50 @@ if [[ -n $AR_RECV_ZMQ_HFDL ]]; then
AR_COMMAND+=("--receive-zmq-hfdl" "$AR_RECV_ZMQ_HFDL")
fi

# IMSL input

if [[ -n $AR_LISTEN_UDP_IMSL ]]; then
AR_COMMAND+=("--listen-udp-imsl" "$AR_LISTEN_UDP_IMSL")
fi

if [[ -n $AR_LISTEN_TCP_IMSL ]]; then
AR_COMMAND+=("--listen-tcp-imsl" "$AR_LISTEN_TCP_IMSL")
fi

if [[ -n $AR_LISTEN_ZMQ_IMSL ]]; then
AR_COMMAND+=("--listen-zmq-imsl" "$AR_LISTEN_ZMQ_IMSL")
fi

if [[ -n $AR_RECV_TCP_IMSL ]]; then
AR_COMMAND+=("--receive-tcp-imsl" "$AR_RECV_TCP_IMSL")
fi

if [[ -n $AR_RECV_ZMQ_IMSL ]]; then
AR_COMMAND+=("--receive-zmq-imsl" "$AR_RECV_ZMQ_IMSL")
fi

# IRDM input

if [[ -n $AR_LISTEN_UDP_IRDM ]]; then
AR_COMMAND+=("--listen-udp-irdm" "$AR_LISTEN_UDP_IRDM")
fi

if [[ -n $AR_LISTEN_TCP_IRDM ]]; then
AR_COMMAND+=("--listen-tcp-irdm" "$AR_LISTEN_TCP_IRDM")
fi

if [[ -n $AR_LISTEN_ZMQ_IRDM ]]; then
AR_COMMAND+=("--listen-zmq-irdm" "$AR_LISTEN_ZMQ_IRDM")
fi

if [[ -n $AR_RECV_TCP_IRDM ]]; then
AR_COMMAND+=("--receive-tcp-irdm" "$AR_RECV_TCP_IRDM")
fi

if [[ -n $AR_RECV_ZMQ_IRDM ]]; then
AR_COMMAND+=("--receive-zmq-irdm" "$AR_RECV_ZMQ_IRDM")
fi

# ACARS Output

if [[ -n $AR_SEND_UDP_ACARS ]]; then
Expand Down Expand Up @@ -123,4 +167,40 @@ if [[ -n $AR_SERVE_ZMQ_HFDL ]]; then
AR_COMMAND+=("--serve-zmq-hfdl" "$AR_SERVE_ZMQ_HFDL")
fi

# IMSL Output

if [[ -n $AR_SEND_UDP_IMSL ]]; then
AR_COMMAND+=("--send-udp-imsl" "$AR_SEND_UDP_IMSL")
fi

if [[ -n $AR_SEND_TCP_IMSL ]]; then
AR_COMMAND+=("--send-tcp-imsl" "$AR_SEND_TCP_IMSL")
fi

if [[ -n $AR_SERVE_TCP_IMSL ]]; then
AR_COMMAND+=("--serve-tcp-imsl" "$AR_SERVE_TCP_IMSL")
fi

if [[ -n $AR_SERVE_ZMQ_IMSL ]]; then
AR_COMMAND+=("--serve-zmq-imsl" "$AR_SERVE_ZMQ_IMSL")
fi

# IRDM Output

if [[ -n $AR_SEND_UDP_IRDM ]]; then
AR_COMMAND+=("--send-udp-irdm" "$AR_SEND_UDP_IRDM")
fi

if [[ -n $AR_SEND_TCP_IRDM ]]; then
AR_COMMAND+=("--send-tcp-irdm" "$AR_SEND_TCP_IRDM")
fi

if [[ -n $AR_SERVE_TCP_IRDM ]]; then
AR_COMMAND+=("--serve-tcp-irdm" "$AR_SERVE_TCP_IRDM")
fi

if [[ -n $AR_SERVE_ZMQ_IRDM ]]; then
AR_COMMAND+=("--serve-zmq-irdm" "$AR_SERVE_ZMQ_IRDM")
fi

/opt/acars_router "${AR_COMMAND[@]}"
Loading
Loading