30 ns3::Ptr<cpps::AmrMobilityModelNs3> mobility,
int id_for_friendly,
31 ns3::Ptr<ns3::Socket> socket);
33 void connect(ns3::InetSocketAddress endpoint);
36 void mobilityCallback();
38 void readFromSocket(ns3::Ptr<ns3::Socket> socket);
42 static constexpr uint32_t kUpdateFrequencyHz = 30;
43 void sendFieldMessage(
const std::string &content);
45 ns3::EventId next_update_event_;
49 ns3::Ptr<AmrMobilityModelNs3> mobility_;
54 ns3::Ptr<ns3::Socket> socket_;
58 enum class State { kIdle, kMoving, kLoading, kUnloading } state_ = State::kIdle;
60 std::string generatePosUpdate();