EMANE  1.2.1
nemmanagerimpl.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013-2015,2017 - Adjacent Link LLC, Bridgewater,
3  * New Jersey
4  * Copyright (c) 2011 - DRS CenGen, LLC, Columbia, Maryland
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  *
11  * * Redistributions of source code must retain the above copyright
12  * notice, this list of conditions and the following disclaimer.
13  * * Redistributions in binary form must reproduce the above copyright
14  * notice, this list of conditions and the following disclaimer in
15  * the documentation and/or other materials provided with the
16  * distribution.
17  * * Neither the name of DRS CenGen, LLC nor the names of its
18  * contributors may be used to endorse or promote products derived
19  * from this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32  * POSSIBILITY OF SUCH DAMAGE.
33  */
34 
35 #ifndef EMANEAPPLICATIONNEMMANAGERIMPL_HEADAER_
36 #define EMANEAPPLICATIONNEMMANAGERIMPL_HEADAER_
37 
39 #include "emane/inetaddr.h"
40 #include "controlportservice.h"
41 
42 #include <map>
43 #include <memory>
44 
45 namespace EMANE
46 {
47  namespace Application
48  {
55  class NEMManagerImpl : public NEMManager
56  {
57  public:
58  NEMManagerImpl(const uuid_t & uuid);
59 
61 
62  void add(std::unique_ptr<NEM> & pNEM) override;
63 
64  void initialize(Registrar & registrar) override;
65 
66  void configure(const ConfigurationUpdate & update) override;
67 
68  void start() override;
69 
70  void postStart() override;
71 
72  void stop() override;
73 
74  void destroy()
75  throw() override;
76 
77  private:
78  using PlatformNEMMap = std::map<NEMId,std::unique_ptr<NEM>>;
79 
80  PlatformNEMMap platformNEMMap_;
81 
82  ControlPort::Service controlPortService_;
83 
84  INETAddr OTAManagerGroupAddr_;
85  std::string sOTAManagerGroupDevice_;
86  std::uint8_t u8OTAManagerTTL_;
87  std::uint32_t u32OTAManagerMTU_;
88  bool bOTAManagerChannelLoopback_;
89  bool bOTAManagerChannelEnable_;
90  Seconds OTAManagerPartCheckThreshold_;
91  Seconds OTAManagerPartTimeoutThreshold_;
92 
93  INETAddr eventServiceGroupAddr_;
94  std::string sEventServiceDevice_;
95  std::uint8_t u8EventServiceTTL_;
96  INETAddr controlPortAddr_;
97  std::string sAntennaProfileManifestURI_;
98  };
99  }
100 }
101 
102 #endif // EMANEAPPLICATIONNEMMANAGERIMPL_HEADAER_
The Registrar interface provides access to all of the emulator registrars.
Definition: registrar.h:50
Implementation of Platform interface. Contains and manages NEMs.
std::chrono::seconds Seconds
Definition: types.h:43
Contains and manages NEM instances.
Definition: nemmanager.h:54
void add(std::unique_ptr< NEM > &pNEM) override
void configure(const ConfigurationUpdate &update) override
std::vector< ConfigurationNameAnyValues > ConfigurationUpdate
void initialize(Registrar &registrar) override
Definition: agent.h:43