/usr/include/openzwave/Manager.h is in libopenzwave1.5-dev 1.5+ds-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 | //-----------------------------------------------------------------------------
//
// Manager.h
//
// The main public interface to OpenZWave.
//
// Copyright (c) 2010 Mal Lansell <openzwave@lansell.org>
//
// SOFTWARE NOTICE AND LICENSE
//
// This file is part of OpenZWave.
//
// OpenZWave is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// OpenZWave is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
//
//-----------------------------------------------------------------------------
#ifndef _Manager_H
#define _Manager_H
#include <string>
#include <cstring>
#include <vector>
#include <map>
#include <list>
#include <deque>
#include "Defs.h"
#include "Driver.h"
#include "Group.h"
#include "value_classes/ValueID.h"
namespace OpenZWave
{
class Options;
class Node;
class Msg;
class Value;
class Event;
class Mutex;
class SerialPort;
class Thread;
class Notification;
class ValueBool;
class ValueByte;
class ValueDecimal;
class ValueInt;
class ValueList;
class ValueShort;
class ValueString;
class ValueRaw;
/** \brief
* The main public interface to OpenZWave.
*
* \nosubgrouping
* A singleton class providing the main public interface to OpenZWave.
* The Manager class exposes all the functionality required to add
* Z-Wave support to an application. It handles the sending and receiving
* of Z-Wave messages as well as the configuration of a Z-Wave network
* and its devices, freeing the library user from the burden of learning
* the low-level details of the Z-Wave protocol.
* <p>
* All Z-Wave functionality is accessed via the Manager class. While this
* does not make for the most efficient code structure, it does enable
* the library to handle potentially complex and hard-to-debug issues
* such as multi-threading and object lifespans behind the scenes.
* Application development is therefore simplified and less prone to bugs.
* <p>
* There can be only one instance of the Manager class, and all applications
* will start by calling Manager::Create static method to create that instance.
* From then on, a call to the Manager::Get static method will return the
* pointer to the Manager object. On application exit, Manager::Destroy
* should be called to allow OpenZWave to clean up and delete any other
* objects it has created.
* <p>
* Once the Manager has been created, a call should be made to Manager::AddWatcher
* to install a notification callback handler. This handler will receive
* notifications of Z-Wave network changes and updates to device values, and is
* an essential element of OpenZWave.
* <p>
* Next, a call should be made to Manager::AddDriver for each Z-Wave controller
* attached to the PC. Each Driver will handle the sending and receiving of
* messages for all the devices in its controller's Z-Wave network. The Driver
* will read any previously saved configuration and then query the Z-Wave controller
* for any missing information. Once that process is complete, a DriverReady
* notification callback will be sent containing the Home ID of the controller,
* which is required by most of the other Manager class methods.
* <p>
* [After the DriverReady notification is sent, the Driver will poll each node on
* the network to update information about each node. After all "awake" nodes
* have been polled, an "AllAwakeNodesQueried" notification is sent. This is when
* a client application can expect all of the node information (both static
* information, like the physical device's capabilities, session information
* (like [associations and/or names] and dynamic information (like temperature or
* on/off state) to be available. Finally, after all nodes (whether listening or
* sleeping) have been polled, an "AllNodesQueried" notification is sent.]
*/
class OPENZWAVE_EXPORT Manager
{
friend class Driver;
friend class CommandClass;
friend class Group;
friend class Node;
friend class Value;
friend class ValueStore;
friend class ValueButton;
friend class Msg;
public:
typedef void (*pfnOnNotification_t)( Notification const* _pNotification, void* _context );
//-----------------------------------------------------------------------------
// Construction
//-----------------------------------------------------------------------------
/** \name Construction
* For creating and destroying the Manager singleton.
*/
/*@{*/
public:
/**
* \brief Creates the Manager singleton object.
* The Manager provides the public interface to OpenZWave, exposing all the functionality required
* to add Z-Wave support to an application. There can be only one Manager in an OpenZWave application.
* An Options object must be created and Locked first, otherwise the call to Manager::Create will
* fail. Once the Manager has been created, call AddWatcher to install a notification callback handler,
* and then call the AddDriver method for each attached PC Z-Wave controller in turn.
* \param _options a locked Options object containing all the application's configurable option values.
* \return a pointer to the newly created Manager object, or NULL if creation failed.
* \throws OZWException with Type OZWException::OZWEXCEPTION_OPTIONS if the Options Class is not setup and Locked
* \see Options, Get, Destroy, AddWatcher, AddDriver
*/
static Manager* Create();
/**
* \brief Gets a pointer to the Manager object.
* \return pointer to the Manager object, or NULL if Create has not yet been called.
* \see Create, Destroy
*/
static Manager* Get(){ return s_instance; }
/**
* \brief Deletes the Manager and cleans up any associated objects.
* \see Create, Get
*/
static void Destroy();
/**
* \brief Get the Version Number of OZW as a string
* \return a String representing the version number as MAJOR.MINOR.REVISION
*/
static std::string getVersionAsString();
/**
* \brief Get the Version Number including Git commit of OZW as a string
* \return a String representing the version number as MAJOR.MINOR.REVISION-gCOMMIT
*/
static std::string getVersionLongAsString();
/**
* \brief Get the Version Number as the Version Struct (Only Major/Minor returned)
* \return the version struct representing the version
*/
static ozwversion getVersion();
/*@}*/
private:
Manager(); // Constructor, to be called only via the static Create method.
virtual ~Manager(); // Destructor, to be called only via the static Destroy method.
bool m_exit; // Flag indicating that program exit is in progress.
static Manager* s_instance; // Pointer to the instance of the Manager singleton.
//-----------------------------------------------------------------------------
// Configuration
//-----------------------------------------------------------------------------
/** \name Configuration
* For saving the Z-Wave network configuration so that the entire network does not need to be
* polled every time the application starts.
*/
/*@{*/
public:
/**
* \brief Saves the configuration of a PC Controller's Z-Wave network to the application's user data folder.
* This method does not normally need to be called, since OpenZWave will save the state automatically
* during the shutdown process. It is provided here only as an aid to development.
* The configuration of each PC Controller's Z-Wave network is stored in a separate file. The filename
* consists of the 8 digit hexadecimal version of the controller's Home ID, prefixed with the string 'zwcfg_'.
* This convention allows OpenZWave to find the correct configuration file for a controller, even if it is
* attached to a different serial port, USB device path, etc.
* \param _homeId The Home ID of the Z-Wave controller to save.
*/
void WriteConfig( uint32 const _homeId );
/**
* \brief Gets a pointer to the locked Options object.
* \return pointer to the Options object.
* \see Create
*/
Options* GetOptions()const{ return m_options; }
/*@}*/
private:
Options* m_options; // Pointer to the locked Options object that was passed in during creation.
//-----------------------------------------------------------------------------
// Drivers
//-----------------------------------------------------------------------------
/** \name Drivers
* Methods for adding and removing drivers and obtaining basic controller information.
*/
/*@{*/
public:
/**
* \brief Creates a new driver for a Z-Wave controller.
* This method creates a Driver object for handling communications with a single Z-Wave controller. In the background, the
* driver first tries to read configuration data saved during a previous run. It then queries the controller directly for any
* missing information, and a refresh of the list of nodes that it controls. Once this information
* has been received, a DriverReady notification callback is sent, containing the Home ID of the controller. This Home ID is
* required by most of the OpenZWave Manager class methods.
* @param _controllerPath The string used to open the controller. On Windows this might be something like
* "\\.\COM3", or on Linux "/dev/ttyUSB0".
* \return True if a new driver was created, false if a driver for the controller already exists.
* \see Create, Get, RemoveDriver
*/
bool AddDriver( string const& _controllerPath, Driver::ControllerInterface const& _interface = Driver::ControllerInterface_Serial);
/**
* \brief Removes the driver for a Z-Wave controller, and closes the controller.
* Drivers do not need to be explicitly removed before calling Destroy - this is handled automatically.
* \warning You should NOT call any Manager methods that require the Driver Reference (eg, in response to
* Notifications recieved about NodeRemoved etc) once you call this, as your application will most likely
* break
* @param _controllerPath The same string as was passed in the original call to AddDriver.
* @returns True if the driver was removed, false if it could not be found.
* @see Destroy, AddDriver
*/
bool RemoveDriver( string const& _controllerPath );
/**
* \brief Get the node ID of the Z-Wave controller.
* \param _homeId The Home ID of the Z-Wave controller.
* \return the node ID of the Z-Wave controller.
*/
uint8 GetControllerNodeId( uint32 const _homeId );
/**
* \brief Get the node ID of the Static Update Controller.
* \param _homeId The Home ID of the Z-Wave controller.
* \return the node ID of the Z-Wave controller.
*/
uint8 GetSUCNodeId( uint32 const _homeId );
/**
* \brief Query if the controller is a primary controller.
* The primary controller is the main device used to configure and control a Z-Wave network.
* There can only be one primary controller - all other controllers are secondary controllers.
* <p>
* The only difference between a primary and secondary controller is that the primary is the
* only one that can be used to add or remove other devices. For this reason, it is usually
* better for the promary controller to be portable, since most devices must be added when
* installed in their final location.
* <p>
* Calls to BeginControllerCommand will fail if the controller is not the primary.
* \param _homeId The Home ID of the Z-Wave controller.
* \return true if it is a primary controller, false if not.
*/
bool IsPrimaryController( uint32 const _homeId );
/**
* \brief Query if the controller is a static update controller.
* A Static Update Controller (SUC) is a controller that must never be moved in normal operation
* and which can be used by other nodes to receive information about network changes.
* \param _homeId The Home ID of the Z-Wave controller.
* \return true if it is a static update controller, false if not.
*/
bool IsStaticUpdateController( uint32 const _homeId );
/**
* \brief Query if the controller is using the bridge controller library.
* A bridge controller is able to create virtual nodes that can be associated
* with other controllers to enable events to be passed on.
* \param _homeId The Home ID of the Z-Wave controller.
* \return true if it is a bridge controller, false if not.
*/
bool IsBridgeController( uint32 const _homeId );
/**
* \brief Get the version of the Z-Wave API library used by a controller.
* \param _homeId The Home ID of the Z-Wave controller.
* \return a string containing the library version. For example, "Z-Wave 2.48".
*/
string GetLibraryVersion( uint32 const _homeId );
/**
* \brief Get a string containing the Z-Wave API library type used by a controller.
* The possible library types are:
* - Static Controller
* - Controller
* - Enhanced Slave
* - Slave
* - Installer
* - Routing Slave
* - Bridge Controller
* - Device Under Test
*
* The controller should never return a slave library type.
* For a more efficient test of whether a controller is a Bridge Controller, use
* the IsBridgeController method.
* \param _homeId The Home ID of the Z-Wave controller.
* \return a string containing the library type.
* \see GetLibraryVersion, IsBridgeController
*/
string GetLibraryTypeName( uint32 const _homeId );
/**
* \brief Get count of messages in the outgoing send queue.
* \param _homeId The Home ID of the Z-Wave controller.
* \return a integer message count
*/
int32 GetSendQueueCount( uint32 const _homeId );
/**
* \brief Send current driver statistics to the log file
* \param _homeId The Home ID of the Z-Wave controller.
*/
void LogDriverStatistics( uint32 const _homeId );
/**
* \brief Obtain controller interface type
* \param _homeId The Home ID of the Z-Wave controller.
*/
Driver::ControllerInterface GetControllerInterfaceType( uint32 const _homeId );
/**
* \brief Obtain controller interface path
* \param _homeId The Home ID of the Z-Wave controller.
*/
string GetControllerPath( uint32 const _homeId );
/*@}*/
private:
Driver* GetDriver( uint32 const _homeId ); /**< Get a pointer to a Driver object from the HomeID. Only to be used by OpenZWave. */
void SetDriverReady( Driver* _driver, bool success ); /**< Indicate that the Driver is ready to be used, and send the notification callback. */
OPENZWAVE_EXPORT_WARNINGS_OFF
list<Driver*> m_pendingDrivers; /**< Drivers that are in the process of reading saved data and querying their Z-Wave network for basic information. */
map<uint32,Driver*> m_readyDrivers; /**< Drivers that are ready to be used by the application. */
OPENZWAVE_EXPORT_WARNINGS_ON
//-----------------------------------------------------------------------------
// Polling Z-Wave devices
//-----------------------------------------------------------------------------
/** \name Polling Z-Wave devices
* Methods for controlling the polling of Z-Wave devices. Modern devices will not
* require polling. Some old devices need to be polled as the only way to detect
* status changes.
*/
/*@{*/
public:
/**
* \brief Get the time period between polls of a node's state.
*/
int32 GetPollInterval();
/**
* \brief Set the time period between polls of a node's state.
* Due to patent concerns, some devices do not report state changes automatically to the controller.
* These devices need to have their state polled at regular intervals. The length of the interval
* is the same for all devices. To even out the Z-Wave network traffic generated by polling, OpenZWave
* divides the polling interval by the number of devices that have polling enabled, and polls each
* in turn. It is recommended that if possible, the interval should not be set shorter than the
* number of polled devices in seconds (so that the network does not have to cope with more than one
* poll per second).
* \param _seconds The length of the polling interval in seconds.
*/
void SetPollInterval( int32 _milliseconds, bool _bIntervalBetweenPolls );
/**
* \brief Enable the polling of a device's state.
* \param _valueId The ID of the value to start polling.
* \param _intensity, number of polling for one polling interval.
* \return True if polling was enabled.
*/
bool EnablePoll( ValueID const &_valueId, uint8 const _intensity = 1 );
/**
* \brief Disable the polling of a device's state.
* \param _valueId The ID of the value to stop polling.
* \return True if polling was disabled.
*/
bool DisablePoll( ValueID const &_valueId );
/**
* \brief Determine the polling of a device's state.
* \param _valueId The ID of the value to check polling.
* \return True if polling is active.
*/
bool isPolled( ValueID const &_valueId );
/**
* \brief Set the frequency of polling (0=none, 1=every time through the list, 2-every other time, etc)
* \param _valueId The ID of the value whose intensity should be set
*/
void SetPollIntensity( ValueID const &_valueId, uint8 const _intensity );
/**
* \brief Get the polling intensity of a device's state.
* \param _valueId The ID of the value to check polling.
* \return Intensity, number of polling for one polling interval.
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found
*/
uint8 GetPollIntensity( ValueID const &_valueId );
/*@}*/
//-----------------------------------------------------------------------------
// Node information
//-----------------------------------------------------------------------------
/** \name Node information
* Methods for accessing information on indivdual nodes.
*/
/*@{*/
public:
/**
* \brief Trigger the fetching of fixed data about a node.
* Causes the node's data to be obtained from the Z-Wave network in the same way as if it had just been added.
* This method would normally be called automatically by OpenZWave, but if you know that a node has been
* changed, calling this method will force a refresh of all of the data held by the library. This can be especially
* useful for devices that were asleep when the application was first run. This is the
* same as the query state starting from the beginning.
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node to query.
* \return True if the request was sent successfully.
*/
bool RefreshNodeInfo( uint32 const _homeId, uint8 const _nodeId );
/**
* \brief Trigger the fetching of dynamic value data for a node.
* Causes the node's values to be requested from the Z-Wave network. This is the
* same as the query state starting from the associations state.
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node to query.
* \return True if the request was sent successfully.
*/
bool RequestNodeState( uint32 const _homeId, uint8 const _nodeId );
/**
* \brief Trigger the fetching of just the dynamic value data for a node.
* Causes the node's values to be requested from the Z-Wave network. This is the
* same as the query state starting from the dynamic state.
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node to query.
* \return True if the request was sent successfully.
*/
bool RequestNodeDynamic( uint32 const _homeId, uint8 const _nodeId );
/**
* \brief Get whether the node is a listening device that does not go to sleep
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node to query.
* \return True if it is a listening node.
*/
bool IsNodeListeningDevice( uint32 const _homeId, uint8 const _nodeId );
/**
* \brief Get whether the node is a frequent listening device that goes to sleep but
* can be woken up by a beam. Useful to determine node and controller consistency.
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node to query.
* \return True if it is a frequent listening node.
*/
bool IsNodeFrequentListeningDevice( uint32 const _homeId, uint8 const _nodeId );
/**
* \brief Get whether the node is a beam capable device.
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node to query.
* \return True if it is a beam capable node.
*/
bool IsNodeBeamingDevice( uint32 const _homeId, uint8 const _nodeId );
/**
* \brief Get whether the node is a routing device that passes messages to other nodes
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node to query.
* \return True if the node is a routing device
*/
bool IsNodeRoutingDevice( uint32 const _homeId, uint8 const _nodeId );
/**
* \brief Get the security attribute for a node. True if node supports security features.
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node to query.
* \return true if security features implemented.
*/
bool IsNodeSecurityDevice( uint32 const _homeId, uint8 const _nodeId );
/**
* \brief Get the maximum baud rate of a node's communications
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node to query.
* \return the baud rate in bits per second.
*/
uint32 GetNodeMaxBaudRate( uint32 const _homeId, uint8 const _nodeId );
/**
* \brief Get the version number of a node
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node to query.
* \return the node's version number
*/
uint8 GetNodeVersion( uint32 const _homeId, uint8 const _nodeId );
/**
* \brief Get the security byte of a node
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node to query.
* \return the node's security byte
*/
uint8 GetNodeSecurity( uint32 const _homeId, uint8 const _nodeId );
/**
* \brief Is this a ZWave+ Supported Node?
* \param _homeId the HomeID of the Z-Wave controller that managed the node.
* \param _nodeId the ID of the node to query.
* \return If this node is a Z-Wave Plus Node
*/
bool IsNodeZWavePlus( uint32 const _homeId, uint8 const _nodeId );
/**
* \brief Get the basic type of a node.
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node to query.
* \return the node's basic type.
*/
uint8 GetNodeBasic( uint32 const _homeId, uint8 const _nodeId );
/**
* \brief Get the generic type of a node.
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node to query.
* \return the node's generic type.
*/
uint8 GetNodeGeneric( uint32 const _homeId, uint8 const _nodeId );
/**
* \brief Get the specific type of a node.
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node to query.
* \return the node's specific type.
*/
uint8 GetNodeSpecific( uint32 const _homeId, uint8 const _nodeId );
/**
* \brief Get a human-readable label describing the node
* The label is taken from the Z-Wave specific, generic or basic type, depending on which of those values are specified by the node.
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node to query.
* \return A string containing the label text.
*/
string GetNodeType( uint32 const _homeId, uint8 const _nodeId );
/**
* \brief Get the bitmap of this node's neighbors
*
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node to query.
* \param _nodeNeighbors An array of 29 uint8s to hold the neighbor bitmap
*/
uint32 GetNodeNeighbors( uint32 const _homeId, uint8 const _nodeId, uint8** _nodeNeighbors );
/**
* \brief Get the manufacturer name of a device
* The manufacturer name would normally be handled by the Manufacturer Specific commmand class,
* taking the manufacturer ID reported by the device and using it to look up the name from the
* manufacturer_specific.xml file in the OpenZWave config folder.
* However, there are some devices that do not support the command class, so to enable the user
* to manually set the name, it is stored with the node data and accessed via this method rather
* than being reported via a command class Value object.
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node to query.
* \return A string containing the node's manufacturer name.
* \see SetNodeManufacturerName, GetNodeProductName, SetNodeProductName
*/
string GetNodeManufacturerName( uint32 const _homeId, uint8 const _nodeId );
/**
* \brief Get the product name of a device
* The product name would normally be handled by the Manufacturer Specific commmand class,
* taking the product Type and ID reported by the device and using it to look up the name from the
* manufacturer_specific.xml file in the OpenZWave config folder.
* However, there are some devices that do not support the command class, so to enable the user
* to manually set the name, it is stored with the node data and accessed via this method rather
* than being reported via a command class Value object.
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node to query.
* \return A string containing the node's product name.
* \see SetNodeProductName, GetNodeManufacturerName, SetNodeManufacturerName
*/
string GetNodeProductName( uint32 const _homeId, uint8 const _nodeId );
/**
* \brief Get the name of a node
* The node name is a user-editable label for the node that would normally be handled by the
* Node Naming commmand class, but many devices do not support it. So that a node can always
* be named, OpenZWave stores it with the node data, and provides access through this method
* and SetNodeName, rather than reporting it via a command class Value object.
* The maximum length of a node name is 16 characters.
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node to query.
* \return A string containing the node's name.
* \see SetNodeName, GetNodeLocation, SetNodeLocation
*/
string GetNodeName( uint32 const _homeId, uint8 const _nodeId );
/**
* \brief Get the location of a node
* The node location is a user-editable string that would normally be handled by the Node Naming
* commmand class, but many devices do not support it. So that a node can always report its
* location, OpenZWave stores it with the node data, and provides access through this method
* and SetNodeLocation, rather than reporting it via a command class Value object.
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node to query.
* \return A string containing the node's location.
* \see SetNodeLocation, GetNodeName, SetNodeName
*/
string GetNodeLocation( uint32 const _homeId, uint8 const _nodeId );
/**
* \brief Get the manufacturer ID of a device
* The manufacturer ID is a four digit hex code and would normally be handled by the Manufacturer
* Specific commmand class, but not all devices support it. Although the value reported by this
* method will be an empty string if the command class is not supported and cannot be set by the
* user, the manufacturer ID is still stored with the node data (rather than being reported via a
* command class Value object) to retain a consistent approach with the other manufacturer specific data.
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node to query.
* \return A string containing the node's manufacturer ID, or an empty string if the manufactuer
* specific command class is not supported by the device.
* \see GetNodeProductType, GetNodeProductId, GetNodeManufacturerName, GetNodeProductName
* \todo Change the return to uint16 in 2.0 timeframe
*/
string GetNodeManufacturerId( uint32 const _homeId, uint8 const _nodeId );
/**
* \brief Get the product type of a device
* The product type is a four digit hex code and would normally be handled by the Manufacturer Specific
* commmand class, but not all devices support it. Although the value reported by this method will
* be an empty string if the command class is not supported and cannot be set by the user, the product
* type is still stored with the node data (rather than being reported via a command class Value object)
* to retain a consistent approach with the other manufacturer specific data.
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node to query.
* \return A string containing the node's product type, or an empty string if the manufactuer
* specific command class is not supported by the device.
* \see GetNodeManufacturerId, GetNodeProductId, GetNodeManufacturerName, GetNodeProductName
* \todo Change the return to uint16 in 2.0 timeframe
*/
string GetNodeProductType( uint32 const _homeId, uint8 const _nodeId );
/**
* \brief Get the product ID of a device
* The product ID is a four digit hex code and would normally be handled by the Manufacturer Specific
* commmand class, but not all devices support it. Although the value reported by this method will
* be an empty string if the command class is not supported and cannot be set by the user, the product
* ID is still stored with the node data (rather than being reported via a command class Value object)
* to retain a consistent approach with the other manufacturer specific data.
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node to query.
* \return A string containing the node's product ID, or an empty string if the manufactuer
* specific command class is not supported by the device.
* \see GetNodeManufacturerId, GetNodeProductType, GetNodeManufacturerName, GetNodeProductName
* \todo Change the return to uint16 in 2.0 timeframe
*/
string GetNodeProductId( uint32 const _homeId, uint8 const _nodeId );
/**
* \brief Set the manufacturer name of a device
* The manufacturer name would normally be handled by the Manufacturer Specific commmand class,
* taking the manufacturer ID reported by the device and using it to look up the name from the
* manufacturer_specific.xml file in the OpenZWave config folder.
* However, there are some devices that do not support the command class, so to enable the user
* to manually set the name, it is stored with the node data and accessed via this method rather
* than being reported via a command class Value object.
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node to query.
* \param _manufacturerName A string containing the node's manufacturer name.
* \see GetNodeManufacturerName, GetNodeProductName, SetNodeProductName
*/
void SetNodeManufacturerName( uint32 const _homeId, uint8 const _nodeId, string const& _manufacturerName );
/**
* \brief Set the product name of a device
* The product name would normally be handled by the Manufacturer Specific commmand class,
* taking the product Type and ID reported by the device and using it to look up the name from the
* manufacturer_specific.xml file in the OpenZWave config folder.
* However, there are some devices that do not support the command class, so to enable the user
* to manually set the name, it is stored with the node data and accessed via this method rather
* than being reported via a command class Value object.
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node to query.
* \param _productName A string containing the node's product name.
* \see GetNodeProductName, GetNodeManufacturerName, SetNodeManufacturerName
*/
void SetNodeProductName( uint32 const _homeId, uint8 const _nodeId, string const& _productName );
/**
* \brief Set the name of a node
* The node name is a user-editable label for the node that would normally be handled by the
* Node Naming commmand class, but many devices do not support it. So that a node can always
* be named, OpenZWave stores it with the node data, and provides access through this method
* and GetNodeName, rather than reporting it via a command class Value object.
* If the device does support the Node Naming command class, the new name will be sent to the node.
* The maximum length of a node name is 16 characters.
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node to query.
* \param _nodeName A string containing the node's name.
* \see GetNodeName, GetNodeLocation, SetNodeLocation
*/
void SetNodeName( uint32 const _homeId, uint8 const _nodeId, string const& _nodeName );
/**
* \brief Set the location of a node
* The node location is a user-editable string that would normally be handled by the Node Naming
* commmand class, but many devices do not support it. So that a node can always report its
* location, OpenZWave stores it with the node data, and provides access through this method
* and GetNodeLocation, rather than reporting it via a command class Value object.
* If the device does support the Node Naming command class, the new location will be sent to the node.
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node to query.
* \param _location A string containing the node's location.
* \see GetNodeLocation, GetNodeName, SetNodeName
*/
void SetNodeLocation( uint32 const _homeId, uint8 const _nodeId, string const& _location );
/**
* \brief Turns a node on
* This is a helper method to simplify basic control of a node. It is the equivalent of
* changing the level reported by the node's Basic command class to 255, and will generate a
* ValueChanged notification from that class. This command will turn on the device at its
* last known level, if supported by the device, otherwise it will turn it on at 100%.
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node to be changed.
* \see SetNodeOff, SetNodeLevel
*/
void SetNodeOn( uint32 const _homeId, uint8 const _nodeId );
/**
* \brief Turns a node off
* This is a helper method to simplify basic control of a node. It is the equivalent of
* changing the level reported by the node's Basic command class to zero, and will generate
* a ValueChanged notification from that class.
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node to be changed.
* \see SetNodeOn, SetNodeLevel
*/
void SetNodeOff( uint32 const _homeId, uint8 const _nodeId );
/**
* \brief Sets the basic level of a node
* This is a helper method to simplify basic control of a node. It is the equivalent of
* changing the value reported by the node's Basic command class and will generate a
* ValueChanged notification from that class.
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node to be changed.
* \param _level The level to set the node. Valid values are 0-99 and 255. Zero is off and
* 99 is fully on. 255 will turn on the device at its last known level (if supported).
* \see SetNodeOn, SetNodeOff
*/
void SetNodeLevel( uint32 const _homeId, uint8 const _nodeId, uint8 const _level );
/**
* \brief Get whether the node information has been received
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node to query.
* \return True if the node information has been received yet
*/
bool IsNodeInfoReceived( uint32 const _homeId, uint8 const _nodeId );
/**
* \brief Get whether the node has the defined class available or not
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node to query.
* \param _commandClassId Id of the class to test for
* \return True if the node does have the class instantiated, will return name & version
*/
bool GetNodeClassInformation( uint32 const _homeId, uint8 const _nodeId, uint8 const _commandClassId,
string *_className = NULL, uint8 *_classVersion = NULL);
/**
* \brief Get whether the node is awake or asleep
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node to query.
* \return True if the node is awake
*/
bool IsNodeAwake( uint32 const _homeId, uint8 const _nodeId );
/**
* \brief Get whether the node is working or has failed
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node to query.
* \return True if the node has failed and is no longer part of the network
*/
bool IsNodeFailed( uint32 const _homeId, uint8 const _nodeId );
/**
* \brief Get whether the node's query stage as a string
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node to query.
* \return name of current query stage as a string.
*/
string GetNodeQueryStage( uint32 const _homeId, uint8 const _nodeId );
/**
* \brief Get the node device type as reported in the Z-Wave+ Info report.
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node to query.
* \return the node's DeviceType
*/
uint16 GetNodeDeviceType( uint32 const _homeId, uint8 const _nodeId );
/**
* \brief Get the node device type as reported in the Z-Wave+ Info report.
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node to query.
* \return the node's Device Type as a string.
*/
string GetNodeDeviceTypeString( uint32 const _homeId, uint8 const _nodeId );
/**
* \brief Get the node role as reported in the Z-Wave+ Info report.
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node to query.
* \return the node's user icon.
*/
uint8 GetNodeRole( uint32 const _homeId, uint8 const _nodeId );
/**
* \brief Get the node role as reported in the Z-Wave+ Info report.
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node to query.
* \return the node's role type as a string
*/
string GetNodeRoleString( uint32 const _homeId, uint8 const _nodeId );
/**
* \brief Get the node PlusType as reported in the Z-Wave+ Info report.
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node to query.
* \return the node's PlusType
*/
uint8 GetNodePlusType( uint32 const _homeId, uint8 const _nodeId );
/**
* \brief Get the node PlusType as reported in the Z-Wave+ Info report.
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node to query.
* \return the node's PlusType as a string
*/
string GetNodePlusTypeString ( uint32 const _homeId, uint8 const _nodeId );
/*@}*/
//-----------------------------------------------------------------------------
// Values
//-----------------------------------------------------------------------------
/** \name Values
* Methods for accessing device values. All the methods require a ValueID, which will have been provided
* in the ValueAdded Notification callback when the the value was first discovered by OpenZWave.
*/
/*@{*/
public:
/**
* \brief Gets the user-friendly label for the value.
* \param _id The unique identifier of the value.
* \return The value label.
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found
* \see ValueID
*/
string GetValueLabel( ValueID const& _id );
/**
* \brief Sets the user-friendly label for the value.
* \param _id The unique identifier of the value.
* \param _value The new value of the label.
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found
* \see ValueID
*/
void SetValueLabel( ValueID const& _id, string const& _value );
/**
* \brief Gets the units that the value is measured in.
* \param _id The unique identifier of the value.
* \return The value units.
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found
* \see ValueID
*/
string GetValueUnits( ValueID const& _id );
/**
* \brief Sets the units that the value is measured in.
* \param _id The unique identifier of the value.
* \param _value The new value of the units.
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found
* \see ValueID
*/
void SetValueUnits( ValueID const& _id, string const& _value );
/**
* \brief Gets a help string describing the value's purpose and usage.
* \param _id The unique identifier of the value.
* \return The value help text.
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found
* \see ValueID
*/
string GetValueHelp( ValueID const& _id );
/**
* \brief Sets a help string describing the value's purpose and usage.
* \param _id The unique identifier of the value.
* \param _value The new value of the help text.
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found
* \see ValueID
*/
void SetValueHelp( ValueID const& _id, string const& _value );
/**
* \brief Gets the minimum that this value may contain.
* \param _id The unique identifier of the value.
* \return The value minimum.
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found
* \see ValueID
*/
int32 GetValueMin( ValueID const& _id );
/**
* \brief Gets the maximum that this value may contain.
* \param _id The unique identifier of the value.
* \return The value maximum.
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found
* \see ValueID
*/
int32 GetValueMax( ValueID const& _id );
/**
* \brief Test whether the value is read-only.
* \param _id The unique identifier of the value.
* \return true if the value cannot be changed by the user.
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found
* \see ValueID
*/
bool IsValueReadOnly( ValueID const& _id );
/**
* \brief Test whether the value is write-only.
* \param _id The unique identifier of the value.
* \return true if the value can only be written to and not read.
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found
* \see ValueID
*/
bool IsValueWriteOnly( ValueID const& _id );
/**
* \brief Test whether the value has been set.
* \param _id The unique identifier of the value.
* \return true if the value has actually been set by a status message from the device, rather than simply being the default.
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found
* \see ValueID
*/
bool IsValueSet( ValueID const& _id );
/**
* \brief Test whether the value is currently being polled.
* \param _id The unique identifier of the value.
* \return true if the value is being polled, otherwise false.
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found
* \see ValueID
*/
bool IsValuePolled( ValueID const& _id );
/**
* \brief Gets a value as a bool.
* \param _id The unique identifier of the value.
* \param o_value Pointer to a bool that will be filled with the value.
* \return true if the value was obtained. Returns false if the value is not a ValueID::ValueType_Bool. The type can be tested with a call to ValueID::GetType.
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid
* \throws OZWException with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found
* \see ValueID::GetType, GetValueAsByte, GetValueAsFloat, GetValueAsInt, GetValueAsShort, GetValueAsString, GetValueListSelection, GetValueListItems, GetValueAsRaw
*/
bool GetValueAsBool( ValueID const& _id, bool* o_value );
/**
* \brief Gets a value as an 8-bit unsigned integer.
* \param _id The unique identifier of the value.
* \param o_value Pointer to a uint8 that will be filled with the value.
* \return true if the value was obtained. Returns false if the value is not a ValueID::ValueType_Byte. The type can be tested with a call to ValueID::GetType
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid
* \throws OZWException with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found
* \see ValueID::GetType, GetValueAsBool, GetValueAsFloat, GetValueAsInt, GetValueAsShort, GetValueAsString, GetValueListSelection, GetValueListItems, GetValueAsRaw
*/
bool GetValueAsByte( ValueID const& _id, uint8* o_value );
/**
* \brief Gets a value as a float.
* \param _id The unique identifier of the value.
* \param o_value Pointer to a float that will be filled with the value.
* \return true if the value was obtained. Returns false if the value is not a ValueID::ValueType_Decimal. The type can be tested with a call to ValueID::GetType
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid
* \throws OZWException with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found
* \see ValueID::GetType, GetValueAsBool, GetValueAsByte, GetValueAsInt, GetValueAsShort, GetValueAsString, GetValueListSelection, GetValueListItems, GetValueAsRaw
*/
bool GetValueAsFloat( ValueID const& _id, float* o_value );
/**
* \brief Gets a value as a 32-bit signed integer.
* \param _id The unique identifier of the value.
* \param o_value Pointer to an int32 that will be filled with the value.
* \return true if the value was obtained. Returns false if the value is not a ValueID::ValueType_Int. The type can be tested with a call to ValueID::GetType
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid
* \throws OZWException with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found
* \see ValueID::GetType, GetValueAsBool, GetValueAsByte, GetValueAsFloat, GetValueAsShort, GetValueAsString, GetValueListSelection, GetValueListItems, GetValueAsRaw
*/
bool GetValueAsInt( ValueID const& _id, int32* o_value );
/**
* \brief Gets a value as a 16-bit signed integer.
* \param _id The unique identifier of the value.
* \param o_value Pointer to an int16 that will be filled with the value.
* \return true if the value was obtained. Returns false if the value is not a ValueID::ValueType_Short. The type can be tested with a call to ValueID::GetType.
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid
* \throws OZWException with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found
* \see ValueID::GetType, GetValueAsBool, GetValueAsByte, GetValueAsFloat, GetValueAsInt, GetValueAsString, GetValueListSelection, GetValueListItems, GetValueAsRaw
*/
bool GetValueAsShort( ValueID const& _id, int16* o_value );
/**
* \brief Gets a value as a string.
* Creates a string representation of a value, regardless of type.
* \param _id The unique identifier of the value.
* \param o_value Pointer to a string that will be filled with the value.
* \return true if the value was obtained.
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid
* \throws OZWException with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found
* \see ValueID::GetType, GetValueAsBool, GetValueAsByte, GetValueAsFloat, GetValueAsInt, GetValueAsShort, GetValueListSelection, GetValueListItems, GetValueAsRaw
*/
bool GetValueAsString( ValueID const& _id, string* o_value );
/**
* \brief Gets a value as a collection of bytes.
* \param _id The unique identifier of the value.
* \param o_value Pointer to a uint8* that will be filled with the value. This return value will need to be freed as it was dynamically allocated.
* \param o_length Pointer to a uint8 that will be fill with the data length.
* \return true if the value was obtained. Returns false if the value is not a ValueID::ValueType_Raw. The type can be tested with a call to ValueID::GetType.
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid
* \throws OZWException with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found
* \see ValueID::GetType, GetValueAsBool, GetValueAsByte, GetValueAsFloat, GetValueAsInt, GetValueAsShort, GetValueListSelection, GetValueListItems, GetValueAsRaw
*/
bool GetValueAsRaw( ValueID const& _id, uint8** o_value, uint8* o_length );
/**
* \brief Gets the selected item from a list (as a string).
* \param _id The unique identifier of the value.
* \param o_value Pointer to a string that will be filled with the selected item.
* \return True if the value was obtained. Returns false if the value is not a ValueID::ValueType_List. The type can be tested with a call to ValueID::GetType.
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid
* \throws OZWException with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found
* \see ValueID::GetType, GetValueAsBool, GetValueAsByte, GetValueAsFloat, GetValueAsInt, GetValueAsShort, GetValueAsString, GetValueListItems, GetValueAsRaw
*/
bool GetValueListSelection( ValueID const& _id, string* o_value );
/**
* \brief Gets the selected item from a list (as an integer).
* \param _id The unique identifier of the value.
* \param o_value Pointer to an integer that will be filled with the selected item.
* \return True if the value was obtained. Returns false if the value is not a ValueID::ValueType_List. The type can be tested with a call to ValueID::GetType.
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid
* \throws OZWException with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found
* \see ValueID::GetType, GetValueAsBool, GetValueAsByte, GetValueAsFloat, GetValueAsInt, GetValueAsShort, GetValueAsString, GetValueListItems, GetValueAsRaw
*/
bool GetValueListSelection( ValueID const& _id, int32* o_value );
/**
* \brief Gets the list of items from a list value.
* \param _id The unique identifier of the value.
* \param o_value Pointer to a vector of strings that will be filled with list items. The vector will be cleared before the items are added.
* \return true if the list items were obtained. Returns false if the value is not a ValueID::ValueType_List. The type can be tested with a call to ValueID::GetType.
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid
* \throws OZWException with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found
* \see ValueID::GetType, GetValueAsBool, GetValueAsByte, GetValueAsFloat, GetValueAsInt, GetValueAsShort, GetValueAsString, GetValueListSelection, GetValueAsRaw
*/
bool GetValueListItems( ValueID const& _id, vector<string>* o_value );
/**
* \brief Gets the list of values from a list value.
* \param _id The unique identifier of the value.
* \param o_value Pointer to a vector of integers that will be filled with list items. The vector will be cleared before the items are added.
* \return true if the list values were obtained. Returns false if the value is not a ValueID::ValueType_List. The type can be tested with a call to ValueID::GetType.
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid
* \throws OZWException with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found
* \see ValueID::GetType, GetValueAsBool, GetValueAsByte, GetValueAsFloat, GetValueAsInt, GetValueAsShort, GetValueAsString, GetValueListSelection, GetValueAsRaw
*/
bool GetValueListValues( ValueID const& _id, vector<int32>* o_value );
/**
* \brief Gets a float value's precision.
* \param _id The unique identifier of the value.
* \param o_value Pointer to a uint8 that will be filled with the precision value.
* \return true if the value was obtained. Returns false if the value is not a ValueID::ValueType_Decimal. The type can be tested with a call to ValueID::GetType
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid
* \throws OZWException with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found
* \see ValueID::GetType, GetValueAsBool, GetValueAsByte, GetValueAsInt, GetValueAsShort, GetValueAsString, GetValueListSelection, GetValueListItems
*/
bool GetValueFloatPrecision( ValueID const& _id, uint8* o_value );
/**
* \brief Sets the state of a bool.
* Due to the possibility of a device being asleep, the command is assumed to suceed, and the value
* held by the node is updated directly. This will be reverted by a future status message from the device
* if the Z-Wave message actually failed to get through. Notification callbacks will be sent in both cases.
* \param _id The unique identifier of the bool value.
* \param _value The new value of the bool.
* \return true if the value was set. Returns false if the value is not a ValueID::ValueType_Bool. The type can be tested with a call to ValueID::GetType.
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid
* \throws OZWException with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found
*
*/
bool SetValue( ValueID const& _id, bool const _value );
/**
* \brief Sets the value of a byte.
* Due to the possibility of a device being asleep, the command is assumed to suceed, and the value
* held by the node is updated directly. This will be reverted by a future status message from the device
* if the Z-Wave message actually failed to get through. Notification callbacks will be sent in both cases.
* \param _id The unique identifier of the byte value.
* \param _value The new value of the byte.
* \return true if the value was set. Returns false if the value is not a ValueID::ValueType_Byte. The type can be tested with a call to ValueID::GetType.
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid
* \throws OZWException with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found
*/
bool SetValue( ValueID const& _id, uint8 const _value );
/**
* \brief Sets the value of a decimal.
* It is usually better to handle decimal values using strings rather than floats, to avoid floating point accuracy issues.
* Due to the possibility of a device being asleep, the command is assumed to succeed, and the value
* held by the node is updated directly. This will be reverted by a future status message from the device
* if the Z-Wave message actually failed to get through. Notification callbacks will be sent in both cases.
* \param _id The unique identifier of the decimal value.
* \param _value The new value of the decimal.
* \return true if the value was set. Returns false if the value is not a ValueID::ValueType_Decimal. The type can be tested with a call to ValueID::GetType.
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid
* \throws OZWException with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found
*/
bool SetValue( ValueID const& _id, float const _value );
/**
* \brief Sets the value of a 32-bit signed integer.
* Due to the possibility of a device being asleep, the command is assumed to suceed, and the value
* held by the node is updated directly. This will be reverted by a future status message from the device
* if the Z-Wave message actually failed to get through. Notification callbacks will be sent in both cases.
* \param _id The unique identifier of the integer value.
* \param _value The new value of the integer.
* \return true if the value was set. Returns false if the value is not a ValueID::ValueType_Int. The type can be tested with a call to ValueID::GetType.
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid
* \throws OZWException with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found
*/
bool SetValue( ValueID const& _id, int32 const _value );
/**
* \brief Sets the value of a 16-bit signed integer.
* Due to the possibility of a device being asleep, the command is assumed to suceed, and the value
* held by the node is updated directly. This will be reverted by a future status message from the device
* if the Z-Wave message actually failed to get through. Notification callbacks will be sent in both cases.
* \param _id The unique identifier of the integer value.
* \param _value The new value of the integer.
* \return true if the value was set. Returns false if the value is not a ValueID::ValueType_Short. The type can be tested with a call to ValueID::GetType.
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid
* \throws OZWException with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found
*/
bool SetValue( ValueID const& _id, int16 const _value );
/**
* \brief Sets the value of a collection of bytes.
* Due to the possibility of a device being asleep, the command is assumed to suceed, and the value
* held by the node is updated directly. This will be reverted by a future status message from the device
* if the Z-Wave message actually failed to get through. Notification callbacks will be sent in both cases.
* \param _id The unique identifier of the raw value.
* \param _value The new collection of bytes.
* \return true if the value was set. Returns false if the value is not a ValueID::ValueType_Raw. The type can be tested with a call to ValueID::GetType.
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid
* \throws OZWException with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found
*/
bool SetValue( ValueID const& _id, uint8 const* _value, uint8 const _length );
/**
* \brief Sets the value from a string, regardless of type.
* Due to the possibility of a device being asleep, the command is assumed to suceed, and the value
* held by the node is updated directly. This will be reverted by a future status message from the device
* if the Z-Wave message actually failed to get through. Notification callbacks will be sent in both cases.
* \param _id The unique identifier of the integer value.
* \param _value The new value of the string.
* \return true if the value was set. Returns false if the value could not be parsed into the correct type for the value.
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid
* \throws OZWException with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found
*/
bool SetValue( ValueID const& _id, string const& _value );
/**
* \brief Sets the selected item in a list.
* Due to the possibility of a device being asleep, the command is assumed to suceed, and the value
* held by the node is updated directly. This will be reverted by a future status message from the device
* if the Z-Wave message actually failed to get through. Notification callbacks will be sent in both cases.
* \param _id The unique identifier of the list value.
* \param _selectedItem A string matching the new selected item in the list.
* \return true if the value was set. Returns false if the selection is not in the list, or if the value is not a ValueID::ValueType_List.
* The type can be tested with a call to ValueID::GetType
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid
* \throws OZWException with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found
*/
bool SetValueListSelection( ValueID const& _id, string const& _selectedItem );
/**
* \brief Refreshes the specified value from the Z-Wave network.
* A call to this function causes the library to send a message to the network to retrieve the current value
* of the specified ValueID (just like a poll, except only one-time, not recurring).
* \param _id The unique identifier of the value to be refreshed.
* \return true if the driver and node were found; false otherwise
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found
*/
bool RefreshValue( ValueID const& _id);
/**
* \brief Sets a flag indicating whether value changes noted upon a refresh should be verified. If so, the
* library will immediately refresh the value a second time whenever a change is observed. This helps to filter
* out spurious data reported occasionally by some devices.
* \param _id The unique identifier of the value whose changes should or should not be verified.
* \param _verify if true, verify changes; if false, don't verify changes.
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found
* \sa Manager::GetChangeVerified
*/
void SetChangeVerified( ValueID const& _id, bool _verify );
/**
* \brief determine if value changes upon a refresh should be verified. If so, the
* library will immediately refresh the value a second time whenever a change is observed. This helps to filter
* out spurious data reported occasionally by some devices.
* \param _id The unique identifier of the value whose changes should or should not be verified.
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found
* \sa Manager::SetChangeVerified
*/
bool GetChangeVerified( ValueID const& _id );
/**
* \brief Starts an activity in a device.
* Since buttons are write-only values that do not report a state, no notification callbacks are sent.
* \param _id The unique identifier of the integer value.
* \return true if the activity was started. Returns false if the value is not a ValueID::ValueType_Button. The type can be tested with a call to ValueID::GetType.
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid
* \throws OZWException with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found
*/
bool PressButton( ValueID const& _id );
/**
* \brief Stops an activity in a device.
* Since buttons are write-only values that do not report a state, no notification callbacks are sent.
* \param _id The unique identifier of the integer value.
* \return true if the activity was stopped. Returns false if the value is not a ValueID::ValueType_Button. The type can be tested with a call to ValueID::GetType.
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid
* \throws OZWException with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found
*/
bool ReleaseButton( ValueID const& _id );
/*@}*/
//-----------------------------------------------------------------------------
// Climate Control Schedules
//-----------------------------------------------------------------------------
/** \name Climate Control Schedules
* Methods for accessing schedule values. All the methods require a ValueID, which will have been provided
* in the ValueAdded Notification callback when the the value was first discovered by OpenZWave.
* <p>The ValueType_Schedule is a specialized Value used to simplify access to the switch point schedule
* information held by a setback thermostat that supports the Climate Control Schedule command class.
* Each schedule contains up to nine switch points for a single day, consisting of a time in
* hours and minutes (24 hour clock) and a setback in tenths of a degree Celsius. The setback value can
* range from -128 (-12.8C) to 120 (12.0C). There are two special setback values - 121 is used to set
* Frost Protection mode, and 122 is used to set Energy Saving mode.
* <p>The switch point methods only modify OpenZWave's copy of the schedule information. Once all changes
* have been made, they are sent to the device by calling SetSchedule.
*/
/*@{*/
/**
* \brief Get the number of switch points defined in a schedule.
* \param _id The unique identifier of the schedule value.
* \return the number of switch points defined in this schedule. Returns zero if the value is not a ValueID::ValueType_Schedule. The type can be tested with a call to ValueID::GetType.
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid
* \throws OZWException with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found
*/
uint8 GetNumSwitchPoints( ValueID const& _id );
/**
* \brief Set a switch point in the schedule.
* Inserts a new switch point into the schedule, unless a switch point already exists at the specified
* time in which case that switch point is updated with the new setback value instead.
* A maximum of nine switch points can be set in the schedule.
* \param _id The unique identifier of the schedule value.
* \param _hours The hours part of the time when the switch point will trigger. The time is set using
* the 24-hour clock, so this value must be between 0 and 23.
* \param _minutes The minutes part of the time when the switch point will trigger. This value must be
* between 0 and 59.
* \param _setback The setback in tenths of a degree Celsius. The setback value can range from -128 (-12.8C)
* to 120 (12.0C). There are two special setback values - 121 is used to set Frost Protection mode, and
* 122 is used to set Energy Saving mode.
* \return true if successful. Returns false if the value is not a ValueID::ValueType_Schedule. The type can be tested with a call to ValueID::GetType.
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid
* \throws OZWException with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found
* \see GetNumSwitchPoints, RemoveSwitchPoint, ClearSwitchPoints
*/
bool SetSwitchPoint( ValueID const& _id, uint8 const _hours, uint8 const _minutes, int8 const _setback );
/**
* \brief Remove a switch point from the schedule.
* Removes the switch point at the specified time from the schedule.
* \param _id The unique identifier of the schedule value.
* \param _hours The hours part of the time when the switch point will trigger. The time is set using
* the 24-hour clock, so this value must be between 0 and 23.
* \param _minutes The minutes part of the time when the switch point will trigger. This value must be
* between 0 and 59.
* \return true if successful. Returns false if the value is not a ValueID::ValueType_Schedule or if there
* is not switch point with the specified time values. The type can be tested with a call to ValueID::GetType.
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid
* \throws OZWException with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found
* \see GetNumSwitchPoints, SetSwitchPoint, ClearSwitchPoints
*/
bool RemoveSwitchPoint( ValueID const& _id, uint8 const _hours, uint8 const _minutes );
/**
* \brief Clears all switch points from the schedule.
* \param _id The unique identifier of the schedule value.
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid
* \throws OZWException with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found
* \see GetNumSwitchPoints, SetSwitchPoint, RemoveSwitchPoint
*/
void ClearSwitchPoints( ValueID const& _id );
/**
* \brief Gets switch point data from the schedule.
* Retrieves the time and setback values from a switch point in the schedule.
* \param _id The unique identifier of the schedule value.
* \param _idx The index of the switch point, between zero and one less than the value
* returned by GetNumSwitchPoints.
* \param o_hours a pointer to a uint8 that will be filled with the hours part of the switch point data.
* \param o_minutes a pointer to a uint8 that will be filled with the minutes part of the switch point data.
* \param o_setback a pointer to an int8 that will be filled with the setback value. This can range from -128
* (-12.8C)to 120 (12.0C). There are two special setback values - 121 is used to set Frost Protection mode, and
* 122 is used to set Energy Saving mode.
* \return true if successful. Returns false if the value is not a ValueID::ValueType_Schedule. The type can be tested with a call to ValueID::GetType.
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_VALUEID if the ValueID is invalid
* \throws OZWException with Type OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID if the Actual Value is off a different type
* \throws OZWException with Type OZWException::OZWEXCEPTION_INVALID_HOMEID if the Driver cannot be found
* \see GetNumSwitchPoints
*/
bool GetSwitchPoint( ValueID const& _id, uint8 const _idx, uint8* o_hours, uint8* o_minutes, int8* o_setback );
/*@}*/
//-----------------------------------------------------------------------------
// SwitchAll
//-----------------------------------------------------------------------------
/** \name SwitchAll
* Methods for switching all devices on or off together. The devices must support
* the SwitchAll command class. The command is first broadcast to all nodes, and
* then followed up with individual commands to each node (because broadcasts are
* not routed, the message might not otherwise reach all the nodes).
*/
/*@{*/
/**
* \brief Switch all devices on.
* All devices that support the SwitchAll command class will be turned on.
*/
void SwitchAllOn( uint32 const _homeId );
/**
* \brief Switch all devices off.
* All devices that support the SwitchAll command class will be turned off.
*/
void SwitchAllOff( uint32 const _homeId );
/*@}*/
//-----------------------------------------------------------------------------
// Configuration Parameters
//-----------------------------------------------------------------------------
/** \name Configuration Parameters
* Methods for accessing device configuration parameters.
* Configuration parameters are values that are managed by the Configuration command class.
* The values are device-specific and are not reported by the devices. Information on parameters
* is provided only in the device user manual.
* <p>An ongoing task for the OpenZWave project is to create XML files describing the available
* parameters for every Z-Wave. See the config folder in the project source code for examples.
*/
/*@{*/
public:
/**
* \brief Set the value of a configurable parameter in a device.
* Some devices have various parameters that can be configured to control the device behaviour.
* These are not reported by the device over the Z-Wave network, but can usually be found in
* the device's user manual.
* This method returns immediately, without waiting for confirmation from the device that the
* change has been made.
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node to configure.
* \param _param The index of the parameter.
* \param _value The value to which the parameter should be set.
* \param _size Is an optional number of bytes to be sent for the paramter _value. Defaults to 2.
* \return true if the a message setting the value was sent to the device.
* \see RequestConfigParam
*/
bool SetConfigParam( uint32 const _homeId, uint8 const _nodeId, uint8 const _param, int32 _value, uint8 const _size = 2 );
/**
* \brief Request the value of a configurable parameter from a device.
* Some devices have various parameters that can be configured to control the device behaviour.
* These are not reported by the device over the Z-Wave network, but can usually be found in
* the device's user manual.
* This method requests the value of a parameter from the device, and then returns immediately,
* without waiting for a response. If the parameter index is valid for this device, and the
* device is awake, the value will eventually be reported via a ValueChanged notification callback.
* The ValueID reported in the callback will have an index set the same as _param and a command class
* set to the same value as returned by a call to Configuration::StaticGetCommandClassId.
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node to configure.
* \param _param The index of the parameter.
* \see SetConfigParam, ValueID, Notification
*/
void RequestConfigParam( uint32 const _homeId, uint8 const _nodeId, uint8 const _param );
/**
* \brief Request the values of all known configurable parameters from a device.
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node to configure.
* \see SetConfigParam, ValueID, Notification
*/
void RequestAllConfigParams( uint32 const _homeId, uint8 const _nodeId );
/*@}*/
//-----------------------------------------------------------------------------
// Groups (wrappers for the Node methods)
//-----------------------------------------------------------------------------
/** \name Groups
* Methods for accessing device association groups.
*/
/*@{*/
public:
/**
* \brief Gets the number of association groups reported by this node
* In Z-Wave, groups are numbered starting from one. For example, if a call to GetNumGroups returns 4, the _groupIdx
* value to use in calls to GetAssociations, AddAssociation and RemoveAssociation will be a number between 1 and 4.
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node whose groups we are interested in.
* \return The number of groups.
* \see GetAssociations, GetMaxAssociations, AddAssociation, RemoveAssociation
*/
uint8 GetNumGroups( uint32 const _homeId, uint8 const _nodeId );
/**
* \brief Gets the associations for a group.
* Makes a copy of the list of associated nodes in the group, and returns it in an array of uint8's.
* The caller is responsible for freeing the array memory with a call to delete [].
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node whose associations we are interested in.
* \param _groupIdx One-based index of the group (because Z-Wave product manuals use one-based group numbering).
* \param o_associations If the number of associations returned is greater than zero, o_associations will be set to point to an array containing the IDs of the associated nodes.
* \return The number of nodes in the associations array. If zero, the array will point to NULL, and does not need to be deleted.
* \see GetNumGroups, AddAssociation, RemoveAssociation, GetMaxAssociations
*/
uint32 GetAssociations( uint32 const _homeId, uint8 const _nodeId, uint8 const _groupIdx, uint8** o_associations );
/**
* \brief Gets the associations for a group.
* Makes a copy of the list of associated nodes in the group, and returns it in an array of InstanceAssociation's.
* The caller is responsible for freeing the array memory with a call to delete [].
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node whose associations we are interested in.
* \param _groupIdx One-based index of the group (because Z-Wave product manuals use one-based group numbering).
* \param o_associations If the number of associations returned is greater than zero, o_associations will be set to point to an array containing the IDs and instances of the associated nodes.
* \return The number of items in the associations array. If zero, the array will point to NULL, and does not need to be deleted.
* \see GetNumGroups, AddAssociation, RemoveAssociation, GetMaxAssociations
*/
uint32 GetAssociations( uint32 const _homeId, uint8 const _nodeId, uint8 const _groupIdx, InstanceAssociation** o_associations );
/**
* \brief Gets the maximum number of associations for a group.
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node whose associations we are interested in.
* \param _groupIdx one-based index of the group (because Z-Wave product manuals use one-based group numbering).
* \return The maximum number of nodes that can be associated into the group.
* \see GetNumGroups, AddAssociation, RemoveAssociation, GetAssociations
*/
uint8 GetMaxAssociations( uint32 const _homeId, uint8 const _nodeId, uint8 const _groupIdx );
/**
* \brief Returns a label for the particular group of a node.
* This label is populated by the device specific configuration files.
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node whose associations are to be changed.
* \param _groupIdx One-based index of the group (because Z-Wave product manuals use one-based group numbering).
* \see GetNumGroups, GetAssociations, GetMaxAssociations, AddAssociation
*/
string GetGroupLabel( uint32 const _homeId, uint8 const _nodeId, uint8 const _groupIdx );
/**
* \brief Adds a node to an association group.
* Due to the possibility of a device being asleep, the command is assumed to suceed, and the association data
* held in this class is updated directly. This will be reverted by a future Association message from the device
* if the Z-Wave message actually failed to get through. Notification callbacks will be sent in both cases.
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node whose associations are to be changed.
* \param _groupIdx One-based index of the group (because Z-Wave product manuals use one-based group numbering).
* \param _targetNodeId Identifier for the node that will be added to the association group.
* \param _instance Identifier for the instance that will be added to the association group.
* \see GetNumGroups, GetAssociations, GetMaxAssociations, RemoveAssociation
*/
void AddAssociation( uint32 const _homeId, uint8 const _nodeId, uint8 const _groupIdx, uint8 const _targetNodeId, uint8 const _instance = 0x00 );
/**
* \brief Removes a node from an association group.
* Due to the possibility of a device being asleep, the command is assumed to suceed, and the association data
* held in this class is updated directly. This will be reverted by a future Association message from the device
* if the Z-Wave message actually failed to get through. Notification callbacks will be sent in both cases.
* \param _homeId The Home ID of the Z-Wave controller that manages the node.
* \param _nodeId The ID of the node whose associations are to be changed.
* \param _groupIdx One-based index of the group (because Z-Wave product manuals use one-based group numbering).
* \param _targetNodeId Identifier for the node that will be removed from the association group.
* \param _instance Identifier for the instance that will be removed to the association group.
* \see GetNumGroups, GetAssociations, GetMaxAssociations, AddAssociation
*/
void RemoveAssociation( uint32 const _homeId, uint8 const _nodeId, uint8 const _groupIdx, uint8 const _targetNodeId, uint8 const _instance = 0x00 );
/*@}*/
//-----------------------------------------------------------------------------
// Notifications
//-----------------------------------------------------------------------------
/** \name Notifications
* For notification of changes to the Z-Wave network or device values and associations.
*/
/*@{*/
public:
/**
* \brief Add a notification watcher.
* In OpenZWave, all feedback from the Z-Wave network is sent to the application via callbacks.
* This method allows the application to add a notification callback handler, known as a "watcher" to OpenZWave.
* An application needs only add a single watcher - all notifications will be reported to it.
* \param _watcher pointer to a function that will be called by the notification system.
* \param _context pointer to user defined data that will be passed to the watcher function with each notification.
* \return true if the watcher was successfully added.
* \see RemoveWatcher, Notification
*/
bool AddWatcher( pfnOnNotification_t _watcher, void* _context );
/**
* \brief Remove a notification watcher.
* \param _watcher pointer to a function that must match that passed to a previous call to AddWatcher
* \param _context pointer to user defined data that must match the one passed in that same previous call to AddWatcher.
* \return true if the watcher was successfully removed.
* \see AddWatcher, Notification
*/
bool RemoveWatcher( pfnOnNotification_t _watcher, void* _context );
/*@}*/
private:
void NotifyWatchers( Notification* _notification ); // Passes the notifications to all the registered watcher callbacks in turn.
struct Watcher
{
pfnOnNotification_t m_callback;
void* m_context;
Watcher
(
pfnOnNotification_t _callback,
void* _context
):
m_callback( _callback ),
m_context( _context )
{
}
};
OPENZWAVE_EXPORT_WARNINGS_OFF
list<Watcher*> m_watchers; // List of all the registered watchers.
OPENZWAVE_EXPORT_WARNINGS_ON
Mutex* m_notificationMutex;
//-----------------------------------------------------------------------------
// Controller commands
//-----------------------------------------------------------------------------
/** \name Controller Commands
* Commands for Z-Wave network management using the PC Controller.
*/
/*@{*/
public:
/**
* \brief Hard Reset a PC Z-Wave Controller.
* Resets a controller and erases its network configuration settings. The controller becomes a primary controller ready to add devices to a new network.
* \param _homeId The Home ID of the Z-Wave controller to be reset.
* \see SoftReset
*/
void ResetController( uint32 const _homeId );
/**
* \brief Soft Reset a PC Z-Wave Controller.
* Resets a controller without erasing its network configuration settings.
* \param _homeId The Home ID of the Z-Wave controller to be reset.
* \see SoftReset
*/
void SoftReset( uint32 const _homeId );
/**
* \brief Start a controller command process.
* Most Controller Commands are implemented via Other Manager methods, you should
* only use this method if you need advanced control over a existing Controller Command
* or if a ControllerCommand is not implemented.
*
* \param _homeId The Home ID of the Z-Wave controller.
* \param _command The command to be sent to the controller.
* \param _callback pointer to a function that will be called at various stages during the command process
* to notify the user of progress or to request actions on the user's part. Defaults to NULL. Callbacks are also sent
* via Notification mechanism with type of Notification::Type_ControllerCommand
* \param _context pointer to user defined data that will be passed into to the callback function. Defaults to NULL.
* \param _highPower used only with the AddDevice, AddController, RemoveDevice and RemoveController commands.
* Usually when adding or removing devices, the controller operates at low power so that the controller must
* be physically close to the device for security reasons. If _highPower is true, the controller will
* operate at normal power levels instead. Defaults to false.
* \param _nodeId is the node ID used by the command if necessary.
* \param _arg is an optional argument, usually another node ID, that is used by the command.
* \return true if the command was accepted and has queued to be executed.
* \see CancelControllerCommand, HasNodeFailed, RemoveFailedNode, Driver::ControllerCommand, Driver::pfnControllerCallback_t,
* <p> Commands
* - Driver::ControllerCommand_AddDevice - Add a new device or controller to the Z-Wave network.
* - Driver::ControllerCommand_CreateNewPrimary - Create a new primary controller when old primary fails. Requires SUC.
* - Driver::ControllerCommand_ReceiveConfiguration - Receive network configuration information from primary controller. Requires secondary.
* - Driver::ControllerCommand_RemoveDevice - Remove a device or controller from the Z-Wave network.
* - Driver::ControllerCommand_RemoveFailedNode - Remove a node from the network. The node must not be responding
* and be on the controller's failed node list.
* - Driver::ControllerCommand_HasNodeFailed - Check whether a node is in the controller's failed nodes list.
* - Driver::ControllerCommand_ReplaceFailedNode - Replace a failed device with another. If the node is not in
* the controller's failed nodes list, or the node responds, this command will fail.
* - Driver:: ControllerCommand_TransferPrimaryRole - Add a new controller to the network and
* make it the primary. The existing primary will become a secondary controller.
* - Driver::ControllerCommand_RequestNetworkUpdate - Update the controller with network information from the SUC/SIS.
* - Driver::ControllerCommand_RequestNodeNeighborUpdate - Get a node to rebuild its neighbour list. This method also does RequestNodeNeighbors afterwards.
* - Driver::ControllerCommand_AssignReturnRoute - Assign a network return route to a device.
* - Driver::ControllerCommand_DeleteAllReturnRoutes - Delete all network return routes from a device.
* - Driver::ControllerCommand_SendNodeInformation - Send a node information frame.
* - Driver::ControllerCommand_ReplicationSend - Send information from primary to secondary
* - Driver::ControllerCommand_CreateButton - Create a handheld button id.
* - Driver::ControllerCommand_DeleteButton - Delete a handheld button id.
* <p> Callbacks
* - Driver::ControllerState_Starting, the controller command has begun
* - Driver::ControllerState_Waiting, the controller is waiting for a user action. A notice should be displayed
* to the user at this point, telling them what to do next.
* For the add, remove, replace and transfer primary role commands, the user needs to be told to press the
* inclusion button on the device that is going to be added or removed. For ControllerCommand_ReceiveConfiguration,
* they must set their other controller to send its data, and for ControllerCommand_CreateNewPrimary, set the other
* controller to learn new data.
* - Driver::ControllerState_InProgress - the controller is in the process of adding or removing the chosen node. It is now too late to cancel the command.
* - Driver::ControllerState_Complete - the controller has finished adding or removing the node, and the command is complete.
* - Driver::ControllerState_Failed - will be sent if the command fails for any reason.
* \deprecated This method has been depreciated in favour of the methods in the \ref Network_Commands section
*
* \see AddNode RemoveNode RemoveFailedNode HasNodeFailed RequestNodeNeighborUpdate AssignReturnRoute DeleteAllReturnRoutes SendNodeInformation CreateNewPrimary ReceiveConfiguration ReplaceFailedNode TransferPrimaryRole RequestNetworkUpdate ReplicationSend CreateButton DeleteButton
*
*/
DEPRECATED bool BeginControllerCommand( uint32 const _homeId, Driver::ControllerCommand _command, Driver::pfnControllerCallback_t _callback = NULL, void* _context = NULL, bool _highPower = false, uint8 _nodeId = 0xff, uint8 _arg = 0 );
/**
* \brief Cancels any in-progress command running on a controller.
* \param _homeId The Home ID of the Z-Wave controller.
* \return true if a command was running and was cancelled.
* \see BeginControllerCommand
*/
bool CancelControllerCommand( uint32 const _homeId );
/*@}*/
//-----------------------------------------------------------------------------
// Network commands
//-----------------------------------------------------------------------------
/** \name Network Commands
* Commands for Z-Wave network for testing, routing and other internal
* operations.
*/
/*@{*/
public:
/**
* \brief Test network node.
* Sends a series of messages to a network node for testing network reliability.
* \param _homeId The Home ID of the Z-Wave controller to be reset.
* \param _count This is the number of test messages to send.
* \see TestNetwork
*/
void TestNetworkNode( uint32 const _homeId, uint8 const _nodeId, uint32 const _count );
/**
* \brief Test network.
* Sends a series of messages to every node on the network for testing network reliability.
* \param _homeId The Home ID of the Z-Wave controller to be reset.
* \param _count This is the number of test messages to send.
* \see TestNetwork
*/
void TestNetwork( uint32 const _homeId, uint32 const _count );
/**
* \brief Heal network node by requesting the node rediscover their neighbors.
* Sends a ControllerCommand_RequestNodeNeighborUpdate to the node.
* \param _homeId The Home ID of the Z-Wave network to be healed.
* \param _nodeId The node to heal.
* \param _doRR Whether to perform return routes initialization.
*/
void HealNetworkNode( uint32 const _homeId, uint8 const _nodeId, bool _doRR );
/**
* \brief Heal network by requesting node's rediscover their neighbors.
* Sends a ControllerCommand_RequestNodeNeighborUpdate to every node.
* Can take a while on larger networks.
* \param _homeId The Home ID of the Z-Wave network to be healed.
* \param _doRR Whether to perform return routes initialization.
*/
void HealNetwork( uint32 const _homeId, bool _doRR );
/**
* \brief Start the Inclusion Process to add a Node to the Network.
* The Status of the Node Inclusion is communicated via Notifications. Specifically, you should
* monitor ControllerCommand Notifications.
*
* Results of the AddNode Command will be send as a Notification with the Notification type as
* Notification::Type_ControllerCommand
*
* \param _homeId The Home ID of the Z-Wave network where the device should be added.
* \param _doSecurity Whether to initialize the Network Key on the device if it supports the Security CC
* \return if the Command was sent succcesfully to the Controller
* \sa CancelControllerCommand
*/
bool AddNode( uint32 const _homeId, bool _doSecurity = true );
/**
* \brief Remove a Device from the Z-Wave Network
* The Status of the Node Removal is communicated via Notifications. Specifically, you should
* monitor ControllerCommand Notifications.
*
* Results of the AddNode Command will be send as a Notification with the Notification type as
* Notification::Type_ControllerCommand
*
* \param _homeId The HomeID of the Z-Wave network where you want to remove the device
* \return if the Command was send succesfully to the Controller
* \sa CancelControllerCommand
*/
bool RemoveNode(uint32 const _homeId);
/**
* \brief Remove a Failed Device from the Z-Wave Network
* This Command will remove a failed node from the network. The Node should be on the Controllers Failed
* Node List, otherwise this command will fail. You can use the HasNodeFailed function below to test if the Controller
* believes the Node has Failed.
* The Status of the Node Removal is communicated via Notifications. Specifically, you should
* monitor ControllerCommand Notifications.
*
* Results of the AddNode Command will be send as a Notification with the Notification type as
* Notification::Type_ControllerCommand
*
* \param _homeId The HomeID of the Z-Wave network where you want to remove the device
* \param _nodeId The NodeID of the Failed Node.
* \return if the Command was send succesfully to the Controller
* \sa CancelControllerCommand
*/
bool RemoveFailedNode(uint32 const _homeId, uint8 const _nodeId);
/**
* \brief Check if the Controller Believes a Node has Failed.
* This is different from the IsNodeFailed call in that we test the Controllers Failed Node List, whereas the IsNodeFailed is testing
* our list of Failed Nodes, which might be different.
* The Results will be communicated via Notifications. Specifically, you should monitor the ControllerCommand notifications
*
* Results of the AddNode Command will be send as a Notification with the Notification type as
* Notification::Type_ControllerCommand
*
* \param _homeId The HomeID of the Z-Wave network where you want to test the device
* \param _nodeId The NodeID of the Failed Node.
* \return if the RemoveDevice Command was send succesfully to the Controller
* \sa CancelControllerCommand
*/
bool HasNodeFailed(uint32 const _homeId, uint8 const _nodeId);
/**
* \brief Ask a Node to update its Neighbor Tables
* This command will ask a Node to update its Neighbor Tables.
*
* Results of the AddNode Command will be send as a Notification with the Notification type as
* Notification::Type_ControllerCommand
*
* \param _homeId The HomeID of the Z-Wave network where you want to update the device
* \param _nodeId The NodeID of the Node.
* \return if the Command was send succesfully to the Controller
* \sa CancelControllerCommand
*/
bool RequestNodeNeighborUpdate(uint32 const _homeId, uint8 const _nodeId);
/**
* \brief Ask a Node to update its update its Return Route to the Controller
* This command will ask a Node to update its Return Route to the Controller
*
* Results of the AddNode Command will be send as a Notification with the Notification type as
* Notification::Type_ControllerCommand
*
* \param _homeId The HomeID of the Z-Wave network where you want to update the device
* \param _nodeId The NodeID of the Node.
* \return if the Command was send succesfully to the Controller
* \sa CancelControllerCommand
*/
bool AssignReturnRoute(uint32 const _homeId, uint8 const _nodeId);
/**
* \brief Ask a Node to delete all Return Route.
* This command will ask a Node to delete all its return routes, and will rediscover when needed.
*
* Results of the AddNode Command will be send as a Notification with the Notification type as
* Notification::Type_ControllerCommand
*
* \param _homeId The HomeID of the Z-Wave network where you want to update the device
* \param _nodeId The NodeID of the Node.
* \return if the Command was send succesfully to the Controller
* \sa CancelControllerCommand
*/
bool DeleteAllReturnRoutes(uint32 const _homeId, uint8 const _nodeId);
/**
* \brief Send a NIF frame from the Controller to a Node.
* This command send a NIF frame from the Controller to a Node
*
* Results of the AddNode Command will be send as a Notification with the Notification type as
* Notification::Type_ControllerCommand
*
* \param _homeId The HomeID of the Z-Wave network
* \param _nodeId The NodeID of the Node to recieve the NIF
* \return if the sendNIF Command was send succesfully to the Controller
* \sa CancelControllerCommand
*/
bool SendNodeInformation(uint32 const _homeId, uint8 const _nodeId);
/**
* \brief Create a new primary controller when old primary fails. Requires SUC.
* This command Creates a new Primary Controller when the Old Primary has Failed. Requires a SUC on the network to function
*
* Results of the CreateNewPrimary Command will be send as a Notification with the Notification type as
* Notification::Type_ControllerCommand
*
* \param _homeId The HomeID of the Z-Wave network
* \return if the CreateNewPrimary Command was send succesfully to the Controller
* \sa CancelControllerCommand
*/
bool CreateNewPrimary(uint32 const _homeId);
/**
* \brief Receive network configuration information from primary controller. Requires secondary.
* This command prepares the controller to recieve Network Configuration from a Secondary Controller.
*
* Results of the ReceiveConfiguration Command will be send as a Notification with the Notification type as
* Notification::Type_ControllerCommand
*
* \param _homeId The HomeID of the Z-Wave network
* \return if the ReceiveConfiguration Command was send succesfully to the Controller
* \sa CancelControllerCommand
*/
bool ReceiveConfiguration (uint32 const _homeId);
/**
* \brief Replace a failed device with another.
* If the node is not in the controller's failed nodes list, or the node responds, this command will fail.
* You can check if a Node is in the Controllers Failed node list by using the HasNodeFailed method
*
* Results of the ReplaceFailedNode Command will be send as a Notification with the Notification type as
* Notification::Type_ControllerCommand
*
* \param _homeId The HomeID of the Z-Wave network
* \param _nodeId the ID of the Failed Node
* \return if the ReplaceFailedNode Command was send succesfully to the Controller
* \sa HasNodeFailed
* \sa CancelControllerCommand
*/
bool ReplaceFailedNode(uint32 const _homeId, uint8 const _nodeId);
/**
* \brief Add a new controller to the network and make it the primary.
* The existing primary will become a secondary controller.
*
* Results of the TransferPrimaryRole Command will be send as a Notification with the Notification type as
* Notification::Type_ControllerCommand
*
* \param _homeId The HomeID of the Z-Wave network
* \return if the TransferPrimaryRole Command was send succesfully to the Controller
* \sa CancelControllerCommand
*/
bool TransferPrimaryRole(uint32 const _homeId);
/**
* \brief Update the controller with network information from the SUC/SIS.
*
* Results of the RequestNetworkUpdate Command will be send as a Notification with the Notification type as
* Notification::Type_ControllerCommand
*
* \param _homeId The HomeID of the Z-Wave network
* \param _nodeId the ID of the Node
* \return if the RequestNetworkUpdate Command was send succesfully to the Controller
* \sa CancelControllerCommand
*/
bool RequestNetworkUpdate(uint32 const _homeId, uint8 const _nodeId);
/**
* \brief Send information from primary to secondary
*
* Results of the ReplicationSend Command will be send as a Notification with the Notification type as
* Notification::Type_ControllerCommand
*
* \param _homeId The HomeID of the Z-Wave network
* \param _nodeId the ID of the Node
* \return if the ReplicationSend Command was send succesfully to the Controller
* \sa CancelControllerCommand
*/
bool ReplicationSend(uint32 const _homeId, uint8 const _nodeId);
/**
* \brief Create a handheld button id.
*
* Only intended for Bridge Firmware Controllers.
*
* Results of the CreateButton Command will be send as a Notification with the Notification type as
* Notification::Type_ControllerCommand
*
* \param _homeId The HomeID of the Z-Wave network
* \param _nodeId the ID of the Virtual Node
* \param _buttonId the ID of the Button to create
* \return if the CreateButton Command was send succesfully to the Controller
* \sa CancelControllerCommand
*/
bool CreateButton(uint32 const _homeId, uint8 const _nodeId, uint8 const _buttonid);
/**
* \brief Delete a handheld button id.
*
* Only intended for Bridge Firmware Controllers.
*
* Results of the DeleteButton Command will be send as a Notification with the Notification type as
* Notification::Type_ControllerCommand
*
* \param _homeId The HomeID of the Z-Wave network
* \param _nodeId the ID of the Virtual Node
* \param _buttonId the ID of the Button to delete
* \return if the DeleteButton Command was send succesfully to the Controller
* \sa CancelControllerCommand
*/
bool DeleteButton(uint32 const _homeId, uint8 const _nodeId, uint8 const _buttonid);
/*@}*/
//-----------------------------------------------------------------------------
// Scene commands
//-----------------------------------------------------------------------------
/** \name Scene Commands
* Commands for Z-Wave scene interface.
*/
/*@{*/
public:
/**
* \brief Gets the number of scenes that have been defined.
* \return The number of scenes.
* \see GetAllScenes, RemoveAllScenes, CreateScene, RemoveScene, AddSceneValue, RemoveSceneValue, SceneGetValues, SceneGetValueAsBool, SceneGetValueAsByte, SceneGetValueAsFloat, SceneGetValueAsInt, SceneGetValueAsShort, SceneGetValueAsString, SetSceneValue, GetSceneLabel, SetSceneLabel, SceneExists, ActivateScene
*/
uint8 GetNumScenes( );
/**
* \brief Gets a list of all the SceneIds.
* \param _sceneIds is a pointer to an array of integers.
* \return The number of scenes. If zero, _sceneIds will be NULL and doesn't need to be freed.
* \see GetNumScenes, CreateScene, RemoveScene, AddSceneValue, RemoveSceneValue, SceneGetValues, SceneGetValueAsBool, SceneGetValueAsByte, SceneGetValueAsFloat, SceneGetValueAsInt, SceneGetValueAsShort, SceneGetValueAsString, SetSceneValue, GetSceneLabel, SetSceneLabel, SceneExists, ActivateScene
*/
uint8 GetAllScenes( uint8** _sceneIds );
/**
* \brief Remove all the SceneIds.
* \param _homeId The Home ID of the Z-Wave controller. 0 for all devices from all scenes.
* \see GetAllScenes, GetNumScenes, CreateScene, RemoveScene, AddSceneValue, RemoveSceneValue, SceneGetValues, SceneGetValueAsBool, SceneGetValueAsByte, SceneGetValueAsFloat, SceneGetValueAsInt, SceneGetValueAsShort, SceneGetValueAsString, SetSceneValue, GetSceneLabel, SetSceneLabel, SceneExists, ActivateScene
*/
void RemoveAllScenes( uint32 const _homeId );
/**
* \brief Create a new Scene passing in Scene ID
* \return uint8 Scene ID used to reference the scene. 0 is failure result.
* \see GetNumScenes, GetAllScenes, RemoveScene, AddSceneValue, RemoveSceneValue, SceneGetValues, SceneGetValueAsBool, SceneGetValueAsByte, SceneGetValueAsFloat, SceneGetValueAsInt, SceneGetValueAsShort, SceneGetValueAsString, SetSceneValue, GetSceneLabel, SetSceneLabel, SceneExists, ActivateScene
*/
uint8 CreateScene();
/**
* \brief Remove an existing Scene.
* \param _sceneId is an integer representing the unique Scene ID to be removed.
* \return true if scene was removed.
* \see GetNumScenes, GetAllScenes, CreateScene, AddSceneValue, RemoveSceneValue, SceneGetValues, SceneGetValueAsBool, SceneGetValueAsByte, SceneGetValueAsFloat, SceneGetValueAsInt, SceneGetValueAsShort, SceneGetValueAsString, SetSceneValue, GetSceneLabel, SetSceneLabel, SceneExists, ActivateScene
*/
bool RemoveScene( uint8 const _sceneId );
/**
* \brief Add a bool Value ID to an existing scene.
* \param _sceneId is an integer representing the unique Scene ID.
* \param _valueId is the Value ID to be added.
* \param _value is the bool value to be saved.
* \return true if Value ID was added.
* \see GetNumScenes, GetAllScenes, CreateScene, RemoveScene, RemoveSceneValue, SceneGetValues, SceneGetValueAsBool, SceneGetValueAsByte, SceneGetValueAsFloat, SceneGetValueAsInt, SceneGetValueAsShort, SceneGetValueAsString, SetSceneValue, GetSceneLabel, SetSceneLabel, SceneExists, ActivateScene
*/
bool AddSceneValue( uint8 const _sceneId, ValueID const& _valueId, bool const _value );
/**
* \brief Add a byte Value ID to an existing scene.
* \param _sceneId is an integer representing the unique Scene ID.
* \param _valueId is the Value ID to be added.
* \param _value is the byte value to be saved.
* \return true if Value ID was added.
* \see GetNumScenes, GetAllScenes, CreateScene, RemoveScene, RemoveSceneValue, SceneGetValues, SceneGetValueAsBool, SceneGetValueAsByte, SceneGetValueAsFloat, SceneGetValueAsInt, SceneGetValueAsShort, SceneGetValueAsString, SetSceneValue, GetSceneLabel, SetSceneLabel, SceneExists, ActivateScene
*/
bool AddSceneValue( uint8 const _sceneId, ValueID const& _valueId, uint8 const _value );
/**
* \brief Add a decimal Value ID to an existing scene.
* \param _sceneId is an integer representing the unique Scene ID.
* \param _valueId is the Value ID to be added.
* \param _value is the float value to be saved.
* \return true if Value ID was added.
* \see GetNumScenes, GetAllScenes, CreateScene, RemoveScene, RemoveSceneValue, SceneGetValues, SceneGetValueAsBool, SceneGetValueAsByte, SceneGetValueAsFloat, SceneGetValueAsInt, SceneGetValueAsShort, SceneGetValueAsString, SetSceneValue, GetSceneLabel, SetSceneLabel, SceneExists, ActivateScene
*/
bool AddSceneValue( uint8 const _sceneId, ValueID const& _valueId, float const _value );
/**
* \brief Add a 32-bit signed integer Value ID to an existing scene.
* \param _sceneId is an integer representing the unique Scene ID.
* \param _valueId is the Value ID to be added.
* \param _value is the int32 value to be saved.
* \return true if Value ID was added.
* \see GetNumScenes, GetAllScenes, CreateScene, RemoveScene, RemoveSceneValue, SceneGetValues, SceneGetValueAsBool, SceneGetValueAsByte, SceneGetValueAsFloat, SceneGetValueAsInt, SceneGetValueAsShort, SceneGetValueAsString, SetSceneValue, GetSceneLabel, SetSceneLabel, SceneExists, ActivateScene
*/
bool AddSceneValue( uint8 const _sceneId, ValueID const& _valueId, int32 const _value );
/**
* \brief Add a 16-bit signed integer Value ID to an existing scene.
* \param _sceneId is an integer representing the unique Scene ID.
* \param _valueId is the Value ID to be added.
* \param _value is the int16 value to be saved.
* \return true if Value ID was added.
* \see GetNumScenes, GetAllScenes, CreateScene, RemoveScene, RemoveSceneValue, SceneGetValues, SceneGetValueAsBool, SceneGetValueAsByte, SceneGetValueAsFloat, SceneGetValueAsInt, SceneGetValueAsShort, SceneGetValueAsString, SetSceneValue, GetSceneLabel, SetSceneLabel, SceneExists, ActivateScene
*/
bool AddSceneValue( uint8 const _sceneId, ValueID const& _valueId, int16 const _value );
/**
* \brief Add a string Value ID to an existing scene.
* \param _sceneId is an integer representing the unique Scene ID.
* \param _valueId is the Value ID to be added.
* \param _value is the string value to be saved.
* \return true if Value ID was added.
* \see GetNumScenes, GetAllScenes, CreateScene, RemoveScene, RemoveSceneValue, SceneGetValues, SceneGetValueAsBool, SceneGetValueAsByte, SceneGetValueAsFloat, SceneGetValueAsInt, SceneGetValueAsShort, SceneGetValueAsString, SetSceneValue, GetSceneLabel, SetSceneLabel, SceneExists, ActivateScene
*/
bool AddSceneValue( uint8 const _sceneId, ValueID const& _valueId, string const& _value );
/**
* \brief Add the selected item list Value ID to an existing scene (as a string).
* \param _sceneId is an integer representing the unique Scene ID.
* \param _valueId is the Value ID to be added.
* \param _value is the string value to be saved.
* \return true if Value ID was added.
* \see GetNumScenes, GetAllScenes, CreateScene, RemoveScene, AddSceneValue, RemoveSceneValue, SceneGetValues, SceneGetValueAsBool, SceneGetValueAsByte, SceneGetValueAsFloat, SceneGetValueAsInt, SceneGetValueAsShort, SceneGetValueAsString, SetSceneValue, GetSceneLabel, SetSceneLabel, SceneExists, ActivateScene
*/
bool AddSceneValueListSelection( uint8 const _sceneId, ValueID const& _valueId, string const& _value );
/**
* \brief Add the selected item list Value ID to an existing scene (as a integer).
* \param _sceneId is an integer representing the unique Scene ID.
* \param _valueId is the Value ID to be added.
* \param _value is the integer value to be saved.
* \return true if Value ID was added.
* \see GetNumScenes, GetAllScenes, CreateScene, RemoveScene, AddSceneValue, RemoveSceneValue, SceneGetValues, SceneGetValueAsBool, SceneGetValueAsByte, SceneGetValueAsFloat, SceneGetValueAsInt, SceneGetValueAsShort, SceneGetValueAsString, SetSceneValue, GetSceneLabel, SetSceneLabel, SceneExists, ActivateScene
*/
bool AddSceneValueListSelection( uint8 const _sceneId, ValueID const& _valueId, int32 const _value );
/**
* \brief Remove the Value ID from an existing scene.
* \param _sceneId is an integer representing the unique Scene ID.
* \param _valueId is the Value ID to be removed.
* \return true if Value ID was removed.
* \see GetNumScenes, GetAllScenes, CreateScene, RemoveScene, AddSceneValue, SceneGetValues, SceneGetValueAsBool, SceneGetValueAsByte, SceneGetValueAsFloat, SceneGetValueAsInt, SceneGetValueAsShort, SceneGetValueAsString, SetSceneValue, GetSceneLabel, SetSceneLabel, SceneExists, ActivateScene
*/
bool RemoveSceneValue( uint8 const _sceneId, ValueID const& _valueId );
/**
* \brief Retrieves the scene's list of values.
* \param _sceneId The Scene ID of the scene to retrieve the value from.
* \param o_value Pointer to an array of ValueIDs if return is non-zero.
* \return The number of nodes in the o_value array. If zero, the array will point to NULL and does not need to be deleted.
* \see GetNumScenes, GetAllScenes, CreateScene, RemoveScene, AddSceneValue, RemoveSceneValue, SceneGetValueAsBool, SceneGetValueAsByte, SceneGetValueAsFloat, SceneGetValueAsInt, SceneGetValueAsShort, SceneGetValueAsString, SetSceneValue, GetSceneLabel, SetSceneLabel, SceneExists, ActivateScene
*/
int SceneGetValues( uint8 const _sceneId, vector<ValueID>* o_value );
/**
* \brief Retrieves a scene's value as a bool.
* \param _sceneId The Scene ID of the scene to retrieve the value from.
* \param _valueId The Value ID of the value to retrieve.
* \param o_value Pointer to a bool that will be filled with the returned value.
* \return true if the value was obtained.
* \see GetNumScenes, GetAllScenes, CreateScene, RemoveScene, AddSceneValue, RemoveSceneValue, SceneGetValues, SceneGetValueAsByte, SceneGetValueAsFloat, SceneGetValueAsInt, SceneGetValueAsShort, SceneGetValueAsString, SetSceneValue, GetSceneLabel, SetSceneLabel, SceneExists, ActivateScene
*/
bool SceneGetValueAsBool( uint8 const _sceneId, ValueID const& _valueId, bool* o_value );
/**
* \brief Retrieves a scene's value as an 8-bit unsigned integer.
* \param _sceneId The Scene ID of the scene to retrieve the value from.
* \param _valueId The Value ID of the value to retrieve.
* \param o_value Pointer to a uint8 that will be filled with the returned value.
* \return true if the value was obtained.
* \see GetNumScenes, GetAllScenes, CreateScene, RemoveScene, AddSceneValue, RemoveSceneValue, SceneGetValues, SceneGetValueAsBool, SceneGetValueAsFloat, SceneGetValueAsInt, SceneGetValueAsShort, SceneGetValueAsString, SetSceneValue, GetSceneLabel, SetSceneLabel, SceneExists, ActivateScene
*/
bool SceneGetValueAsByte( uint8 const _sceneId, ValueID const& _valueId, uint8* o_value );
/**
* \brief Retrieves a scene's value as a float.
* \param _sceneId The Scene ID of the scene to retrieve the value from.
* \param _valueId The Value ID of the value to retrieve.
* \param o_value Pointer to a float that will be filled with the returned value.
* \return true if the value was obtained.
* \see GetNumScenes, GetAllScenes, CreateScene, RemoveScene, AddSceneValue, RemoveSceneValue, SceneGetValues, SceneGetValueAsBool, SceneGetValueAsByte, SceneGetValueAsInt, SceneGetValueAsShort, SceneGetValueAsString, SetSceneValue, GetSceneLabel, SetSceneLabel, SceneExists, ActivateScene
*/
bool SceneGetValueAsFloat( uint8 const _sceneId, ValueID const& _valueId, float* o_value );
/**
* \brief Retrieves a scene's value as a 32-bit signed integer.
* \param _sceneId The Scene ID of the scene to retrieve the value from.
* \param _valueId The Value ID of the value to retrieve.
* \param o_value Pointer to a int32 that will be filled with the returned value.
* \return true if the value was obtained.
* \see GetNumScenes, GetAllScenes, CreateScene, RemoveScene, AddSceneValue, RemoveSceneValue, SceneGetValues, SceneGetValueAsBool, SceneGetValueAsByte, SceneGetValueAsFloat, SceneGetValueAsShort, SceneGetValueAsString, SetSceneValue, GetSceneLabel, SetSceneLabel, SceneExists, ActivateScene
*/
bool SceneGetValueAsInt( uint8 const _sceneId, ValueID const& _valueId, int32* o_value );
/**
* \brief Retrieves a scene's value as a 16-bit signed integer.
* \param _sceneId The Scene ID of the scene to retrieve the value from.
* \param _valueId The Value ID of the value to retrieve.
* \param o_value Pointer to a int16 that will be filled with the returned value.
* \return true if the value was obtained.
* \see GetNumScenes, GetAllScenes, CreateScene, RemoveScene, AddSceneValue, RemoveSceneValue, SceneGetValues, SceneGetValueAsBool, SceneGetValueAsByte, SceneGetValueAsFloat, SceneGetValueAsInt, SceneGetValueAsString, SetSceneValue, GetSceneLabel, SetSceneLabel, SceneExists, ActivateScene
*/
bool SceneGetValueAsShort( uint8 const _sceneId, ValueID const& _valueId, int16* o_value );
/**
* \brief Retrieves a scene's value as a string.
* \param _sceneId The Scene ID of the scene to retrieve the value from.
* \param _valueId The Value ID of the value to retrieve.
* \param o_value Pointer to a string that will be filled with the returned value.
* \return true if the value was obtained.
* \see GetNumScenes, GetAllScenes, CreateScene, RemoveScene, AddSceneValue, RemoveSceneValue, SceneGetValues, SceneGetValueAsBool, SceneGetValueAsByte, SceneGetValueAsFloat, SceneGetValueAsInt, SceneGetValueAsShort, SetSceneValue, GetSceneLabel, SetSceneLabel, SceneExists, ActivateScene
*/
bool SceneGetValueAsString( uint8 const _sceneId, ValueID const& _valueId, string* o_value );
/**
* \brief Retrieves a scene's value as a list (as a string).
* \param _sceneId The Scene ID of the scene to retrieve the value from.
* \param _valueId The Value ID of the value to retrieve.
* \param o_value Pointer to a string that will be filled with the returned value.
* \return true if the value was obtained.
* \see GetNumScenes, GetAllScenes, CreateScene, RemoveScene, AddSceneValue, RemoveSceneValue, SceneGetValues, SceneGetValueAsBool, SceneGetValueAsByte, SceneGetValueAsFloat, SceneGetValueAsInt, SceneGetValueAsShort, SceneGetValueAsString, SetSceneValue, GetSceneLabel, SetSceneLabel, SceneExists, ActivateScene
*/
bool SceneGetValueListSelection( uint8 const _sceneId, ValueID const& _valueId, string* o_value );
/**
* \brief Retrieves a scene's value as a list (as a integer).
* \param _sceneId The Scene ID of the scene to retrieve the value from.
* \param _valueId The Value ID of the value to retrieve.
* \param o_value Pointer to a integer that will be filled with the returned value.
* \return true if the value was obtained.
* \see GetNumScenes, GetAllScenes, CreateScene, RemoveScene, AddSceneValue, RemoveSceneValue, SceneGetValues, SceneGetValueAsBool, SceneGetValueAsByte, SceneGetValueAsFloat, SceneGetValueAsInt, SceneGetValueAsShort, SceneGetValueAsString, SetSceneValue, GetSceneLabel, SetSceneLabel, SceneExists, ActivateScene
*/
bool SceneGetValueListSelection( uint8 const _sceneId, ValueID const& _valueId, int32* o_value );
/**
* \brief Set a bool Value ID to an existing scene's ValueID
* \param _sceneId is an integer representing the unique Scene ID.
* \param _valueId is the Value ID to be added.
* \param _value is the bool value to be saved.
* \return true if Value ID was added.
* \see GetNumScenes, GetAllScenes, CreateScene, RemoveScene, AddSceneValue, RemoveSceneValue, SceneGetValues, SceneGetValueAsBool, SceneGetValueAsByte, SceneGetValueAsFloat, SceneGetValueAsInt, SceneGetValueAsShort, SceneGetValueAsString, GetSceneLabel, SetSceneLabel, SceneExists, ActivateScene
*/
bool SetSceneValue( uint8 const _sceneId, ValueID const& _valueId, bool const _value );
/**
* \brief Set a byte Value ID to an existing scene's ValueID
* \param _sceneId is an integer representing the unique Scene ID.
* \param _valueId is the Value ID to be added.
* \param _value is the byte value to be saved.
* \return true if Value ID was added.
* \see GetNumScenes, GetAllScenes, CreateScene, RemoveScene, AddSceneValue, RemoveSceneValue, SceneGetValues, SceneGetValueAsBool, SceneGetValueAsByte, SceneGetValueAsFloat, SceneGetValueAsInt, SceneGetValueAsShort, SceneGetValueAsString, GetSceneLabel, SetSceneLabel, SceneExists, ActivateScene
*/
bool SetSceneValue( uint8 const _sceneId, ValueID const& _valueId, uint8 const _value );
/**
* \brief Set a decimal Value ID to an existing scene's ValueID
* \param _sceneId is an integer representing the unique Scene ID.
* \param _valueId is the Value ID to be added.
* \param _value is the float value to be saved.
* \return true if Value ID was added.
* \see GetNumScenes, GetAllScenes, CreateScene, RemoveScene, AddSceneValue, RemoveSceneValue, SceneGetValues, SceneGetValueAsBool, SceneGetValueAsByte, SceneGetValueAsFloat, SceneGetValueAsInt, SceneGetValueAsShort, SceneGetValueAsString, GetSceneLabel, SetSceneLabel, SceneExists, ActivateScene
*/
bool SetSceneValue( uint8 const _sceneId, ValueID const& _valueId, float const _value );
/**
* \brief Set a 32-bit signed integer Value ID to an existing scene's ValueID
* \param _sceneId is an integer representing the unique Scene ID.
* \param _valueId is the Value ID to be added.
* \param _value is the int32 value to be saved.
* \return true if Value ID was added.
* \see GetNumScenes, GetAllScenes, CreateScene, RemoveScene, AddSceneValue, RemoveSceneValue, SceneGetValues, SceneGetValueAsBool, SceneGetValueAsByte, SceneGetValueAsFloat, SceneGetValueAsInt, SceneGetValueAsShort, SceneGetValueAsString, GetSceneLabel, SetSceneLabel, SceneExists, ActivateScene
*/
bool SetSceneValue( uint8 const _sceneId, ValueID const& _valueId, int32 const _value );
/**
* \brief Set a 16-bit integer Value ID to an existing scene's ValueID
* \param _sceneId is an integer representing the unique Scene ID.
* \param _valueId is the Value ID to be added.
* \param _value is the int16 value to be saved.
* \return true if Value ID was added.
* \see GetNumScenes, GetAllScenes, CreateScene, RemoveScene, AddSceneValue, RemoveSceneValue, SceneGetValues, SceneGetValueAsBool, SceneGetValueAsByte, SceneGetValueAsFloat, SceneGetValueAsInt, SceneGetValueAsShort, SceneGetValueAsString, GetSceneLabel, SetSceneLabel, SceneExists, ActivateScene
*/
bool SetSceneValue( uint8 const _sceneId, ValueID const& _valueId, int16 const _value );
/**
* \brief Set a string Value ID to an existing scene's ValueID
* \param _sceneId is an integer representing the unique Scene ID.
* \param _valueId is the Value ID to be added.
* \param _value is the string value to be saved.
* \return true if Value ID was added.
* \see GetNumScenes, GetAllScenes, CreateScene, RemoveScene, AddSceneValue, RemoveSceneValue, SceneGetValues, SceneGetValueAsBool, SceneGetValueAsByte, SceneGetValueAsFloat, SceneGetValueAsInt, SceneGetValueAsShort, SceneGetValueAsString, GetSceneLabel, SetSceneLabel, SceneExists, ActivateScene
*/
bool SetSceneValue( uint8 const _sceneId, ValueID const& _valueId, string const& _value );
/**
* \brief Set the list selected item Value ID to an existing scene's ValueID (as a string).
* \param _sceneId is an integer representing the unique Scene ID.
* \param _valueId is the Value ID to be added.
* \param _value is the string value to be saved.
* \return true if Value ID was added.
* \see GetNumScenes, GetAllScenes, CreateScene, RemoveScene, AddSceneValue, RemoveSceneValue, SceneGetValues, SceneGetValueAsBool, SceneGetValueAsByte, SceneGetValueAsFloat, SceneGetValueAsInt, SceneGetValueAsShort, SceneGetValueAsString, SetSceneValue, GetSceneLabel, SetSceneLabel, SceneExists, ActivateScene
*/
bool SetSceneValueListSelection( uint8 const _sceneId, ValueID const& _valueId, string const& _value );
/**
* \brief Set the list selected item Value ID to an existing scene's ValueID (as a integer).
* \param _sceneId is an integer representing the unique Scene ID.
* \param _valueId is the Value ID to be added.
* \param _value is the integer value to be saved.
* \return true if Value ID was added.
* \see GetNumScenes, GetAllScenes, CreateScene, RemoveScene, AddSceneValue, RemoveSceneValue, SceneGetValues, SceneGetValueAsBool, SceneGetValueAsByte, SceneGetValueAsFloat, SceneGetValueAsInt, SceneGetValueAsShort, SceneGetValueAsString, SetSceneValue, GetSceneLabel, SetSceneLabel, SceneExists, ActivateScene
*/
bool SetSceneValueListSelection( uint8 const _sceneId, ValueID const& _valueId, int32 const _value );
/**
* \brief Returns a label for the particular scene.
* \param _sceneId The Scene ID
* \return The label string.
* \see GetNumScenes, GetAllScenes, CreateScene, RemoveScene, AddSceneValue, RemoveSceneValue, SceneGetValues, SceneGetValueAsBool, SceneGetValueAsByte, SceneGetValueAsFloat, SceneGetValueAsInt, SceneGetValueAsShort, SceneGetValueAsString, SetSceneValue, SetSceneLabel, SceneExists, ActivateScene
*/
string GetSceneLabel( uint8 const _sceneId );
/**
* \brief Sets a label for the particular scene.
* \param _sceneId The Scene ID
* \param _value The new value of the label.
* \see GetNumScenes, GetAllScenes, CreateScene, RemoveScene, AddSceneValue, RemoveSceneValue, SceneGetValues, SceneGetValueAsBool, SceneGetValueAsByte, SceneGetValueAsFloat, SceneGetValueAsInt, SceneGetValueAsShort, SceneGetValueAsString, SetSceneValue, GetSceneLabel, SceneExists, ActivateScene
*/
void SetSceneLabel( uint8 const _sceneId, string const& _value );
/**
* \brief Check if a Scene ID is defined.
* \param _sceneId The Scene ID.
* \return true if Scene ID exists.
* \see GetNumScenes, GetAllScenes, CreateScene, RemoveScene, AddSceneValue, RemoveSceneValue, SceneGetValues, SceneGetValueAsBool, SceneGetValueAsByte, SceneGetValueAsFloat, SceneGetValueAsInt, SceneGetValueAsShort, SceneGetValueAsString, SetSceneValue, GetSceneLabel, SetSceneLabel, ActivateScene
*/
bool SceneExists( uint8 const _sceneId );
/**
* \brief Activate given scene to perform all its actions.
* \param _sceneId The Scene ID.
* \return true if it is successful.
* \see GetNumScenes, GetAllScenes, CreateScene, RemoveScene, AddSceneValue, RemoveSceneValue, SceneGetValues, SceneGetValueAsBool, SceneGetValueAsByte, SceneGetValueAsFloat, SceneGetValueAsInt, SceneGetValueAsShort, SceneGetValueAsString, SetSceneValue, GetSceneLabel, SetSceneLabel, SceneExists
*/
bool ActivateScene( uint8 const _sceneId );
/*@}*/
//-----------------------------------------------------------------------------
// Statistics interface
//-----------------------------------------------------------------------------
/** \name Statistics retrieval interface
* Commands for Z-Wave statistics interface.
*/
/*@{*/
public:
/**
* \brief Retrieve statistics from driver
* \param _homeId The Home ID of the driver to obtain counters
* \param _data Pointer to structure DriverData to return values
*/
void GetDriverStatistics( uint32 const _homeId, Driver::DriverData* _data );
/**
* \brief Retrieve statistics per node
* \param _homeId The Home ID of the driver for the node
* \param _nodeId The node number
* \param _data Pointer to structure NodeData to return values
*/
void GetNodeStatistics( uint32 const _homeId, uint8 const _nodeId, Node::NodeData* _data );
};
/*@}*/
} // namespace OpenZWave
#endif // _Manager_H
|