World Ocean Simulation System (WOSS) library
uw-woss-bpsk.h
Go to the documentation of this file.
1/* WOSS - World Ocean Simulation System -
2 *
3 * Copyright (C) 2009 2025 Federico Guerra
4 * and regents of the SIGNET lab, University of Padova
5 *
6 * Author: Federico Guerra - WOSS@guerra-tlc.com
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation;
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22
23#ifndef UNDERWATER_WOSS_BPSK_H
24#define UNDERWATER_WOSS_BPSK_H
25
26
36#include <memory>
37#include <underwater-bpsk.h>
38
39
40static constexpr inline const char* UWWOSSMPHYBPSK_MODNAME = "UWWOSSBPSK";
41
42
43namespace woss {
44
45 class Transducer;
46
47}
48
49
55class UwMPhyBpskTransducer : public UnderwaterMPhyBpsk {
56
57 public:
58
60
61 virtual ~UwMPhyBpskTransducer() override = default;
62
63 virtual int command( int argc, const char*const* argv ) override;
64
65 protected:
66
67 virtual double consumedEnergyTx( double Ptx, double duration ) override;
68
69 virtual std::shared_ptr<woss::Transducer> getTransducer( double frequency ) const;
70
71 using FreqTransducerMap = std::map< std::pair< double, double >, std::shared_ptr<woss::Transducer> >;
72 using FTMIter = FreqTransducerMap::iterator;
73 using FTMCIter = FreqTransducerMap::const_iterator;
74 using FTMRIter = FreqTransducerMap::reverse_iterator;
75 using FTMRCIter = FreqTransducerMap::const_reverse_iterator;
76
78
79};
80
81
88
89 public:
90
91 WossMPhyBpsk() = default;
92
93 virtual ~WossMPhyBpsk() override = default;
94
95 protected:
96
104 virtual double getTxPower( Packet* p ) override;
105
106};
107
108#endif /* UNDERWATER_WOSS_BPSK_H */
BPSK modulation class with woss::Transducer tx power control.
Definition uw-woss-bpsk.h:55
FreqTransducerMap::const_iterator FTMCIter
Definition uw-woss-bpsk.h:73
FreqTransducerMap freq_transd_map
Definition uw-woss-bpsk.h:77
virtual double consumedEnergyTx(double Ptx, double duration) override
Definition uw-woss-bpsk.cpp:100
UwMPhyBpskTransducer()=default
virtual std::shared_ptr< woss::Transducer > getTransducer(double frequency) const
Definition uw-woss-bpsk.cpp:82
std::map< std::pair< double, double >, std::shared_ptr< woss::Transducer > > FreqTransducerMap
Definition uw-woss-bpsk.h:71
virtual int command(int argc, const char *const *argv) override
Definition uw-woss-bpsk.cpp:65
virtual ~UwMPhyBpskTransducer() override=default
FreqTransducerMap::reverse_iterator FTMRIter
Definition uw-woss-bpsk.h:74
FreqTransducerMap::const_reverse_iterator FTMRCIter
Definition uw-woss-bpsk.h:75
FreqTransducerMap::iterator FTMIter
Definition uw-woss-bpsk.h:72
BPSK modulation class with woss::Transducer power control.
Definition uw-woss-bpsk.h:87
WossMPhyBpsk()=default
virtual double getTxPower(Packet *p) override
Definition uw-woss-bpsk.cpp:127
virtual ~WossMPhyBpsk() override=default
Definition ac-toolbox-arr-asc-reader.h:44