Thermal Camera SDK 11.3.0
SDK for Optris Thermal Cameras
Loading...
Searching...
No Matches
DeviceNetworkConfig.h
Go to the documentation of this file.
1// Copyright (c) 2008-2026 Optris GmbH & Co. KG
2
10
11#pragma once
12
15
16
17namespace optris
18{
19
22{
23public:
26
35 DeviceNetworkConfig(const IpAddress& deviceIp,
36 const IpAddress& destinationIp,
37 const Port& destinationPort,
38 const IpAddress& subnetMask) noexcept;
39
40
46 const IpAddress& getDeviceIp() const noexcept;
47
53 const IpAddress& getDestinationIp() const noexcept;
54
60 const Port& getDestinationPort() const noexcept;
61
67 const IpAddress& getSubnetMask() const noexcept;
68
69
75 void setDeviceIp(const IpAddress& address) noexcept;
76
82 void setDestinationIp(const IpAddress& address) noexcept;
83
89 void setDestinationPort(const Port& port) noexcept;
90
96 void setSubnetMask(const IpAddress& subnetMask) noexcept;
97
98
106 bool operator==(const DeviceNetworkConfig& rhs) const noexcept;
107
115 bool operator!=(const DeviceNetworkConfig& rhs) const noexcept;
116
117
118private:
119 IpAddress _deviceIp;
120 IpAddress _destinationIp;
121 Port _destinationPort;
122
123 IpAddress _subnetMask;
124};
125
126
127// Inline implementations
129 const IpAddress& destinationIp,
130 const Port& destinationPort,
131 const IpAddress& subnetMask) noexcept
132 : _deviceIp{deviceIp}
133 , _destinationIp{destinationIp}
134 , _destinationPort{destinationPort}
135 , _subnetMask{subnetMask}
136{ }
137
138inline const IpAddress& DeviceNetworkConfig::getDeviceIp() const noexcept
139{
140 return _deviceIp;
141}
142
144{
145 return _destinationIp;
146}
147
148inline const Port& DeviceNetworkConfig::getDestinationPort() const noexcept
149{
150 return _destinationPort;
151}
152
153inline const IpAddress& DeviceNetworkConfig::getSubnetMask() const noexcept
154{
155 return _subnetMask;
156}
157
158inline void DeviceNetworkConfig::setDeviceIp(const IpAddress& address) noexcept
159{
160 _deviceIp = address;
161}
162
163inline void DeviceNetworkConfig::setDestinationIp(const IpAddress& address) noexcept
164{
165 _destinationIp = address;
166}
167
168inline void DeviceNetworkConfig::setDestinationPort(const Port& port) noexcept
169{
170 _destinationPort = port;
171}
172
173inline void DeviceNetworkConfig::setSubnetMask(const IpAddress& subnetMask) noexcept
174{
175 _subnetMask = subnetMask;
176}
177
178inline bool DeviceNetworkConfig::operator==(const DeviceNetworkConfig& rhs) const noexcept
179{
180 return _deviceIp == rhs._deviceIp &&
181 _destinationIp == rhs._destinationIp &&
182 _destinationPort == rhs._destinationPort &&
183 _subnetMask == rhs._subnetMask;
184}
185
186inline bool DeviceNetworkConfig::operator!=(const DeviceNetworkConfig& rhs) const noexcept
187{
188 return !(*this == rhs);
189}
190
191} // namespace optris
Contains a class holding IP v4 address.
Contains a class representing an network port.
const IpAddress & getDeviceIp() const noexcept
Returns the IP address of the device.
Definition DeviceNetworkConfig.h:138
void setSubnetMask(const IpAddress &subnetMask) noexcept
Sets the subnet mask.
Definition DeviceNetworkConfig.h:173
bool operator==(const DeviceNetworkConfig &rhs) const noexcept
Returns whether this configuration equals the provided one.
Definition DeviceNetworkConfig.h:178
DeviceNetworkConfig()=default
Constructor.
bool operator!=(const DeviceNetworkConfig &rhs) const noexcept
Returns whether this configuration is different from the provided one.
Definition DeviceNetworkConfig.h:186
void setDeviceIp(const IpAddress &address) noexcept
Sets the device IP address.
Definition DeviceNetworkConfig.h:158
const IpAddress & getDestinationIp() const noexcept
Returns the IP address to which the device sends its data to.
Definition DeviceNetworkConfig.h:143
void setDestinationIp(const IpAddress &address) noexcept
Sets the destination IP address to which the device sends its data to.
Definition DeviceNetworkConfig.h:163
void setDestinationPort(const Port &port) noexcept
Sets the port to which the device sends its data to.
Definition DeviceNetworkConfig.h:168
const IpAddress & getSubnetMask() const noexcept
Returns the subnet mask.
Definition DeviceNetworkConfig.h:153
const Port & getDestinationPort() const noexcept
Returns the port to which the device sends its data to.
Definition DeviceNetworkConfig.h:148
Encapsulates an IP v4 address.
Definition IpAddress.h:33
Encapsulates a network port number.
Definition Port.h:34
Main SDK namespace.
Definition AlarmChannel.h:21