#include <si_sys/serial.h>
#include <si_sha/autobrg.h>
#include <si_sha/insteon.h>
Go to the source code of this file.
sc_status sc_insteonBridge_construct | ( | sc_insteonBridge * | pb, | |
const TCHAR * | name, | |||
const TCHAR * | devName, | |||
const TCHAR * | basePath | |||
) |
Constructs an insteon bridge controller on the serial port with the special filename devName
.
[in,out] | pb | The bridge object to construct. |
[in] | name | The name of the bridge. Used to name the Unix socket its interface is provided on. |
[in] | devName | The name of the 'special' file for the serial port the bridge is attached to. |
[in] | basePath | The base path for the application. |
sc_status sc_insteonBridge_destruct | ( | sc_insteonBridge * | pb | ) |
Destructs the given insteon bridge.
sc_status sc_insteonBridge_getConfiguration | ( | sc_insteonBridge * | pb, | |
s_uint8 * | pcfg | |||
) |
Gets the PLM bridge configuration byte.
[in,out] | pb | The bridge to query. |
[out] | pcfg | The configuration byte. |
sc_status sc_insteonBridge_getFirstLinkEntry | ( | sc_insteonBridge * | pb, | |
sc_insteonLinkEntry * | ple | |||
) |
Gets the first entry in the PLM link database.
[in,out] | pb | The bridge to query. |
[out] | ple | The link entry struct to fill in. |
sc_status sc_insteonBridge_getNextLink | ( | sc_insteonBridge * | pb, | |
sc_insteonLinkEntry * | ple | |||
) |
Gets the next entry in the PLM link database.
[in,out] | pb | The bridge to query. |
[out] | ple | The link entry struct to fill in. |
sc_status sc_insteonBridge_getVersion | ( | sc_insteonBridge * | pb, | |
sc_insteonBridgeVersion * | pv | |||
) |
Gets the version of the PLM bridge.
[in,out] | pb | The bridge to query. |
[out] | pv | The version struct to fill in. |
sc_status sc_insteonBridge_resetLinks | ( | sc_insteonBridge * | pb | ) |
Resets (clears) the link database of the bridge.
This erases all linked devices from the bridge EERAM. After this call, the Insteon network must be rebuilt by manually re-linking devices to the bridge.
[in,out] | pb | The bridge to reset. |
sc_status sc_insteonBridge_sendExtMessage | ( | sc_insteonBridge * | pb, | |
s_uint32 | toAddress, | |||
s_uint8 | cmd1, | |||
s_uint8 | cmd2, | |||
s_uint8 * | data, | |||
s_int32 | len | |||
) |
Sends an 'extended' Insteon message to toAddress
on the network.
All standard and extended commands are documented by Insteon in the document 'Insteon Command Tables'.
[in,out] | pb | The bridge to send the message through. |
[in] | toAddress | The address of the device to send the message to. |
[in] | cmd1 | The first command byte of the message. |
[in] | cmd2 | The second command byte of the message. |
[in] | data | The 14 bytes of extended payload data. |
[in] | len | The length of the given data. The remaining bytes will be zero padded. |
sc_status sc_insteonBridge_sendGroupMessage | ( | sc_insteonBridge * | pb, | |
s_uint8 | groupId, | |||
s_uint8 | cmd1, | |||
s_uint8 | cmd2 | |||
) |
Send a message to the group identified by groupId
.
A group-cast message with the given cmd1 and cmd2 bytes is sent out.
[in,out] | pb | The bridge to send the message through. |
[in] | groupId | The group to send the message to. |
[in] | cmd1 | The first command byte of the message. |
[in] | cmd2 | The second command byte of the message. |
sc_status sc_insteonBridge_sendStdMessage | ( | sc_insteonBridge * | pb, | |
s_uint32 | toAddress, | |||
s_uint8 | cmd1, | |||
s_uint8 | cmd2 | |||
) |
Sends a 'standard' Insteon message to toAddress
on the network.
Nearly all the most common messages on the Insteon network are standard messages. For example, an 'On' message is typically cmd1=0x11 and cmd2=0-0xff (on-level). 'Off' is typically cmd1=0x13 and cmd2=0x01. All standard and extended commands are documented by Insteon in the document 'Insteon Command Tables'.
[in,out] | pb | The bridge to send the message through. |
[in] | toAddress | The address of the device to send the message to. |
[in] | cmd1 | The first command byte of the message. |
[in] | cmd2 | The second command byte of the message. |
sc_status sc_insteonBridge_setConfiguration | ( | sc_insteonBridge * | pb, | |
s_uint8 | cfg | |||
) |
Sets the bridge configuration byte.
[in,out] | pb | The bridge to query. |
[in] | cfg | The configuration byte. |