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 #include <stdint.h>
24 
25 namespace ns3
26 {
27 
28 NS_LOG_COMPONENT_DEFINE("SatLoraPhyTx");
29 
30 NS_OBJECT_ENSURE_REGISTERED(SatLoraPhyTx);
31 
32 TypeId
34 {
35  static TypeId tid = TypeId("ns3::SatLoraPhyTx").SetParent<SatPhyTx>();
36  return tid;
37 }
38 
40  : m_isTransmitting(false)
41 {
42 }
43 
45 {
46 }
47 
48 void
50 {
51  m_txFinishedCallback = callback;
52 }
53 
54 void
55 SatLoraPhyTx::StartTx(Ptr<SatSignalParameters> txParams)
56 {
57  NS_LOG_FUNCTION(this << txParams);
58 
59  m_isTransmitting = true;
60 
61  SatPhyTx::StartTx(txParams);
62 }
63 
64 void
66 {
67  NS_LOG_FUNCTION(this);
68 
69  m_isTransmitting = false;
70 
72 
74 }
75 
76 bool
78 {
79  NS_LOG_FUNCTION(this);
80 
82 }
83 
84 } // 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.