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 #include <stdint.h>
31 #include <string>
32 
33 namespace ns3
34 {
35 
36 class Packet;
37 class Address;
38 class Time;
39 
46 {
47  public:
56  typedef Callback<double, SatEnums::ChannelType_t, uint32_t, SatEnums::CarrierBandwidthType_t>
58 
64  typedef void (*PacketDestinationAddressCallback)(Ptr<const Packet> packet,
65  const Address& destinationAddress);
66 
72  typedef void (*PacketSenderAddressCallback)(Ptr<const Packet> packet,
73  const Address& sourceAddress);
74 
80  typedef void (*PacketDelayAddressCallback)(const Time& delay, const Address& sourceAddress);
81 
98  typedef void (*PacketTraceCallback)(Time now,
100  SatEnums::SatNodeType_t nodeType,
101  uint32_t nodeId,
102  Mac48Address nodeMacAddress,
103  SatEnums::SatLogLevel_t logLevel,
104  SatEnums::SatLinkDir_t linkDirection,
105  std::string packetInfo);
106 
112  typedef void (*CreationCallback)(std::string trace);
113 
114  typedef void (*ServiceTimeCallback)(Time serviceTime);
115 
116  typedef void (*DataSenderAddressCallback)(uint32_t data, const Address& sourceAddress);
117 
118  private:
125  virtual ~SatTypedefs() = 0;
126 };
127 
128 } // namespace ns3
129 
130 #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.