ifm3d
ifm_network_device.h
1 // -*- c++ -*-
2 /*
3  * Copyright 2020-present ifm electronic, gmbh
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #ifndef IFM3D_IFM_NETWORK_DEVICE_H
8 #define IFM3D_IFM_NETWORK_DEVICE_H
9 
10 #include <memory>
11 #include <string>
12 #include <vector>
13 #include <ifm3d/device/module_device.h>
14 
15 namespace ifm3d
16 {
17  using Data = std::vector<unsigned char>;
18  class IFM3D_EXPORT IFMNetworkDevice
19  {
20  public:
21  IFMNetworkDevice(Data& data, const std::string& ip_address_via_interface);
22 
24  std::string GetIPAddress() const;
25 
27  std::string GetMACAddress() const;
28 
30  std::string GetNetmask() const;
31 
33  std::string GetGateway() const;
34 
36  uint16_t GetPort() const;
37 
39  uint16_t GetFlag() const;
40 
42  std::string GetHostName() const;
43 
45  std::string GetDeviceName() const;
46 
48  uint16_t GetVendorId() const;
49 
51  uint16_t GetDeviceId() const;
52 
54  std::string GetFoundVia() const;
55 
56  private:
57  std::string ip_address_;
58  std::string mac_;
59  std::string subnet_;
60  std::string gateway_;
61  uint16_t port_;
62  uint16_t flags_;
63  std::string hostname_;
64  std::string device_name_;
65  uint16_t vendor_id_;
66  uint16_t device_id_;
67  std::string found_via_;
68  };
69 
70 } // end: namespace ifm3d
71 
72 #endif // IFM3D_IFM_NETWORK_DEVICE_H
ifm3d::IFMNetworkDevice
Definition: ifm_network_device.h:18