1 /* Copyright (c) 2013-2021. The SimGrid Team. All rights reserved. */
3 /* This program is free software; you can redistribute it and/or modify it
4 * under the terms of the license (GNU LGPL) which comes with this package. */
6 #ifndef SIMGRID_ROUTING_WIFI_HPP_
7 #define SIMGRID_ROUTING_WIFI_HPP_
9 #include <simgrid/kernel/routing/RoutedZone.hpp>
15 /** @ingroup ROUTING_API
16 * @brief NetZone modeling a Wifi zone
18 * This routing has only one link, representing the wifi medium (ie, the air).
19 * That link is used for all communications within the zone.
21 class XBT_PRIVATE WifiZone : public RoutedZone {
22 resource::LinkImpl* wifi_link_ = nullptr; // Representing the air media (there is no such thing in NS-3)
23 NetPoint* access_point_ = nullptr; // Zone's gateway to the external world
25 void do_seal() override;
28 using RoutedZone::RoutedZone;
29 WifiZone(const WifiZone&) = delete;
30 WifiZone& operator=(const WifiZone) = delete;
32 void get_local_route(const NetPoint* src, const NetPoint* dst, Route* into, double* latency) override;
33 s4u::Link* create_link(const std::string& name, const std::vector<double>& bandwidths) override;
34 NetPoint* get_access_point() const { return access_point_; }
36 } // namespace routing
38 } // namespace simgrid
40 #endif /* SIMGRID_ROUTING_WIFI_HPP_ */