Pleora Technologies Inc. eBUS SDK v5.1.10.4642 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 
40  virtual ~PvNetworkAdapter();
41 
42  PvString GetMACAddress() const;
43  PvString GetDescription() const;
44 
45  uint32_t GetIPAddressCount() const;
46  PvString GetIPAddress( uint32_t aIndex ) const;
47  PvString GetSubnetMask( uint32_t aIndex ) const;
48  PvString GetDefaultGateway() const;
49 
50  bool IsPleoraDriverInstalled() const;
51 
52 protected:
53 
54 #ifndef PV_GENERATING_DOXYGEN_DOC
55 
56  PvNetworkAdapter( PvSystemLib::IFinderReporter *aFinderReporter );
57  PvNetworkAdapter&operator=( const PvNetworkAdapter &aFrom );
58 
59  void Init();
60 
61  PvSystemLib::IPConfigVector *GetIPConfigs() { return mIPConfigs; }
62  const PvSystemLib::IPConfigVector *GetIPConfigs() const { return mIPConfigs; }
63 
64  void SetMAC( const std::string &aValue ) { *mMAC = aValue; }
65  void SetDescription( const std::string &aValue ) { *mDescription = aValue; }
66  void SetGateway( const std::string &aValue ) { *mGateway = aValue; }
67 
68  void SetDriverInstalled( bool aValue ) { mDriverInstalled = aValue; }
69 
70 #endif // PV_GENERATING_DOXYGEN_DOC
71 
72 private:
73 
74  // Not implemented
77 
78  std::string *mMAC;
79  std::string *mDescription;
80  std::string *mGateway;
81 
82  PvSystemLib::IPConfigVector *mIPConfigs;
83 
84  bool mDriverInstalled;
85 
86 };
87 
88 #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:26
Represents one Ethernet network adapter on a system (the PC)
Definition: PvNetworkAdapter.h:36

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