Pleora Technologies Inc. eBUS SDK v6.2.8.5877 API



PvNetworkAdapter.h
1 // *****************************************************************************
2 //
3 // Copyright (c) 2013, Pleora Technologies Inc., All rights reserved.
4 //
5 // *****************************************************************************
6 
7 #ifndef __PVNETWORKADAPTER_H__
8 #define __PVNETWORKADAPTER_H__
9 
10 #include <PvSystemLib.h>
11 #include <PvInterface.h>
12 #include <PvDeviceInfoGEV.h>
13 #include <PvDeviceInfoPleoraProtocol.h>
14 
15 #include <vector>
16 
17 
18 #ifndef PV_GENERATING_DOXYGEN_DOC
19 
20 // Provided for in-object browsing
21 namespace PvSystemLib
22 {
23  struct IPConfig
24  {
25  std::string mIPAddress;
26  std::string mSubnetMask;
27  };
28 
29  typedef std::vector<IPConfig> IPConfigVector;
30  typedef std::vector<std::string> GatewayVector;
31 }
32 
33 #endif // PV_GENERATING_DOXYGEN_DOC
34 
35 
36 class PV_SYSTEM_API PvNetworkAdapter : public PvInterface
37 {
38 public:
39 
41  virtual ~PvNetworkAdapter();
42 
43  PvNetworkAdapter&operator=( const PvNetworkAdapter &aFrom );
44 
45  PvString GetMACAddress() const;
46  PvString GetDescription() const;
47 
48  uint32_t GetIPAddressCount() const;
49  PvString GetIPAddress( uint32_t aIndex ) const;
50  PvString GetSubnetMask( uint32_t aIndex ) const;
51  PvString GetDefaultGateway() const;
52 
53  bool IsPleoraDriverInstalled() const;
54 
55 protected:
56 
57 #ifndef PV_GENERATING_DOXYGEN_DOC
58 
59  PvNetworkAdapter( PvSystemLib::IFinderReporter *aFinderReporter );
60 
61  void Init();
62 
63  PvSystemLib::IPConfigVector *GetIPConfigs() { return mIPConfigs; }
64  const PvSystemLib::IPConfigVector *GetIPConfigs() const { return mIPConfigs; }
65 
66  void SetMAC( const std::string &aValue ) { *mMAC = aValue; }
67  void SetDescription( const std::string &aValue ) { *mDescription = aValue; }
68  void SetGateway( const std::string &aValue ) { *mGateway = aValue; }
69 
70  void SetDriverInstalled( bool aValue ) { mDriverInstalled = aValue; }
71 
72 #endif // PV_GENERATING_DOXYGEN_DOC
73 
74 private:
75 
76  // Not implemented
78 
79  std::string *mMAC;
80  std::string *mDescription;
81  std::string *mGateway;
82 
83  PvSystemLib::IPConfigVector *mIPConfigs;
84 
85  bool mDriverInstalled;
86 
87 };
88 
89 #endif
Definition: PvInterface.h:14
String class.
Definition: PvString.h:21
Represents one interface (network adapter or USB host controller) on a system (the PC) ...
Definition: PvInterface.h:25
Represents one Ethernet network adapter on a system (the PC)
Definition: PvNetworkAdapter.h:36

Copyright (c) 2002-2021 Pleora Technologies Inc.
www.pleora.com