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 EmulatedDVBInterface inline non-template implementation */
17 #include "EmulatedDVBInterface.ih"
21 #define prefix_ inline
22 //-/////////////////////////////////////////////////////////////////////////////////////////////////
24 //-/////////////////////////////////////////////////////////////////////////////////////////////////
25 // senf::emu::detail::EmulatedDVBInterface
27 prefix_ void senf::emu::EmulatedDVBInterface::v_id(MACAddress const & id)
32 prefix_ senf::MACAddress senf::emu::EmulatedDVBInterface::v_id()
38 prefix_ void senf::emu::EmulatedDVBInterface::v_enable()
40 enableEmulatedInterface();
43 prefix_ void senf::emu::EmulatedDVBInterface::v_disable()
45 disableEmulatedInterface();
48 prefix_ bool senf::emu::EmulatedDVBInterface::v_enabled()
51 return emulatedInterfaceEnabled();
54 prefix_ unsigned senf::emu::EmulatedDVBInterface::v_frequency()
57 return emulatedFrequency();
60 prefix_ unsigned senf::emu::EmulatedDVBInterface::v_bandwidth()
63 return emulatedBandwidth();
66 prefix_ void senf::emu::EmulatedDVBInterface::v_frequency(unsigned frequency, unsigned bandwidth)
68 emulatedFrequency(frequency, bandwidth);
71 prefix_ void senf::emu::EmulatedDVBInterface::v_coverageRange(unsigned distance)
73 emulatedCoverageRange(distance);
76 prefix_ void senf::emu::EmulatedDVBInterface::registerFrequency(unsigned frequency)
78 registerFrequency(frequency, frequency);
81 prefix_ void senf::emu::EmulatedDVBInterface::registerFrequency(unsigned frequencyLower, unsigned frequencyUpper)
83 WirelessInterface::registerFrequency(frequencyLower, frequencyUpper, 8000, 8000); // we assume a fixed bandwidth of 8 MHz
86 //-/////////////////////////////////////////////////////////////////////////////////////////////////
87 // senf::emu::detail::EmulatedDVBSenderInterfaceNet
89 prefix_ senf::emu::EmulatedDVBSenderInterface &
90 senf::emu::detail::EmulatedDVBSenderInterfaceNet::self()
92 return *static_cast<EmulatedDVBSenderInterface *>(this);
95 prefix_ senf::emu::EmulatedDVBSenderInterface const &
96 senf::emu::detail::EmulatedDVBSenderInterfaceNet::self()
99 return *static_cast<EmulatedDVBSenderInterface const *>(this);
102 //-/////////////////////////////////////////////////////////////////////////////////////////////////
103 // senf::emu::EmulatedDVBSenderInterface
105 prefix_ int senf::emu::EmulatedDVBSenderInterface::v_txPower()
111 prefix_ void senf::emu::EmulatedDVBSenderInterface::v_txPower(int power)
116 prefix_ unsigned senf::emu::EmulatedDVBSenderInterface::v_mtu()
119 return mtuEmulatedTransmitter();
122 prefix_ void senf::emu::EmulatedDVBSenderInterface::v_mtu(unsigned v)
124 mtuEmulatedTransmitter(v);
127 prefix_ void senf::emu::EmulatedDVBSenderInterface::v_initEmulationInterface()
129 initEmulatedTransmitter();
132 prefix_ void senf::emu::EmulatedDVBSenderInterface::v_deinitEmulationInterface()
134 deinitEmulatedTransmitter();
137 //-/////////////////////////////////////////////////////////////////////////////////////////////////
138 // senf::emu::detail::EmulatedDVBReceiverInterfaceNet
140 prefix_ senf::emu::EmulatedDVBReceiverInterface &
141 senf::emu::detail::EmulatedDVBReceiverInterfaceNet::self()
143 return *static_cast<EmulatedDVBReceiverInterface *>(this);
146 prefix_ senf::emu::EmulatedDVBReceiverInterface const &
147 senf::emu::detail::EmulatedDVBReceiverInterfaceNet::self()
150 return *static_cast<EmulatedDVBReceiverInterface const *>(this);
153 //-/////////////////////////////////////////////////////////////////////////////////////////////////
154 // senf::emu::EmulatedDVBReceiverInterface
156 prefix_ void senf::emu::EmulatedDVBReceiverInterface::v_initEmulationInterface()
158 initEmulatedReceiver();
161 prefix_ void senf::emu::EmulatedDVBReceiverInterface::v_deinitEmulationInterface()
163 deinitEmulatedReceiver();
166 prefix_ bool senf::emu::EmulatedDVBReceiverInterface::v_annotationMode()
169 return annotationModeEmulatedReceiver();
172 prefix_ void senf::emu::EmulatedDVBReceiverInterface::v_annotationMode(bool v)
174 annotationModeEmulatedReceiver(v);
177 prefix_ bool senf::emu::EmulatedDVBReceiverInterface::v_promisc()
180 return promiscEmulatedReceiver();
183 prefix_ void senf::emu::EmulatedDVBReceiverInterface::v_promisc(bool v)
185 promiscEmulatedReceiver(v);
188 prefix_ void senf::emu::EmulatedDVBReceiverInterface::v_mcAdd(MACAddress const & address)
190 mcAddEmulatedReceiver(address);
193 prefix_ void senf::emu::EmulatedDVBReceiverInterface::v_mcDrop(MACAddress const & address)
195 mcDropEmulatedReceiver(address);
198 //-/////////////////////////////////////////////////////////////////////////////////////////////////
205 // comment-column: 40
206 // c-file-style: "senf"
207 // indent-tabs-mode: nil
208 // ispell-local-dictionary: "american"
209 // compile-command: "scons -u test"