 | ZWOptions Class |
A class that manages program options read from XML files or the command line.
Inheritance Hierarchy
Namespace:
OpenZWave
Assembly:
OpenZWave (in OpenZWave.dll) Version: 255.255.255.255
Syntaxpublic sealed class ZWOptions
Public NotInheritable Class ZWOptions
public ref class ZWOptions sealed
The ZWOptions type exposes the following members.
Properties
| Name | Description |
---|
 | AreLocked | Test whether the options have been locked. |
  | Instance | Gets the singleton instance of the options |
Top
Methods
Remarks
The OpenZWave Manager class requires a complete and locked Options
object when created. The Options are therefore one of the first things that
any OpenZWave application must deal with.
Options are first read from an XML file called options.xml located in the
User data folder (the path to which is supplied to the Options::Create method).
This is the same folder that will be used by the Manager to save the state of
each controller in the Z-Wave network, to avoid querying them for their entire
state every time the application starts up.
The second source of program options is a string, which will normally be the
command line used to launch the application.
In this way, common options can be specified in the XML, but over-ridden if
necessary by the command line.
The Options process is as follows:
1) Create an Options object, providing paths to the OpenZWave config folder,
the User data folder and any command line string containing program options.
2) Call Options::AddOptionBool, Options::AddOptionInt or Options::AddOptionString
to add any application-specific configurable options
The OpenZWave options will already have been added during construction of the
Options object.
3) Call Options::Lock. This will cause the option values to be read from
the options.xml file and the command line string, and will lock the options
so that no more calls aside from GetOptionAs may be made.
4) Create the OpenZWave Manager object.
See Also