LEFT | RIGHT |
(no file at all) | |
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2011 The Boeing Company | 3 * Copyright (c) 2011 The Boeing Company |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 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 | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 Ptr<Packet> p = Create<Packet> (n); | 51 Ptr<Packet> p = Create<Packet> (n); |
52 sender->PdDataRequest (p->GetSize (), p); | 52 sender->PdDataRequest (p->GetSize (), p); |
53 } | 53 } |
54 | 54 |
55 | 55 |
56 int main (int argc, char *argv[]) | 56 int main (int argc, char *argv[]) |
57 { | 57 { |
58 CommandLine cmd; | 58 CommandLine cmd; |
59 cmd.Parse (argc, argv); | 59 cmd.Parse (argc, argv); |
60 ·· | 60 ·· |
| 61 #if 0 |
61 LogComponentEnableAll (LOG_PREFIX_FUNC); | 62 LogComponentEnableAll (LOG_PREFIX_FUNC); |
62 LogComponentEnable ("LrWpanPhy", LOG_LEVEL_ALL); | 63 LogComponentEnable ("LrWpanPhy", LOG_LEVEL_ALL); |
63 LogComponentEnable ("SingleModelSpectrumChannel", LOG_LEVEL_ALL); | 64 LogComponentEnable ("SingleModelSpectrumChannel", LOG_LEVEL_ALL); |
| 65 #endif |
64 | 66 |
65 Ptr<LrWpanPhy> sender = CreateObject<LrWpanPhy> (); | 67 Ptr<LrWpanPhy> sender = CreateObject<LrWpanPhy> (); |
66 Ptr<LrWpanPhy> receiver = CreateObject<LrWpanPhy> (); | 68 Ptr<LrWpanPhy> receiver = CreateObject<LrWpanPhy> (); |
67 | 69 |
68 Ptr<SingleModelSpectrumChannel> channel = CreateObject<SingleModelSpectrumChan
nel> (); | 70 Ptr<SingleModelSpectrumChannel> channel = CreateObject<SingleModelSpectrumChan
nel> (); |
69 sender->SetChannel (channel); | 71 sender->SetChannel (channel); |
70 receiver->SetChannel (channel); | 72 receiver->SetChannel (channel); |
71 channel->AddRx (sender); | 73 channel->AddRx (sender); |
72 channel->AddRx (receiver); | 74 channel->AddRx (receiver); |
73 | 75 |
(...skipping 15 matching lines...) Expand all Loading... |
89 Simulator::Schedule (Seconds (1.0), &SendOnePacket, sender, receiver); | 91 Simulator::Schedule (Seconds (1.0), &SendOnePacket, sender, receiver); |
90 | 92 |
91 Simulator::Stop (Seconds (10.0)); | 93 Simulator::Stop (Seconds (10.0)); |
92 | 94 |
93 Simulator::Run (); | 95 Simulator::Run (); |
94 | 96 |
95 Simulator::Destroy (); | 97 Simulator::Destroy (); |
96 | 98 |
97 return 0; | 99 return 0; |
98 } | 100 } |
LEFT | RIGHT |