forked from Beckhoff/ADS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp_config.hpp
55 lines (47 loc) · 1.45 KB
/
app_config.hpp
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
#pragma once
#if !defined(__ADSDEF_H__)
#pragma message("must #include <AdsLib.h> before this file if using AdsLib or TcAdsDef.h if TWinCAT ADS-DLL")
#endif
namespace appinfo
{
struct {
const int major = 0;
const int minor = 0;
const int patch = 0;
const int build = 1;
const char* to_string = "0.0.0.1";
const wchar_t* to_wstring = L"0.0.0.1";
} const version;
const char* name = "Ads";
const char* meta_text =
"==============================================================================\n"
"\tAds version 0.0.0.1 for Windows x86, " __DATE__ ".\n"
#if defined(_DEBUG)
"\n\t!!THIS IS A DEBUG BUILD, NOT FOR PRODUCTION USAGES. !!\n"
#endif
"==============================================================================\n";
}
namespace test_twincat_server
{
struct remote_target {
const char* ip_v4;
AmsAddr server;
};
// example for TWinCAT2
remote_target tc2 = {
"10.8.9.36", // ip v4
{
{ 10, 0, 96, 139, 1, 1 }, // AMS Net Id
AMSPORT_R0_PLC // AMS Port number
}
};
// example for TWinCAT3
const remote_target tc3 = {
"192.168.0.232", // ip v4
{
{ 192, 168, 0, 231, 1, 1 }, // AMS Net Id
AMSPORT_R0_PLC_TC3 // AMS Port number
}
};
const remote_target& tc = tc2;
}