Module "upnp.drivers.driver-template
"
Template code file for a UPnP gateway driver. Additional drivers can be implemented using this template and can be loaded by the gateway. See upnp.bootstrap.
Functions
driver:getdevice () | Device generator. |
driver:started () | Eventhandler for 'started' event. |
driver:starting () | Eventhandler for 'starting' event. |
driver:stopped () | Eventhandler for 'stopped' event. |
driver:stopping () | Eventhandler for 'stopping' event. |
driver:writeconfig () | Configuration file writer. |
Functions
- driver:getdevice ()
-
Device generator. Will be called after loading the driver, should return a device table
Return value:
device table to be inserted into the gateway device as a sub-device - driver:started ()
- Eventhandler for 'started' event. Will be called when UPnP has started, copas is running, sockets and timers are running
- driver:starting ()
- Eventhandler for 'starting' event. Will be called when UPnP is starting, Copas scheduler will not yet be running, no sockets nor timers will be available
- driver:stopped ()
- Eventhandler for 'stopped' event. Will be called when UPnP has stopped, Copas scheduler will no longer be running, no sockets, no timers
- driver:stopping ()
- Eventhandler for 'stopping' event. Will be called when UPnP is stopping, copas is running, sockets and timers are running
- driver:writeconfig ()
-
Configuration file writer. Will be called to write the current configuration in a config file.
Return value:
nothing, ornil + errormsg
in case of an errorSee also: