This project is an AIS (Automatic Identification System) message simulator written in Rust. The simulator reads AIS messages from a specified file and sends them over UDP to a target address. It also includes an optional receiver that can capture these messages and save them to a file. The sending order of the AIS messages can be randomized, and the sending delay is randomized within a specified range.
- Send AIS messages from a file to a specified target address over UDP.
- Randomize the order of AIS messages.
- Randomize the delay between sending messages within a specified range.
- Optional receiver to capture and save received messages to a file.
- Continuous streaming of messages until stopped manually.
- Rust programming language (install from rust-lang.org)
cargo
package manager
-
Clone the repository:
git clone https://github.com/salsabiljb/AIS.git cd AIS/ais_messages_simulator
-
Build the project:
cargo build --release
To run the sender that reads AIS messages from a file and sends them over UDP:
cargo run -- --sender-file-path /path/to/AIS_messages.txt --target-addr 127.0.0.1:50000
To run both the sender and receiver:
cargo run -- --sender-file-path /path/to/AIS_messages.txt --target-addr 127.0.0.1:50000 --bind-addr 127.0.0.1:50000 --receiver-file-path /path/to/udp_messages.txt
--sender-file-path
: Path to the file containing AIS messages.--target-addr
: Target address (IP:port) to send UDP messages.--bind-addr
(optional): Address (IP:port) to bind the receiver.--receiver-file-path
(optional): Path to the file where received messages will be saved.