EmulatedDVBInterface.cci
Go to the documentation of this file.
1 //
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
6 //
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
11 //
12 
13 
14 /** \file
15  \brief EmulatedDVBInterface inline non-template implementation */
16 
17 #include "EmulatedDVBInterface.ih"
18 
19 // Custom includes
20 
21 #define prefix_ inline
22 //-/////////////////////////////////////////////////////////////////////////////////////////////////
23 
24 //-/////////////////////////////////////////////////////////////////////////////////////////////////
25 // senf::emu::detail::EmulatedDVBInterface
26 
27 prefix_ void senf::emu::EmulatedDVBInterface::v_id(MACAddress const & id)
28 {
29  id_ = id;
30 }
31 
32 prefix_ senf::MACAddress senf::emu::EmulatedDVBInterface::v_id()
33  const
34 {
35  return id_;
36 }
37 
38 prefix_ void senf::emu::EmulatedDVBInterface::v_enable()
39 {
40  enableEmulatedInterface();
41 }
42 
43 prefix_ void senf::emu::EmulatedDVBInterface::v_disable()
44 {
45  disableEmulatedInterface();
46 }
47 
48 prefix_ bool senf::emu::EmulatedDVBInterface::v_enabled()
49  const
50 {
51  return emulatedInterfaceEnabled();
52 }
53 
54 prefix_ unsigned senf::emu::EmulatedDVBInterface::v_frequency()
55  const
56 {
57  return emulatedFrequency();
58 }
59 
60 prefix_ unsigned senf::emu::EmulatedDVBInterface::v_bandwidth()
61  const
62 {
63  return emulatedBandwidth();
64 }
65 
66 prefix_ void senf::emu::EmulatedDVBInterface::v_frequency(unsigned frequency, unsigned bandwidth)
67 {
68  emulatedFrequency(frequency, bandwidth);
69 }
70 
71 prefix_ void senf::emu::EmulatedDVBInterface::v_coverageRange(unsigned distance)
72 {
73  emulatedCoverageRange(distance);
74 }
75 
76 prefix_ void senf::emu::EmulatedDVBInterface::registerFrequency(unsigned frequency)
77 {
78  registerFrequency(frequency, frequency);
79 }
80 
81 prefix_ void senf::emu::EmulatedDVBInterface::registerFrequency(unsigned frequencyLower, unsigned frequencyUpper)
82 {
83  WirelessInterface::registerFrequency(frequencyLower, frequencyUpper, 8000, 8000); // we assume a fixed bandwidth of 8 MHz
84 }
85 
86 //-/////////////////////////////////////////////////////////////////////////////////////////////////
87 // senf::emu::detail::EmulatedDVBSenderInterfaceNet
88 
89 prefix_ senf::emu::EmulatedDVBSenderInterface &
90 senf::emu::detail::EmulatedDVBSenderInterfaceNet::self()
91 {
92  return *static_cast<EmulatedDVBSenderInterface *>(this);
93 }
94 
95 prefix_ senf::emu::EmulatedDVBSenderInterface const &
96 senf::emu::detail::EmulatedDVBSenderInterfaceNet::self()
97  const
98 {
99  return *static_cast<EmulatedDVBSenderInterface const *>(this);
100 }
101 
102 //-/////////////////////////////////////////////////////////////////////////////////////////////////
103 // senf::emu::EmulatedDVBSenderInterface
104 
105 prefix_ int senf::emu::EmulatedDVBSenderInterface::v_txPower()
106  const
107 {
108  return power_;
109 }
110 
111 prefix_ void senf::emu::EmulatedDVBSenderInterface::v_txPower(int power)
112 {
113  power_ = power;
114 }
115 
116 prefix_ unsigned senf::emu::EmulatedDVBSenderInterface::v_mtu()
117  const
118 {
119  return mtuEmulatedTransmitter();
120 }
121 
122 prefix_ void senf::emu::EmulatedDVBSenderInterface::v_mtu(unsigned v)
123 {
124  mtuEmulatedTransmitter(v);
125 }
126 
127 prefix_ void senf::emu::EmulatedDVBSenderInterface::v_initEmulationInterface()
128 {
129  initEmulatedTransmitter();
130 }
131 
132 prefix_ void senf::emu::EmulatedDVBSenderInterface::v_deinitEmulationInterface()
133 {
134  deinitEmulatedTransmitter();
135 }
136 
137 //-/////////////////////////////////////////////////////////////////////////////////////////////////
138 // senf::emu::detail::EmulatedDVBReceiverInterfaceNet
139 
140 prefix_ senf::emu::EmulatedDVBReceiverInterface &
141 senf::emu::detail::EmulatedDVBReceiverInterfaceNet::self()
142 {
143  return *static_cast<EmulatedDVBReceiverInterface *>(this);
144 }
145 
146 prefix_ senf::emu::EmulatedDVBReceiverInterface const &
147 senf::emu::detail::EmulatedDVBReceiverInterfaceNet::self()
148  const
149 {
150  return *static_cast<EmulatedDVBReceiverInterface const *>(this);
151 }
152 
153 //-/////////////////////////////////////////////////////////////////////////////////////////////////
154 // senf::emu::EmulatedDVBReceiverInterface
155 
156 prefix_ void senf::emu::EmulatedDVBReceiverInterface::v_initEmulationInterface()
157 {
158  initEmulatedReceiver();
159 }
160 
161 prefix_ void senf::emu::EmulatedDVBReceiverInterface::v_deinitEmulationInterface()
162 {
163  deinitEmulatedReceiver();
164 }
165 
166 prefix_ bool senf::emu::EmulatedDVBReceiverInterface::v_annotationMode()
167  const
168 {
169  return annotationModeEmulatedReceiver();
170 }
171 
172 prefix_ void senf::emu::EmulatedDVBReceiverInterface::v_annotationMode(bool v)
173 {
174  annotationModeEmulatedReceiver(v);
175 }
176 
177 prefix_ bool senf::emu::EmulatedDVBReceiverInterface::v_promisc()
178  const
179 {
180  return promiscEmulatedReceiver();
181 }
182 
183 prefix_ void senf::emu::EmulatedDVBReceiverInterface::v_promisc(bool v)
184 {
185  promiscEmulatedReceiver(v);
186 }
187 
188 prefix_ void senf::emu::EmulatedDVBReceiverInterface::v_mcAdd(MACAddress const & address)
189 {
190  mcAddEmulatedReceiver(address);
191 }
192 
193 prefix_ void senf::emu::EmulatedDVBReceiverInterface::v_mcDrop(MACAddress const & address)
194 {
195  mcDropEmulatedReceiver(address);
196 }
197 
198 //-/////////////////////////////////////////////////////////////////////////////////////////////////
199 #undef prefix_
200 
201 
202 // Local Variables:
203 // mode: c++
204 // fill-column: 100
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"
210 // End: