Thermal Camera SDK 10.0.1
SDK for Optris Thermal Cameras
Loading...
Searching...
No Matches
DeviceNetworkConfig.h
Go to the documentation of this file.
1// Copyright (c) 2025 Optris GmbH Co. KG
2
10
11#pragma once
12
13#include <cstdint>
14
17
18
19namespace optris
20{
21
24{
25public:
28
37 DeviceNetworkConfig(const IpAddress& deviceIp,
38 const IpAddress& destinationIp,
39 const Port& destinationPort,
40 const IpAddress& subnetMask) noexcept;
41
42
48 const IpAddress& getDeviceIp() const noexcept;
49
55 const IpAddress& getDestinationIp() const noexcept;
56
62 const Port& getDestinationPort() const noexcept;
63
69 const IpAddress& getSubnetMask() const noexcept;
70
71
77 void setDeviceIp(const IpAddress& address) noexcept;
78
84 void setDestinationIp(const IpAddress& address) noexcept;
85
91 void setDestinationPort(const Port& port) noexcept;
92
98 void setSubnetMask(const IpAddress& subnetMask) noexcept;
99
100
101private:
102 IpAddress _deviceIp;
103 IpAddress _destinationIp;
104 Port _destinationPort;
105
106 IpAddress _subnetMask;
107};
108
109
110// Inline implementations
112 const IpAddress& destinationIp,
113 const Port& destinationPort,
114 const IpAddress& subnetMask) noexcept
115 : _deviceIp{deviceIp}
116 , _destinationIp{destinationIp}
117 , _destinationPort{destinationPort}
118 , _subnetMask{subnetMask}
119{ }
120
121inline const IpAddress& DeviceNetworkConfig::getDeviceIp() const noexcept
122{
123 return _deviceIp;
124}
125
127{
128 return _destinationIp;
129}
130
131inline const Port& DeviceNetworkConfig::getDestinationPort() const noexcept
132{
133 return _destinationPort;
134}
135
136inline const IpAddress& DeviceNetworkConfig::getSubnetMask() const noexcept
137{
138 return _subnetMask;
139}
140
141inline void DeviceNetworkConfig::setDeviceIp(const IpAddress& address) noexcept
142{
143 _deviceIp = address;
144}
145
146inline void DeviceNetworkConfig::setDestinationIp(const IpAddress& address) noexcept
147{
148 _destinationIp = address;
149}
150
151inline void DeviceNetworkConfig::setDestinationPort(const Port& port) noexcept
152{
153 _destinationPort = port;
154}
155
156inline void DeviceNetworkConfig::setSubnetMask(const IpAddress& subnetMask) noexcept
157{
158 _subnetMask = subnetMask;
159}
160
161} // 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:121
void setSubnetMask(const IpAddress &subnetMask) noexcept
Sets the subnet mask.
Definition DeviceNetworkConfig.h:156
DeviceNetworkConfig()=default
Constructor.
void setDeviceIp(const IpAddress &address) noexcept
Sets the device IP address.
Definition DeviceNetworkConfig.h:141
const IpAddress & getDestinationIp() const noexcept
Returns the IP address to which the device sends its data to.
Definition DeviceNetworkConfig.h:126
void setDestinationIp(const IpAddress &address) noexcept
Sets the destination IP address to which the device sends its data to.
Definition DeviceNetworkConfig.h:146
void setDestinationPort(const Port &port) noexcept
Sets the port to which the device sends its data to.
Definition DeviceNetworkConfig.h:151
const IpAddress & getSubnetMask() const noexcept
Returns the subnet mask.
Definition DeviceNetworkConfig.h:136
const Port & getDestinationPort() const noexcept
Returns the port to which the device sends its data to.
Definition DeviceNetworkConfig.h:131
Encapsulates an IP v4 address.
Definition IpAddress.h:33
Encapsulates a network port number.
Definition Port.h:34
Main SDK namespace.
Definition DeviceInfo.h:23