-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMiddlewareSettings.cpp
More file actions
56 lines (44 loc) · 1.7 KB
/
Copy pathMiddlewareSettings.cpp
File metadata and controls
56 lines (44 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#include "MicroMiddleware/MiddlewareSettings.h"
#include "MicroMiddleware/Runtime.h"
#include "MicroMiddleware/INet/INetConnectionManager.h"
namespace MicroMiddleware
{
/* -------------------------------------------------------
class MiddlewareSettings
- Initialize static variables
- Variables are taken from CommonDefines.h
#define LOOKUP_SERVER_PORT 5000
#define SYSTEM_MANAGER_PORT 8888
#define SETTINGS_MANAGER_PORT 6789
#define COMPONENT_FACTORY_PORT 49999
#define EXCEPTION_MULTICAST_PORT 37778
#define EXCEPTION_MULTICAST_ADDRESS "237.3.4.101"
-------------------------------------------------------*/
// -- MicroMiddleware Services --
std::string MiddlewareSettings::routeManagerService_ = std::string("RouteManager.stub");
// -- addresses -
std::string MiddlewareSettings::exceptionMulticastAddress_ = std::string("237.3.4.101");
// -- ports --
int MiddlewareSettings::serviceManagerPort_ = 5000;
int MiddlewareSettings::settingsManagerPort_ = 6789;
int MiddlewareSettings::systemManagerPort_ = 8888;
int MiddlewareSettings::processFactoryPort_ = 49999;
int MiddlewareSettings::exceptionMulticastPort_ = 37778;
/* -------------------------------------------------------
Initialize MicroMiddleware
-------------------------------------------------------*/
void MiddlewareSettings::Initialize(int argc, char **argv)
{
MicroMiddleware::Runtime::Initialize(argc, argv);
MicroMiddleware::INetConnectionManager::GetOrCreate();
//MicroMiddleware::INetNATManager::GetOrCreate();
}
void MiddlewareSettings::Release()
{
MicroMiddleware::Runtime::Release();
}
std::string MiddlewareSettings::GetHostName()
{
return TcpServer::GetLocalHostName();
}
} // namespace MicroMiddleware