Cross Point


IParameterDatabase Interface Reference

Inheritance diagram for IParameterDatabase:

IXMLBase IEventBase List of all members.

Detailed Description

This interface represents the parameter database.

The reader contains a parameter database. It consists of a number of different parameters (about 40). A parameter object (IParameter) represents a setting that can be done on the reader. This object is the main interface for handling parameters.

The parameters can be retrieved from the database using the CollectParameters method. When this method is finished, the entire collection of parameters can be retrieved using the Parameters property. It is possible to collect the parameters asynchronously using a flag in the CollectParameters method. The IsCollectingParameters property can then be used to check if the process has finished collecting all parameters. Cancel the asynchronous collecting of parameters using the CancelCollectingParameters method. During the collecting of parameters, events are fired that can be used to show the progress and/or perform other tasks (see the CollectParameters method for detailed information).

All parameters that have been collected using the CollectParameters method will be cached in an internal collection, this is done to increase performance.

This object also contains a method called FindParameter that will return a single parameter, useful when you do not want to collect the entire parameterdatabase.

All parameters currently in the database can be saved to disk using the IXMLBase::Download method. It is also possible to upload a previously saved file to the reader using the IXMLBase::Upload method.

Warning:
Note that different parameters are visible depending on the reader configuration ,user level and logon level!


Public Member Functions

HRESULT Reader ([out, retval] IProximityReader **ppintfReader)
 Returns the reader this database belongs to.

HRESULT Count ([out, retval] long *plCount)
 Retrieves the number of collected parameters.

HRESULT CollectParameters ([in, defaultvalue(0)] VARIANT_BOOL CollectAsync,[in, defaultvalue(nvpSerialNumber)] ENVP StartParameter,[in, defaultvalue(nvpLast)] ENVP EndParameter,[out, retval] long *plParameters)
 Collect all parameters.

HRESULT IsCollectingParameters ([out, retval] ECollectingStatus *peStatus)
 Returns the status of the current collecting process.

HRESULT CancelCollectingParameters ()
 Cancel a collection process that is currently in progress.

HRESULT FindParameter ([in] ENVP nvp,[out, retval] IParameter **ppintfParameter)
 Returns a specific parameter.

HRESULT Parameters ([out, retval] ICollection **ppintfParameters)
 Returns a collection of all (accessable) parameters.

HRESULT Parameters ([in] ICollection *pintfParameters)
 Sets all parameters of this reader.

HRESULT Clear ()
 Removes all parameters from the parameter database.


Member Function Documentation

IParameterDatabase::Reader [out, retval] IProximityReader **  ppintfReader  ) 
 

Returns the reader this database belongs to.

Parameters:
ppintfReader Receives the reader object.
Precondition:
ppintfReader is not NULL.
Note:
This is a read-only property when used in scripting languages.
See also:
IProximityReader

IParameterDatabase::Count [out, retval] long *  plCount  ) 
 

Retrieves the number of collected parameters.

When CollectParameters is not yet called, this method returns 0.

Parameters:
plCount Receives the number of parameters in the internal collection.
Precondition:
plCount is not NULL.
Note:
This is a read-only property when used in scripting languages.
See also:
CollectParameters

IParameterDatabase::CollectParameters [in, defaultvalue(0)] VARIANT_BOOL  fCollectAsync,
[in, defaultvalue(nvpSerialNumber)] ENVP  eStartParameter,
[in, defaultvalue(nvpLast)] ENVP  eEndParameter,
[out, retval] long *  plParameters
 

Collect all parameters.

This method creates an internal collection with all parameters currently available in this reader and returns the number of found parameters. To get the collection, use the Parameters property. The collection is cached internally for future use.

Only parameters that have a number between eStartParameter and eEndParameter are added to the collection.

It is possible to collect the parameters asynchronously by setting the fCollectAsync flag to true. The IsCollectingParameters property can then be used to check if the process has finished collecting all parameters. The collect process can be canceled using the CancelCollectingParameters method.

