Pleora Technologies Inc. eBUS SDK v7.0.1.7536 API



Loading...
Searching...
No Matches
PvConfigurationWriter Class Reference

Writes configuration data to persistence files. More...

#include <PvConfigurationWriter.h>

Public Member Functions

 PvConfigurationWriter ()
 Constructor.
 
 ~PvConfigurationWriter ()
 Destructor.
 
PvResult Store (PvDevice *aDevice, PvString aName=PvString(""))
 Stores configuration from a device.
 
PvResult Store (PvStream *aStream, PvString aName=PvString(""))
 Stores configuration from a stream.
 
PvResult Store (const PvString &aString, const PvString &aName)
 Stores a string value.
 
PvResult Store (PvGenParameterArray *aGenParameterArray, PvString aName=PvString(""), PvStringList *aExtendedBlackList=NULL)
 Stores configuration from a GenICam parameter array.
 
PvResult Store (PvPropertyList *aPropertyList, PvString aName=PvString(""))
 Stores a property list.
 
PvResult Save (const PvString &aFilename)
 Saves the configuration to a file.
 
PvResult SaveToString (PvString &aString)
 Saves the configuration to a string.
 
void SetErrorList (PvStringList *aList, const PvString &aPrefix)
 Sets the error list for collecting error messages during store operations.
 

Detailed Description

Writes configuration data to persistence files.

Save the state of the system.

Remarks
This class provides methods to store configuration from devices, streams, parameter arrays, and property lists, then save to files or strings.

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)

Saves the configuration to a file.

Flush all stored configurations to disk.

Parameters
[in]aFilenamePath to the output file.
Returns
Result of the operation.

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.

Parameters
[out]aStringString to receive the configuration data.
Returns
Result of the operation.

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 for collecting error messages during store operations.

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

Parameters
[in]aListString list to receive error messages.
[in]aPrefixPrefix to add to error messages.
[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 
)

Stores a string value.

Store a custom string.

Parameters
[in]aStringString value to store.
[in]aNameName/key for the stored string.
Returns
Result of the operation.

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( "" ) 
)

Stores configuration from a device.

Store a PvDevice configuration.

Parameters
[in]aDeviceDevice to store configuration from.
[in]aNameOptional name for the stored configuration.
Returns
Result of the operation.

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 
)

Stores configuration from a GenICam parameter array.

Store a PvGenParameterArray.

Parameters
[in]aGenParameterArrayParameter array to store configuration from.
[in]aNameOptional name for the stored configuration.
[in]aExtendedBlackListOptional list of parameter names to exclude from storage.
Returns
Result of the operation.

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.

Parameters
[in]aPropertyListProperty list to store.
[in]aNameOptional name for the stored configuration.
Returns
Result of the operation.

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( "" ) 
)

Stores configuration from a stream.

Store a PvStream configuration.

Parameters
[in]aStreamStream to store configuration from.
[in]aNameOptional name for the stored configuration.
Returns
Result of the operation.

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-2026 Pleora Technologies Inc.
www.pleora.com