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
69  const PvConfigurationReader &operator=( const PvConfigurationReader & );
70 
71 };
72 
73 #endif
PvConfigurationReader::GetPropertyListName
PvResult GetPropertyListName(uint32_t aIndex, PvString &aName)
Get the configuration name (PvPropertyList).
Definition: PvConfigurationReader.cpp:534
PvConfigurationReader::Load
PvResult Load(const PvString &aFilename)
Load a configuration file from disk.
Definition: PvConfigurationReader.cpp:114
PvResult
Result information.
Definition: PvResult.h:13
PvConfigurationReader::GetGenParameterArrayName
PvResult GetGenParameterArrayName(uint32_t aIndex, PvString &aName)
Get the configuration name (PvGenParameterArray).
Definition: PvConfigurationReader.cpp:448
PvConfigurationReader::GetGenParameterArrayCount
uint32_t GetGenParameterArrayCount()
Get the number of PvGenParameterArray objects saved in the configuration file.
Definition: PvConfigurationReader.cpp:431
PvConfigurationReader::Restore
PvResult Restore(const PvString &aName, PvDevice *aDevice)
Apply a configuration.
Definition: PvConfigurationReader.cpp:216
PvStream
Receive data from a GigE Vision or USB3 Vision transmitter.
Definition: PvStream.h:39
PvConfigurationReader::LoadFromString
PvResult LoadFromString(const PvString &aString)
Loads a configuration from a string.
Definition: PvConfigurationReader.cpp:139
PvConfigurationReader::PvConfigurationReader
PvConfigurationReader()
Constructor.
Definition: PvConfigurationReader.cpp:80
PvString
String class.
Definition: PvString.h:21
PvConfigurationReader::GetDeviceCount
uint32_t GetDeviceCount()
Get the number of PvDevice configurations available.
Definition: PvConfigurationReader.cpp:159
PvGenParameterArray
GenICam feature array.
Definition: PvGenParameterArray.h:38
PvConfigurationReader::GetStringCount
uint32_t GetStringCount()
Get the number of custom-state strings in the configuration file.
Definition: PvConfigurationReader.cpp:346
PvStringList
Class used to hold a group of PvString objects.
Definition: PvStringList.h:19
PvConfigurationReader::GetStringName
PvResult GetStringName(uint32_t aIndex, PvString &aName)
Get the custom-state string name (PvString)
Definition: PvConfigurationReader.cpp:365
PvConfigurationReader
Restore the state of the system.
Definition: PvConfigurationReader.h:23
PvPropertyList
Class used to hold a group of PvProperty objects.
Definition: PvPropertyList.h:20
PvConfigurationReader::~PvConfigurationReader
~PvConfigurationReader()
Destructor.
Definition: PvConfigurationReader.cpp:93
PvDevice
Connect, configure and control a GigE Vision or USB3 Vision device.
Definition: PvDevice.h:30
PvConfigurationReader::GetStreamName
PvResult GetStreamName(uint32_t aIndex, PvString &aName)
Get the configuration name (PvStream).
Definition: PvConfigurationReader.cpp:284
PvConfigurationReader::GetStreamCount
uint32_t GetStreamCount()
Get the number of stream configuration in this PvConfigurationReader.
Definition: PvConfigurationReader.cpp:265
PvConfigurationReader::SetErrorList
void SetErrorList(PvStringList *aList, const PvString &aPrefix)
Sets the error list where all errors/warnings are logged.
Definition: PvConfigurationReader.cpp:626
PvConfigurationReader::GetPropertyListCount
uint32_t GetPropertyListCount()
Get the number of PvPropertyList objects saved in the configuration file.
Definition: PvConfigurationReader.cpp:517
PvConfigurationReader::GetDeviceName
PvResult GetDeviceName(uint32_t aIndex, PvString &aName)
Get the configuration name (PvDevice).
Definition: PvConfigurationReader.cpp:184

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