The default events of processtype ptCollectingParameters are fired while collecting parameters. the normal progress events are also fired (for each scanned parameter). For every found parameter, the OnProcessInfo event is fired with sub process type sptItemFound, the Info parameter will hold the found parameter. Not every scanned parameter will be added to the internal collection. When a parameter is not accessable (wrong log-on level, incorrect reader configuration etc.), the parameter will not be added to the internal collection.

This method will also fire an OnProcessInfo with processtype ptParameterdatabaseChange with sub process type sptItemAdded for every parameter it has added to its internal parameter collection. This ptParameterdatabaseChange is a general process type, all changes to the parameter database (i.e. parameter modified) can be monitored using this process type.

Parameters:
fCollectAsync When set to true, the collecting is performed asynchrously.
eStartParameter The index of the first parameter that should be collected.
eEndParameter The index of the last parameter that should be collected.
plParameters Receives the number of readers found (only when fCollectAsync is false).
See also:
Parameters, IsCollectingParameters, CancelCollectingParameters, IParameter, ENVP, Count

IParameterDatabase::IsCollectingParameters [out, retval] ECollectingStatus peStatus  ) 
 

Returns the status of the current collecting process.

Parameters:
peStatus Receives the status of the collecting process.
See also:
ECollectingStatus, CollectParameters, CancelCollectingParameters, Parameters

IParameterDatabase::CancelCollectingParameters  ) 
 

Cancel a collection process that is currently in progress.

See also:
CollectParameters, CancelCollectingParameters, Parameters

IParameterDatabase::FindParameter [in] ENVP  eNVP,
[out, retval] IParameter **  ppintfParameter
 

Returns a specific parameter.

When there is already a internal cached parameter collection (when the CollectParameters method is already called), this method will first try to find the requested parameter in the internal collection. If it is found in the collection, it will be returned. If not the requested parameter will be retrieved from the reader itself.

If the parameter cannot be found in the reader, an empty (null) object will be returned and the return code of this method is set to one of the following values:

  • E_GENERALERROR Invalid parameter number.
  • E_GENERALERROR2 Not authorized for accessing this parameter.
  • E_GENERALERROR3 Parameter not available in current reader software configuration.
Parameters:
eNVP The number of the parameter that should be returned.
ppintfParameter Receives the found parameter object (or NULL if not found).
Precondition:
ppintfParameter is not NULL.
See also:
ENVP, IParameter

IParameterDatabase::Parameters [out, retval] ICollection **  ppintfParameters  ) 
 

Returns a collection of all (accessable) parameters.

If the CollectParameters method is not yet called, this property will fail. So please call the CollectParameters first before calling this property.

Parameters:
ppintfParameters Receives a collection of all parameters.
Precondition:
ppintfParameters is not NULL.
See also:
CollectParameters, IParameter, IsCollectingParameters, CancelCollectingParameters

IParameterDatabase::Parameters [in] ICollection pintfParameters  ) 
 

Sets all parameters of this reader.

If the CollectParameters method has been called before this method, all internal cached parameters will be set to the new value specified by a matching parameter from the pintfParameters argument. So, when for instance a new value (say "10") for parameter A is provided, parameter A will searched in the internal collection, if it is found it will be set to "10" and the parameter's IParameter::Save method will be called.

If the CollectParameters has not yet been called, the new data is simply passed to the reader, no searching or parameter-matching will happen. The new parameter will also be added to the internal parameters collection.

All default events (including progress events) of processtype ptSettingParameters are fired by this method. If the parameters are already collected and a parameter is modified, an OnProcessInfo event of general processtype ptParameterdatabaseChange is fired with sub process type sptItemModified. When the parameters where not yet collected, the sub process type will be sptItemAdded.

The following parameters will NOT be set automatically: nvpNetworkAddress, nvpDeviceName, nvpUserLevelPassword and nvpInstallerLevelPassword. Settings these parameters automatically, could make the reader unaccessable.

Parameters:
pintfParameters The new parameter values.
See also:
CollectParameters, IParameter

IParameterDatabase::Clear  ) 
 

Removes all parameters from the parameter database.

This method will only erase the internal collection of parameters. The parameter database in the reader will remain untouched.


© Copyright 2001 - 2006 Cross Point. Generated on Mon Mar 12 16:29:51 2007 Cross Point