Visioscan Set SDK Libraries 1.0.14
Visioscan Set SDK Help documentation file for C++ and C++/CLI
 
Loading...
Searching...
No Matches
WNetworkInformation.h
1#pragma once
2#include <RawDataSensor.h>
3
4//#include "WUtilities.h"
5
6using namespace System;
7using namespace std;
8using namespace WUtils;
9
13public ref class WNetworkInformation
14{
15public:
17 _info = new NetworkInformation();
18 }
19
21 _info = new NetworkInformation();
22 IpAddress = toCopy->IpAddress;
23 IpPort = toCopy->IpPort;
24 Gateway = toCopy->Gateway;
25 SubnetMask = toCopy->SubnetMask;
26 DhcpMode = toCopy->DhcpMode;
27 }
28
29
31 delete(_info);
32 }
33
34 property String^ IpAddress {
35 String^ get() {
36 return gcnew String(_info->GetIpAddress().c_str());
37 }
38
39 void set(String^ x) {
40 _info->SetIpAddress(string(WConverter::ConvertToNativeString(x)));
41 }
42 }
43
44 property int IpPort {
45 int get() {
46 return _info->GetIpPort();
47 }
48 void set(int x) {
49 _info->SetIpPort(x);
50 }
51 }
52
53 property String^ Gateway {
54 String^ get() {
55 return gcnew String(_info->GetGateway().c_str());
56 }
57
58 void set(String^ x) {
59 _info->SetGateway(string(WConverter::ConvertToNativeString(x)));
60 }
61 }
62
63 property String^ SubnetMask {
64 String^ get() {
65 return gcnew String(_info->GetSubnetMask().c_str());
66 }
67
68 void set(String^ x) {
69 _info->SetSubnetMask(string(WConverter::ConvertToNativeString(x)));
70 }
71 }
72
73 property bool DhcpMode {
74 bool get() {
75 return _info->GetDhcpMode();
76 }
77
78 void set(bool x) {
79 _info->SetDhcpMode(x);
80 }
81 }
82
83 property NetworkInformation* __native {
84 NetworkInformation* get() {
85 return _info;
86 }
87 }
88
89 static bool operator== (WNetworkInformation^ pComp1, WNetworkInformation^ pComp2) {
90 return pComp1->IpAddress == pComp2->IpAddress &&
91 pComp1->IpPort == pComp2->IpPort &&
92 pComp1->SubnetMask == pComp2->SubnetMask &&
93 pComp1->Gateway == pComp2->Gateway &&
94 pComp1->DhcpMode == pComp2->DhcpMode;
95 }
96
97 static bool operator!= (WNetworkInformation^ pComp1, WNetworkInformation^ pComp2) {
98 return pComp1->IpAddress != pComp2->IpAddress ||
99 pComp1->IpPort != pComp2->IpPort ||
100 pComp1->SubnetMask != pComp2->SubnetMask ||
101 pComp1->Gateway != pComp2->Gateway ||
102 pComp1->DhcpMode != pComp2->DhcpMode;
103 }
104private:
105 NetworkInformation* _info;
106};
107
Definition WUtilities.h:12
Helper to encapsulate the network information.
Definition NetworkInformation.h:15
A wrapper on the NetworkInformation data encapsulation.
Definition WNetworkInformation.h:14
WNetworkInformation()
Definition WNetworkInformation.h:16
property String IpAddress
Definition WNetworkInformation.h:34
WNetworkInformation(WNetworkInformation^ toCopy)
Definition WNetworkInformation.h:20
~WNetworkInformation()
Definition WNetworkInformation.h:30
static char * ConvertToNativeString(String^ toConvert)
Definition WUtilities.h:16