Inheritance diagram for IParameterDatabase:
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.
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. |
|
Returns the reader this database belongs to.
|
|
Retrieves the number of collected parameters. When CollectParameters is not yet called, this method returns 0.
|
|
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.
|
|
Returns the status of the current collecting process.
|
|
Cancel a collection process that is currently in progress.
|
|
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:
|
|
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.
|
|
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.
|
|
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. |