AntHocNet 2.0.0
Paper-faithful ant-colony ad hoc routing: the shared core and its adapters
Loading...
Searching...
No Matches
types.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-only
2// Copyright (C) 2026 Daniel Henrique Joppi
3
4/**
5 * Simulator-agnostic fundamental types for the AntHocNet algorithm core.
6 *
7 * Nothing in core/ may include an NS-2 or NS-3 header. Addresses are modelled
8 * with a plain integer so both simulators (whose own address types are
9 * integral) can pass values straight through their adapters.
10 */
11#ifndef ANTHOCNET_CORE_TYPES_H
12#define ANTHOCNET_CORE_TYPES_H
13
14#include <cstdint>
15
16namespace anthocnet {
17namespace core {
18
19/// Network-layer node address. Matches the width of ns-2's nsaddr_t and
20/// ns-3's 32-bit IPv4 address payload.
21using NodeAddress = std::int32_t;
22
23/// Simulation time, in seconds.
24using Time = double;
25
26/// "No such node / no route" sentinel, mirroring the legacy use of -1.
28
29} // namespace core
30} // namespace anthocnet
31
32#endif // ANTHOCNET_CORE_TYPES_H
double Time
Simulation time, in seconds.
Definition types.h:24
constexpr NodeAddress kInvalidAddress
"No such node / no route" sentinel, mirroring the legacy use of -1.
Definition types.h:27
std::int32_t NodeAddress
Network-layer node address.
Definition types.h:21
AntHistoryTracker: (src, seqNum) duplicate detection.
Definition ant_history.h:24