satellite-lora-phy-tx.cc
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2017 University of Padova
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Davide Magrin <magrinda@dei.unipd.it>
19  */
20 
21 #include "satellite-lora-phy-tx.h"
22 
23 namespace ns3
24 {
25 
26 NS_LOG_COMPONENT_DEFINE("SatLoraPhyTx");
27 
28 NS_OBJECT_ENSURE_REGISTERED(SatLoraPhyTx);
29 
30 TypeId
32 {
33  static TypeId tid = TypeId("ns3::SatLoraPhyTx").SetParent<SatPhyTx>();
34  return tid;
35 }
36 
38  : m_isTransmitting(false)
39 {
40 }
41 
43 {
44 }
45 
46 void
48 {
49  m_txFinishedCallback = callback;
50 }
51 
52 void
53 SatLoraPhyTx::StartTx(Ptr<SatSignalParameters> txParams)
54 {
55  NS_LOG_FUNCTION(this << txParams);
56 
57  m_isTransmitting = true;
58 
59  SatPhyTx::StartTx(txParams);
60 }
61 
62 void
64 {
65  NS_LOG_FUNCTION(this);
66 
67  m_isTransmitting = false;
68 
70 
72 }
73 
74 bool
76 {
77  NS_LOG_FUNCTION(this);
78 
80 }
81 
82 } // namespace ns3
TxFinishedCallback m_txFinishedCallback
The callback to perform upon the end of a transmission.
SatLoraPhyTx()
Constructor and destructor.
void StartTx(Ptr< SatSignalParameters > txParams)
Start packet transmission to the channel.
void SetTxFinishedCallback(TxFinishedCallback callback)
Set the callback to call after transmission of a packet.
static TypeId GetTypeId(void)
Callback< void > TxFinishedCallback
Type definition for a callback to call when a packet has finished sending.
The SatellitePhyTx models the physical layer transmitter of satellite system.
bool IsTransmitting(void) const
Tell whether or not this channel is transmitting data.
virtual void EndTx()
virtual void StartTx(Ptr< SatSignalParameters > txParams)
Start packet transmission to the channel.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.