-
Notifications
You must be signed in to change notification settings - Fork 0
Routing Engine
AISMixer routing maps internal source IDs to named egress target IDs through logical source zones and ordered route declarations.
Legacy mode is active when no routing table is installed:
- no active routing table;
- global deduplication;
- broadcast to all configured UDP forwarders;
- unnamed forwarders remain valid.
This is the default behavior when routing: is omitted or routing: null is used in the startup configuration.
Routing mode is active when a valid routing table is loaded at startup or installed through runtime control:
- named UDP targets;
- internal
source_id; - internal
target_id; - ordered routes;
- immutable routing table;
- target-scoped deduplication.
Route matching uses internal source_id. It does not use the emitted NMEA TAG s.
Unknown target IDs fail validation. Current route targets must reference named UDP forwarders already available in the running process.
Routing is applied after direct extraction of !AIVDM and !AIVDO; both sentence types use the same source_id match, route selection, and target-scoped deduplication behavior.
udp:<input-id>
udp:<mapped-alias>
udp:<remote-ip>
udpsec:<authenticated-station-id>
udp:<forwarder-id>
Plain UDP input source identity prefers udp_inputs[].id, then UDP alias map, then remote IP. UDPSEC source identity is based on the authenticated station ID. Named UDP forwarders become target IDs such as udp:aishub.
Zones are logical sets of source IDs. They are not geographic AIS areas and do not inspect coordinates, MMSI, vessel type, payload content, or TAG metadata.
Supported operations:
| Operation | Meaning |
|---|---|
include |
Defines a zone directly from listed source IDs. |
union |
Combines source IDs from named operand zones. |
intersection |
Keeps source IDs present in every named operand zone. |
difference |
Starts with the first operand zone and removes source IDs from later operand zones. |
routing:
zones:
fixed_udp:
include:
- udp:roof_receiver
- udp:dock_gate
secure_stations:
include:
- udpsec:rPiAIS002
trusted_sources:
union:
- fixed_udp
- secure_stations
trusted_fixed_sources:
intersection:
- trusted_sources
- fixed_udp
public_without_secure:
difference:
- trusted_sources
- secure_stationsOperands for union, intersection, and difference are zone names, not source IDs.
Routes are evaluated in declaration order. Multiple matching routes may contribute target IDs. Repeated targets are deduplicated by first occurrence.
routing:
routes:
- name: trusted_to_debug
from_zone: trusted_sources
to:
- udp:local_debug
- name: public_platforms
from_zone: public_without_secure
to:
- udp:aishubSee the main repository examples: