Pleora Technologies Inc. eBUS SDK v6.2.8.5877 API



PvConfigurationWriter Class Reference

Save the state of the system. More...

Public Member Functions

 PvConfigurationWriter ()
 Constructor.
 
 ~PvConfigurationWriter ()
 Destructor.
 
PvResult Store (PvDevice *aDevice, PvString aName=PvString(""))
 Store a PvDevice configuration. More...
 
PvResult Store (PvStream *aStream, PvString aName=PvString(""))
 Store a PvStream configuration. More...
 
PvResult Store (const PvString &aString, const PvString &aName)
 Store a custom string. More...
 
PvResult Store (PvGenParameterArray *aGenParameterArray, PvString aName=PvString(""), PvStringList *aExtendedBlackList=NULL)
 Store a PvGenParameterArray. More...
 
PvResult Store (PvPropertyList *aPropertyList, PvString aName=PvString(""))
 Stores a property list. More...
 
PvResult Save (const PvString &aFilename)
 Flush all stored configurations to disk. More...
 
PvResult SaveToString (PvString &aString)
 Saves the configuration to a string. More...
 
void SetErrorList (PvStringList *aList, const PvString &aPrefix)
 Sets the error list where all errors/warnings are logged. More...
 

Detailed Description

Save the state of the system.

You can save:

  • the GigE Vision or USB3 Vision device's state (all streamable parameters)
  • the SDK's state (stream information and information needed to connect to a device)
  • your own custom strings and property lists

To save your state information:

  1. Create a configuration writer. Use PvConfigurationWriter::PvConfigurationWriter.
  2. Store state information in the configuration writer.
    • For GigE Vision or USB3 Vision device controllers (PvDevice objects), use Store(PvDevice,PvString).
    • For GigE Vision or USB3 Vision stream channel receivers (PvStream objects), use Store(PvStream,PvString).
  3. Optionally, store your own state information. Use Store (PvString,PvString).
  4. Optionally, repeat the two previous steps.
  5. Save the stored information to disk. Use Save.

To load your state information:

Member Function Documentation

◆ Save()

PvResult PvConfigurationWriter::Save ( const PvString aFilename)

Flush all stored configurations to disk.

The Save flushes writes all configurations in the PvConfigurationWriter object (using Store) to disk.

Parameters
[in]aFilenameThe configuration file's filename and path.
Returns
Includes:

◆ SaveToString()

PvResult PvConfigurationWriter::SaveToString ( PvString aString)

Saves the configuration to a string.

The Save flushes writes all configurations in the PvConfigurationWriter object (using Store) to a string.

Parameters
[in]aStringThe string where the configurations are saved.
Returns
Includes:

◆ SetErrorList()

void PvConfigurationWriter::SetErrorList ( PvStringList aList,
const PvString aPrefix 
)

Sets the error list where all errors/warnings are logged.

Parameters
[in]aListA pointer to a string list. The content of the list is not reset, new errors are simply added to the list.
[in]aPrefixA contextual prefix prepended to all errors as they are added to the error list.

◆ Store() [1/5]

PvResult PvConfigurationWriter::Store ( const PvString aString,
const PvString aName 
)

Store a custom string.

Can be used to persist application information other than PvDevice or PvStream status in a single configuration file.

To use this method, see Store(PvDevice *,PvString).

Parameters
[in]aStringSee Store(PvDevice *,PvString), aDevice parameter.
[in]aNameSee Store(PvDevice *,PvString).
Returns
See Store(PvDevice *,PvString).

◆ Store() [2/5]

PvResult PvConfigurationWriter::Store ( PvDevice aDevice,
PvString  aName = PvString( "" ) 
)

Store a PvDevice configuration.

The Store family of methods add a configuration to the PvConfigurationWriter object. You must call Save to flush your configurations to disk.

The Store methods use a (ConfigurationType, ConfigurationName) parameter format. The ConfigurationType is the object (PvDevice, PvStream, or PvString); the ConfigurationName is an arbitrary identifying name for the configuration.

Parameters
[in]aDeviceThe configuration type; the object whose information will be stored. Other Store methods have similar behavior, but different data types (PvStream or PvString).
[in]aNameThe configuration name; an arbitrary identifying name for this configuration (since you set it, it may differ from the value returned by methods such as PvDeviceInfo::GetUserDefinedName).
Returns
See Store(PvDevice *,PvString).

◆ Store() [3/5]

PvResult PvConfigurationWriter::Store ( PvGenParameterArray aGenParameterArray,
PvString  aName = PvString( "" ),
PvStringList aExtendedBlackList = NULL 
)

Store a PvGenParameterArray.

Can be used to persist a PvGenParameterArray.

Parameters
[in]aGenParameterArraySee Store(PvDevice *,PvString), aDevice parameter.
[in]aNameSee Store(PvDevice *,PvString).
[in]aExtendedBlackListA list of parameter names to add to the parameter black list when saving.
Returns
See Store(PvDevice *,PvString).

◆ Store() [4/5]

PvResult PvConfigurationWriter::Store ( PvPropertyList aPropertyList,
PvString  aName = PvString( "" ) 
)

Stores a property list.

Can be used to persist a property list object. A property is name/value pair.

Parameters
[in]aPropertyListSee Store(PvDevice *,PvString), aDevice parameter.
[in]aNameSee Store(PvDevice *,PvString).
Returns
See Store(PvDevice *,PvString).

◆ Store() [5/5]

PvResult PvConfigurationWriter::Store ( PvStream aStream,
PvString  aName = PvString( "" ) 
)

Store a PvStream configuration.

To use this method, see Store(PvDevice *,PvString).

Parameters
[in]aStreamSee Store(PvDevice *,PvString), aDevice parameter.
[in]aNameSee Store(PvDevice *,PvString).
Returns

The documentation for this class was generated from the following files:

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