The device library implements a variety of generally useful functions for handling multiprotocol devices, but it is not meant to completely replace the use of LayGO API functions. For example, the stack must be configured and initialized in the usual way.
Devices are then created using dev_New() and disposed of using dev_Dispose(). A typical sequence of actions is:
Generally, the name of the file to be used as the device database should be set by calling dev_Initialize() before any other device functions are called, but this step can be omitted if the default device database is used. Also, since dev_Disconnect() will automatically attach the device and dev_Dispose() will automatically close the device, the sequence may be abbreviated:
A variety of enhancements to the library are possible. For instance, a configuration file could be optionally associated with each device, from which each service would be configured. You are free to modify the source code in any way you think would be useful.