Pleora Technologies Inc. eBUS SDK v6.2.8.5877 API



PvConfigurationReader.h
1 // *****************************************************************************
2 //
3 // Copyright (c) 2008, Pleora Technologies Inc., All rights reserved.
4 //
5 // *****************************************************************************
6 
7 #ifndef __PVCONFIGURATIONREADER_H__
8 #define __PVCONFIGURATIONREADER_H__
9 
10 #include <PvPersistenceLib.h>
11 #include <PvDevice.h>
12 #include <PvStream.h>
13 #include <PvStringList.h>
14 #include <PvPropertyList.h>
15 
16 
17 namespace PvPersistenceLib
18 {
19  class ConfigurationReader;
20 }
21 
22 
24 {
25 public:
26 
27  PV_PERSISTENCE_API PvConfigurationReader();
28  PV_PERSISTENCE_API ~PvConfigurationReader();
29 
30  PV_PERSISTENCE_API PvResult Load( const PvString &aFilename );
31  PV_PERSISTENCE_API PvResult LoadFromString( const PvString &aString );
32 
33  PV_PERSISTENCE_API uint32_t GetDeviceCount();
34  PV_PERSISTENCE_API PvResult GetDeviceName( uint32_t aIndex, PvString &aName );
35  PV_PERSISTENCE_API PvResult Restore( const PvString &aName, PvDevice *aDevice );
36  PV_PERSISTENCE_API PvResult Restore( uint32_t aIndex, PvDevice *aDevice );
37 
38  PV_PERSISTENCE_API uint32_t GetStreamCount();
39  PV_PERSISTENCE_API PvResult GetStreamName( uint32_t aIndex, PvString &aName );
40  PV_PERSISTENCE_API PvResult Restore( const PvString &aName, PvStream *aStream );
41  PV_PERSISTENCE_API PvResult Restore( uint32_t aIndex, PvStream *Stream );
42 
43  PV_PERSISTENCE_API uint32_t GetStringCount();
44  PV_PERSISTENCE_API PvResult GetStringName( uint32_t aIndex, PvString &aName );
45  PV_PERSISTENCE_API PvResult Restore( const PvString &aKey, PvString &aValue );
46  PV_PERSISTENCE_API PvResult Restore( uint32_t aIndex, PvString &aValue );
47 
48  PV_PERSISTENCE_API uint32_t GetGenParameterArrayCount();
49  PV_PERSISTENCE_API PvResult GetGenParameterArrayName( uint32_t aIndex, PvString &aName );
50  PV_PERSISTENCE_API PvResult Restore( const PvString &aKey, PvGenParameterArray *aParameterArray );
51  PV_PERSISTENCE_API PvResult Restore( uint32_t aIndex, PvGenParameterArray *aParameterArray );
52 
53  PV_PERSISTENCE_API uint32_t GetPropertyListCount();
54  PV_PERSISTENCE_API PvResult GetPropertyListName( uint32_t aIndex, PvString &aName );
55  PV_PERSISTENCE_API PvResult Restore( const PvString &aKey, PvPropertyList *aPropertyList );
56  PV_PERSISTENCE_API PvResult Restore( uint32_t aIndex, PvPropertyList *aPropertyList );
57 
58  PV_PERSISTENCE_API void SetErrorList( PvStringList *aList, const PvString &aPrefix );
59 
60 private:
61 
62  PvPersistenceLib::ConfigurationReader *mThis;
63 
64  PvStringList *mErrorList;
65  PvString mErrorPrefix;
66 
67  // Not implemented
68  PvConfigurationReader( const PvConfigurationReader& );
69  const PvConfigurationReader &operator=( const PvConfigurationReader & );
70 
71 };
72 
73 #endif
Receive data from a GigE Vision or USB3 Vision transmitter.
Definition: PvStream.h:39
uint32_t GetStringCount()
Get the number of custom-state strings in the configuration file.
Definition: PvConfigurationReader.cpp:346
uint32_t GetStreamCount()
Get the number of stream configuration in this PvConfigurationReader.
Definition: PvConfigurationReader.cpp:265
PvResult LoadFromString(const PvString &aString)
Loads a configuration from a string.
Definition: PvConfigurationReader.cpp:139
PvResult GetPropertyListName(uint32_t aIndex, PvString &aName)
Get the configuration name (PvPropertyList).
Definition: PvConfigurationReader.cpp:534
String class.
Definition: PvString.h:21
Result information.
Definition: PvResult.h:13
PvConfigurationReader()
Constructor.
Definition: PvConfigurationReader.cpp:80
PvResult GetStringName(uint32_t aIndex, PvString &aName)
Get the custom-state string name (PvString)
Definition: PvConfigurationReader.cpp:365
~PvConfigurationReader()
Destructor.
Definition: PvConfigurationReader.cpp:93
uint32_t GetDeviceCount()
Get the number of PvDevice configurations available.
Definition: PvConfigurationReader.cpp:159
PvResult GetGenParameterArrayName(uint32_t aIndex, PvString &aName)
Get the configuration name (PvGenParameterArray).
Definition: PvConfigurationReader.cpp:448
void SetErrorList(PvStringList *aList, const PvString &aPrefix)
Sets the error list where all errors/warnings are logged.
Definition: PvConfigurationReader.cpp:626
PvResult Load(const PvString &aFilename)
Load a configuration file from disk.
Definition: PvConfigurationReader.cpp:114
Class used to hold a group of PvString objects.
Definition: PvStringList.h:19
Class used to hold a group of PvProperty objects.
Definition: PvPropertyList.h:20
PvResult Restore(const PvString &aName, PvDevice *aDevice)
Apply a configuration.
Definition: PvConfigurationReader.cpp:216
PvResult GetStreamName(uint32_t aIndex, PvString &aName)
Get the configuration name (PvStream).
Definition: PvConfigurationReader.cpp:284
GenICam feature array.
Definition: PvGenParameterArray.h:38
uint32_t GetPropertyListCount()
Get the number of PvPropertyList objects saved in the configuration file.
Definition: PvConfigurationReader.cpp:517
uint32_t GetGenParameterArrayCount()
Get the number of PvGenParameterArray objects saved in the configuration file.
Definition: PvConfigurationReader.cpp:431
PvResult GetDeviceName(uint32_t aIndex, PvString &aName)
Get the configuration name (PvDevice).
Definition: PvConfigurationReader.cpp:184
Restore the state of the system.
Definition: PvConfigurationReader.h:23
Connect, configure and control a GigE Vision or USB3 Vision device.
Definition: PvDevice.h:30

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