#include <si_sha/abrgdev.h>
Go to the source code of this file.
The Insteon bridge device derives from the base automation device, and implements a number of Insteon specific functions for use by the JavaScript device.
sc_status sc_insteonBridgeDevice_construct | ( | sc_insteonBridgeDevice * | brg, | |
sc_automationDeviceMgr * | pdm, | |||
const TCHAR * | name, | |||
const TCHAR * | basePath | |||
) |
Constructs the Insteon bridge device brg
with the given name
.
[in,out] | brg | The insteon bridge device to construct. |
[in] | pdm | The device manager for name resolution. |
[in] | name | The name of the insteon bridge. |
[in] | basePath | The basePath of the system. |
sc_status sc_insteonBridgeDevice_destruct | ( | sc_insteonBridgeDevice * | brg | ) |
Destructs the Insteon bridge brg
.
sc_status sc_insteonBridgeDevice_newPacket | ( | sc_insteonBridgeDevice * | pb, | |
sc_automationPacketPtrh * | pptrh | |||
) |
Returns a new packet object from the Insteon device pool.
[in,out] | brg | The bridge device to use. |
[out] | pptrh | The pointer-handle where the newly allolcated packet will be assigned. |
sc_status sc_insteonBridgeDevice_processEvent | ( | sc_insteonBridgeDevice * | brg, | |
sc_automationPacket * | pkt | |||
) |
Processes the network event in pkt
, relaying it to the appropriate JavaScript object via the device manager.
[in,out] | brg | The bridge device to use. |
[in] | pkt | The event packet to relay. |
sc_status sc_insteonBridgeDevice_processRequest | ( | sc_insteonBridgeDevice * | brg, | |
sc_automationRequest * | req, | |||
sc_automationResponse * | res | |||
) |
Processes the given request req
and returns a response in res
.
Processes the request by serializing it to the insteon bridge controller/driver.
[in,out] | brg | The bridge device to use. |
[in] | req | The request to send. |
[out] | res | The response to the request. |
sc_status sc_insteonBridgeDevice_resetDeviceDB | ( | sc_insteonBridgeDevice * | pb | ) |
Resets (clears) the internal device database of the Insteon bridge via its controller.
sc_status sc_insteonBridgeDevice_sendStdMessage | ( | sc_insteonBridgeDevice * | pb, | |
const TCHAR * | address, | |||
s_uint8 | cmd1, | |||
s_uint8 | cmd2 | |||
) |
Sends an Insteon standard message to the bridge controller.
[in,out] | brg | The bridge device to use. |
[in] | address | The address of the device to send the message to. |
[in] | cmd1 | The first byte of the standard message. |
[in] | cmd2 | The second byte of the standard message. |
sc_status sc_insteonBridgeDevice_sendStdWaitAck | ( | sc_insteonBridgeDevice * | pb, | |
const TCHAR * | address, | |||
s_uint8 | cmd1, | |||
s_uint8 | cmd2, | |||
sc_automationPacketPtrh * | rptrh | |||
) |
Sends a standard message for which a data response message is expected.
Some messages are a query for data. The response comes back as a full message.
[in,out] | brg | The bridge device to use. |
[in] | address | The address of the device to send the message to. |
[in] | cmd1 | The first byte of the standard message. |
[in] | cmd2 | The second byte of the standard message. |
[out] | rptrh | The response message. |