| Visioscan Set SDK Libraries 1.3.5 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
6 using namespace System;
7 using namespace std;
8 using namespace WUtils;
9
13 public ref class WNetworkInformation
14{
15 public:
16 WNetworkInformation() {
17 _info = new NetworkInformation();
18 }
19
20 WNetworkInformation(WNetworkInformation^ toCopy) {
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
30 ~WNetworkInformation() {
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^ MacAddress {
64 String^ get() {
65 return gcnew String(_info->GetMacAddress().c_str());
66 }
67
68 void set(String^ x) {
69 _info->SetMacAddress(string(WConverter::ConvertToNativeString(x)));
70 }
71 }
72
73 property String^ SubnetMask {
74 String^ get() {
75 return gcnew String(_info->GetSubnetMask().c_str());
76 }
77
78 void set(String^ x) {
79 _info->SetSubnetMask(string(WConverter::ConvertToNativeString(x)));
80 }
81 }
82
83 property bool DhcpMode {
84 bool get() {
85 return _info->GetDhcpMode();
86 }
87
88 void set(bool x) {
89 _info->SetDhcpMode(x);
90 }
91 }
92
93 property NetworkInformation* __native {
94 NetworkInformation* get() {
95 return _info;
96 }
97 }
98
99 static bool operator== (WNetworkInformation^ pComp1, WNetworkInformation^ pComp2) {
100 if (System::Object::ReferenceEquals(pComp1, pComp2))
101 return true;
102
103 if (System::Object::ReferenceEquals(pComp1, nullptr) ||
104 System::Object::ReferenceEquals(pComp2, nullptr)) {
105 return false;
106 }
107 return pComp1->IpAddress == pComp2->IpAddress &&
108 pComp1->IpPort == pComp2->IpPort &&
109 pComp1->MacAddress == pComp2->MacAddress &&
110 pComp1->SubnetMask == pComp2->SubnetMask &&
111 pComp1->Gateway == pComp2->Gateway &&
112 pComp1->DhcpMode == pComp2->DhcpMode;
113 }
114
115 static bool operator!= (WNetworkInformation^ pComp1, WNetworkInformation^ pComp2) {
116 return !(pComp1 == pComp2);
117 }
118 private:
119 NetworkInformation* _info;
120};
121
WUtils
Definition WAvailableResolution.h:7
NetworkInformation
Helper to encapsulate the network information.
Definition NetworkInformation.h:15
WNetworkInformation
A wrapper on the NetworkInformation data encapsulation.
Definition WNetworkInformation.h:14
WNetworkInformation::WNetworkInformation
WNetworkInformation()
Definition WNetworkInformation.h:16
WNetworkInformation::IpAddress
property String IpAddress
Definition WNetworkInformation.h:34
WNetworkInformation::WNetworkInformation
WNetworkInformation(WNetworkInformation^ toCopy)
Definition WNetworkInformation.h:20
WNetworkInformation::~WNetworkInformation
~WNetworkInformation()
Definition WNetworkInformation.h:30
WUtils::WConverter::ConvertToNativeString
static char * ConvertToNativeString(String^ toConvert)
Definition WUtilities.h:16