satellite-typedefs.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2014 Magister Solutions Ltd
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: Jani Puttonen <jani.puttonen@magister.fi>
19  */
20 
21 #ifndef SATELLITE_TYPEDEFS_H_
22 #define SATELLITE_TYPEDEFS_H_
23 
24 #include "satellite-enums.h"
25 
26 #include <ns3/callback.h>
27 #include <ns3/mac48-address.h>
28 #include <ns3/ptr.h>
29 
30 namespace ns3
31 {
32 
33 class Packet;
34 class Address;
35 class Time;
36 
43 {
44  public:
53  typedef Callback<double, SatEnums::ChannelType_t, uint32_t, SatEnums::CarrierBandwidthType_t>
55 
61  typedef void (*PacketDestinationAddressCallback)(Ptr<const Packet> packet,
62  const Address& destinationAddress);
63 
69  typedef void (*PacketSenderAddressCallback)(Ptr<const Packet> packet,
70  const Address& sourceAddress);
71 
77  typedef void (*PacketDelayAddressCallback)(const Time& delay, const Address& sourceAddress);
78 
95  typedef void (*PacketTraceCallback)(Time now,
97  SatEnums::SatNodeType_t nodeType,
98  uint32_t nodeId,
99  Mac48Address nodeMacAddress,
100  SatEnums::SatLogLevel_t logLevel,
101  SatEnums::SatLinkDir_t linkDirection,
102  std::string packetInfo);
103 
109  typedef void (*CreationCallback)(std::string trace);
110 
111  typedef void (*ServiceTimeCallback)(Time serviceTime);
112 
113  typedef void (*DataSenderAddressCallback)(uint32_t data, const Address& sourceAddress);
114 
115  private:
122  virtual ~SatTypedefs() = 0;
123 };
124 
125 } // namespace ns3
126 
127 #endif /* SATELLITE_TYPEDEFS_H_ */
SatLinkDir_t
Link direction used for packet tracing.
SatNodeType_t
Node type used for packet tracing.
SatPacketEvent_t
Packet event used for packet tracing.
SatLogLevel_t
Log level used for packet tracing.
SatTypedefs class is for general typedefs used in satellite module.
void(* ServiceTimeCallback)(Time serviceTime)
virtual ~SatTypedefs()=0
Destructor.
Callback< double, SatEnums::ChannelType_t, uint32_t, SatEnums::CarrierBandwidthType_t > CarrierBandwidthConverter_t
Callback for carrier bandwidths.
void(* PacketSenderAddressCallback)(Ptr< const Packet > packet, const Address &sourceAddress)
Common callback signature of a packet and a source address.
void(* PacketTraceCallback)(Time now, SatEnums::SatPacketEvent_t eventType, SatEnums::SatNodeType_t nodeType, uint32_t nodeId, Mac48Address nodeMacAddress, SatEnums::SatLogLevel_t logLevel, SatEnums::SatLinkDir_t linkDirection, std::string packetInfo)
Common callback signature for PacketTrace trace sources.
void(* DataSenderAddressCallback)(uint32_t data, const Address &sourceAddress)
void(* PacketDestinationAddressCallback)(Ptr< const Packet > packet, const Address &destinationAddress)
Common callback signature of a packet and a destination address.
void(* PacketDelayAddressCallback)(const Time &delay, const Address &sourceAddress)
Common callback signature for packet delay and address.
void(* CreationCallback)(std::string trace)
Common callback signature for scenario creation trace sources by helpers.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.