2 // Copyright (c) 2020 Fraunhofer Institute for Applied Information Technology (FIT)
3 // Network Research Group (NET)
4 // Schloss Birlinghoven, 53754 Sankt Augustin, GERMANY
5 // Contact: support@wiback.org
7 // This file is part of the SENF code tree.
8 // It is licensed under the 3-clause BSD License (aka New BSD License).
9 // See LICENSE.txt in the top level directory for details or visit
10 // https://opensource.org/licenses/BSD-3-Clause
15 \brief WirelessNLController non-inline template implementation */
18 #include <boost/range.hpp>
19 #include <boost/range/concepts.hpp>
22 //-/////////////////////////////////////////////////////////////////////////////////////////////////
24 //-/////////////////////////////////////////////////////////////////////////////////////////////////
25 // senf::emu::WirelessNLController::JoinParameters
27 template <typename ForwardReadableRange>
28 prefix_ prefix_ senf::emu::WirelessNLController::JoinParameters::ptr senf::emu::WirelessNLController::JoinParameters::informationElements(ForwardReadableRange const & ies)
30 std::copy( boost::begin(ies), boost::end(ies), back_inserter(ies_));
31 return shared_from_this();
34 //-/////////////////////////////////////////////////////////////////////////////////////////////////
35 // senf::emu::WirelessNLController::NetlinkEvent<EventType>
37 template <typename EventType>
38 prefix_ senf::emu::WirelessNLController::NetlinkEvent<EventType>::NetlinkEvent(WirelessNLController & wnlc)
42 template <typename EventType>
43 prefix_ void senf::emu::WirelessNLController::NetlinkEvent<EventType>::enable()
45 wnlc_.join_multicastGroup(EventType::MCGroup);
48 template <typename EventType>
49 prefix_ void senf::emu::WirelessNLController::NetlinkEvent<EventType>::disable()
51 wnlc_.leave_multicastGroup(EventType::MCGroup);
54 //-/////////////////////////////////////////////////////////////////////////////////////////////////
55 // senf::emu::WirelessNLController
57 template <typename ForwardReadableRange>
58 prefix_ void senf::emu::WirelessNLController::trigger_scan(ForwardReadableRange const & frequencies)
60 std::set<frequency_type> freqs;
61 std::copy(boost::begin(frequencies), boost::end(frequencies), std::back_inserter(freqs));
62 do_trigger_scan(freqs);
65 //-/////////////////////////////////////////////////////////////////////////////////////////////////