classhueplusplus_1_1sensors_1_1_z_g_p_switch.html 36.6 KB
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>hueplusplus: hueplusplus::sensors::ZGPSwitch Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">hueplusplus
   &#160;<span id="projectnumber">1.0.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacehueplusplus.html">hueplusplus</a></li><li class="navelem"><a class="el" href="namespacehueplusplus_1_1sensors.html">sensors</a></li><li class="navelem"><a class="el" href="classhueplusplus_1_1sensors_1_1_z_g_p_switch.html">ZGPSwitch</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-attribs">Static Public Attributes</a> &#124;
<a href="classhueplusplus_1_1sensors_1_1_z_g_p_switch-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">hueplusplus::sensors::ZGPSwitch Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>ZigBee Green Power sensor for button presses.  
 <a href="classhueplusplus_1_1sensors_1_1_z_g_p_switch.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_z_l_l_sensors_8h_source.html">hueplusplus/ZLLSensors.h</a>&gt;</code></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for hueplusplus::sensors::ZGPSwitch:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><img src="classhueplusplus_1_1sensors_1_1_z_g_p_switch__inherit__graph.png" border="0" usemap="#hueplusplus_1_1sensors_1_1_z_g_p_switch_inherit__map" alt="Inheritance graph"/></div>
<map name="hueplusplus_1_1sensors_1_1_z_g_p_switch_inherit__map" id="hueplusplus_1_1sensors_1_1_z_g_p_switch_inherit__map">
<area shape="rect" id="node2" href="classhueplusplus_1_1_base_device.html" title="Base class for physical devices connected to the bridge (sensor or light). " alt="" coords="5,5,191,32"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<div id="dynsection-1" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-1-trigger" src="closed.png" alt="+"/> Collaboration diagram for hueplusplus::sensors::ZGPSwitch:</div>
<div id="dynsection-1-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-1-content" class="dyncontent" style="display:none;">
<div class="center"><img src="classhueplusplus_1_1sensors_1_1_z_g_p_switch__coll__graph.png" border="0" usemap="#hueplusplus_1_1sensors_1_1_z_g_p_switch_coll__map" alt="Collaboration graph"/></div>
<map name="hueplusplus_1_1sensors_1_1_z_g_p_switch_coll__map" id="hueplusplus_1_1sensors_1_1_z_g_p_switch_coll__map">
<area shape="rect" id="node2" href="classhueplusplus_1_1_base_device.html" title="Base class for physical devices connected to the bridge (sensor or light). " alt="" coords="5,95,191,121"/>
<area shape="rect" id="node3" href="classhueplusplus_1_1_a_p_i_cache.html" title="Caches API GET requests and refreshes regularly. " alt="" coords="13,5,183,32"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ac1a74b62d5772679d0a47593a9892ede"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhueplusplus_1_1sensors_1_1_z_g_p_switch.html#ac1a74b62d5772679d0a47593a9892ede">ZGPSwitch</a> (<a class="el" href="classhueplusplus_1_1_sensor.html">Sensor</a> sensor)</td></tr>
<tr class="memdesc:ac1a74b62d5772679d0a47593a9892ede"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct from generic sensor.  <a href="#ac1a74b62d5772679d0a47593a9892ede">More...</a><br /></td></tr>
<tr class="separator:ac1a74b62d5772679d0a47593a9892ede"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1ae003bf07c0104f348a6e85cb66ae6a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhueplusplus_1_1sensors_1_1_z_g_p_switch.html#a1ae003bf07c0104f348a6e85cb66ae6a">isOn</a> () const</td></tr>
<tr class="memdesc:a1ae003bf07c0104f348a6e85cb66ae6a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if sensor is on.  <a href="#a1ae003bf07c0104f348a6e85cb66ae6a">More...</a><br /></td></tr>
<tr class="separator:a1ae003bf07c0104f348a6e85cb66ae6a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aae18648544361a0f641c8e9d6870d66d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhueplusplus_1_1sensors_1_1_z_g_p_switch.html#aae18648544361a0f641c8e9d6870d66d">setOn</a> (bool on)</td></tr>
<tr class="memdesc:aae18648544361a0f641c8e9d6870d66d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable or disable sensor.  <a href="#aae18648544361a0f641c8e9d6870d66d">More...</a><br /></td></tr>
<tr class="separator:aae18648544361a0f641c8e9d6870d66d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a736c8c1c6896793444a4d54675c9daa9"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhueplusplus_1_1sensors_1_1_z_g_p_switch.html#a736c8c1c6896793444a4d54675c9daa9">getButtonEvent</a> () const</td></tr>
<tr class="memdesc:a736c8c1c6896793444a4d54675c9daa9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the code of the last switch event.  <a href="#a736c8c1c6896793444a4d54675c9daa9">More...</a><br /></td></tr>
<tr class="separator:a736c8c1c6896793444a4d54675c9daa9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classhueplusplus_1_1_base_device"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classhueplusplus_1_1_base_device')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classhueplusplus_1_1_base_device.html">hueplusplus::BaseDevice</a></td></tr>
<tr class="memitem:ab08c354ca3eef24240f98267df4ae01a inherit pub_methods_classhueplusplus_1_1_base_device"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhueplusplus_1_1_base_device.html#ab08c354ca3eef24240f98267df4ae01a">~BaseDevice</a> ()=default</td></tr>
<tr class="memdesc:ab08c354ca3eef24240f98267df4ae01a inherit pub_methods_classhueplusplus_1_1_base_device"><td class="mdescLeft">&#160;</td><td class="mdescRight">Virtual destructor.  <a href="classhueplusplus_1_1_base_device.html#ab08c354ca3eef24240f98267df4ae01a">More...</a><br /></td></tr>
<tr class="separator:ab08c354ca3eef24240f98267df4ae01a inherit pub_methods_classhueplusplus_1_1_base_device"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a21122992819e6155867c02578773d0cd inherit pub_methods_classhueplusplus_1_1_base_device"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhueplusplus_1_1_base_device.html#a21122992819e6155867c02578773d0cd">getId</a> () const</td></tr>
<tr class="memdesc:a21122992819e6155867c02578773d0cd inherit pub_methods_classhueplusplus_1_1_base_device"><td class="mdescLeft">&#160;</td><td class="mdescRight">Const function that returns the id of this device.  <a href="classhueplusplus_1_1_base_device.html#a21122992819e6155867c02578773d0cd">More...</a><br /></td></tr>
<tr class="separator:a21122992819e6155867c02578773d0cd inherit pub_methods_classhueplusplus_1_1_base_device"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6741ba9ec72108ca0101d41c0b02c568 inherit pub_methods_classhueplusplus_1_1_base_device"><td class="memItemLeft" align="right" valign="top">virtual std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhueplusplus_1_1_base_device.html#a6741ba9ec72108ca0101d41c0b02c568">getType</a> () const</td></tr>
<tr class="memdesc:a6741ba9ec72108ca0101d41c0b02c568 inherit pub_methods_classhueplusplus_1_1_base_device"><td class="mdescLeft">&#160;</td><td class="mdescRight">Const function that returns the device type.  <a href="classhueplusplus_1_1_base_device.html#a6741ba9ec72108ca0101d41c0b02c568">More...</a><br /></td></tr>
<tr class="separator:a6741ba9ec72108ca0101d41c0b02c568 inherit pub_methods_classhueplusplus_1_1_base_device"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5331ce38f4e6c9def7bafc23112ccd34 inherit pub_methods_classhueplusplus_1_1_base_device"><td class="memItemLeft" align="right" valign="top">virtual std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhueplusplus_1_1_base_device.html#a5331ce38f4e6c9def7bafc23112ccd34">getName</a> ()</td></tr>
<tr class="memdesc:a5331ce38f4e6c9def7bafc23112ccd34 inherit pub_methods_classhueplusplus_1_1_base_device"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function that returns the name of the device.  <a href="classhueplusplus_1_1_base_device.html#a5331ce38f4e6c9def7bafc23112ccd34">More...</a><br /></td></tr>
<tr class="separator:a5331ce38f4e6c9def7bafc23112ccd34 inherit pub_methods_classhueplusplus_1_1_base_device"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a095f4467a072fee3091402e7ed31a6fe inherit pub_methods_classhueplusplus_1_1_base_device"><td class="memItemLeft" align="right" valign="top">virtual std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhueplusplus_1_1_base_device.html#a095f4467a072fee3091402e7ed31a6fe">getName</a> () const</td></tr>
<tr class="memdesc:a095f4467a072fee3091402e7ed31a6fe inherit pub_methods_classhueplusplus_1_1_base_device"><td class="mdescLeft">&#160;</td><td class="mdescRight">Const function that returns the name of the device.  <a href="classhueplusplus_1_1_base_device.html#a095f4467a072fee3091402e7ed31a6fe">More...</a><br /></td></tr>
<tr class="separator:a095f4467a072fee3091402e7ed31a6fe inherit pub_methods_classhueplusplus_1_1_base_device"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa7572be90ab966033ad8b9c7e83598ce inherit pub_methods_classhueplusplus_1_1_base_device"><td class="memItemLeft" align="right" valign="top">virtual std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhueplusplus_1_1_base_device.html#aa7572be90ab966033ad8b9c7e83598ce">getModelId</a> () const</td></tr>
<tr class="memdesc:aa7572be90ab966033ad8b9c7e83598ce inherit pub_methods_classhueplusplus_1_1_base_device"><td class="mdescLeft">&#160;</td><td class="mdescRight">Const function that returns the modelid of the device.  <a href="classhueplusplus_1_1_base_device.html#aa7572be90ab966033ad8b9c7e83598ce">More...</a><br /></td></tr>
<tr class="separator:aa7572be90ab966033ad8b9c7e83598ce inherit pub_methods_classhueplusplus_1_1_base_device"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a821dc52df6472b2604f56579dac4ac04 inherit pub_methods_classhueplusplus_1_1_base_device"><td class="memItemLeft" align="right" valign="top">virtual std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhueplusplus_1_1_base_device.html#a821dc52df6472b2604f56579dac4ac04">getUId</a> () const</td></tr>
<tr class="memdesc:a821dc52df6472b2604f56579dac4ac04 inherit pub_methods_classhueplusplus_1_1_base_device"><td class="mdescLeft">&#160;</td><td class="mdescRight">Const function that returns the uniqueid of the device.  <a href="classhueplusplus_1_1_base_device.html#a821dc52df6472b2604f56579dac4ac04">More...</a><br /></td></tr>
<tr class="separator:a821dc52df6472b2604f56579dac4ac04 inherit pub_methods_classhueplusplus_1_1_base_device"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad6e1af663e4f14afc6293aacdd5130c0 inherit pub_methods_classhueplusplus_1_1_base_device"><td class="memItemLeft" align="right" valign="top">virtual std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhueplusplus_1_1_base_device.html#ad6e1af663e4f14afc6293aacdd5130c0">getManufacturername</a> () const</td></tr>
<tr class="memdesc:ad6e1af663e4f14afc6293aacdd5130c0 inherit pub_methods_classhueplusplus_1_1_base_device"><td class="mdescLeft">&#160;</td><td class="mdescRight">Const function that returns the manufacturername of the device.  <a href="classhueplusplus_1_1_base_device.html#ad6e1af663e4f14afc6293aacdd5130c0">More...</a><br /></td></tr>
<tr class="separator:ad6e1af663e4f14afc6293aacdd5130c0 inherit pub_methods_classhueplusplus_1_1_base_device"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a53f675db31058c574fbf55baea8bd556 inherit pub_methods_classhueplusplus_1_1_base_device"><td class="memItemLeft" align="right" valign="top">virtual std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhueplusplus_1_1_base_device.html#a53f675db31058c574fbf55baea8bd556">getProductname</a> () const</td></tr>
<tr class="memdesc:a53f675db31058c574fbf55baea8bd556 inherit pub_methods_classhueplusplus_1_1_base_device"><td class="mdescLeft">&#160;</td><td class="mdescRight">Const function that returns the productname of the device.  <a href="classhueplusplus_1_1_base_device.html#a53f675db31058c574fbf55baea8bd556">More...</a><br /></td></tr>
<tr class="separator:a53f675db31058c574fbf55baea8bd556 inherit pub_methods_classhueplusplus_1_1_base_device"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aebc5484b45b833491385a5381e3234bb inherit pub_methods_classhueplusplus_1_1_base_device"><td class="memItemLeft" align="right" valign="top">virtual std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhueplusplus_1_1_base_device.html#aebc5484b45b833491385a5381e3234bb">getSwVersion</a> ()</td></tr>
<tr class="memdesc:aebc5484b45b833491385a5381e3234bb inherit pub_methods_classhueplusplus_1_1_base_device"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function that returns the software version of the device.  <a href="classhueplusplus_1_1_base_device.html#aebc5484b45b833491385a5381e3234bb">More...</a><br /></td></tr>
<tr class="separator:aebc5484b45b833491385a5381e3234bb inherit pub_methods_classhueplusplus_1_1_base_device"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a136cdba60a6781c15c6869ddcc7f2e1a inherit pub_methods_classhueplusplus_1_1_base_device"><td class="memItemLeft" align="right" valign="top">virtual std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhueplusplus_1_1_base_device.html#a136cdba60a6781c15c6869ddcc7f2e1a">getSwVersion</a> () const</td></tr>
<tr class="memdesc:a136cdba60a6781c15c6869ddcc7f2e1a inherit pub_methods_classhueplusplus_1_1_base_device"><td class="mdescLeft">&#160;</td><td class="mdescRight">Const function that returns the software version of the device.  <a href="classhueplusplus_1_1_base_device.html#a136cdba60a6781c15c6869ddcc7f2e1a">More...</a><br /></td></tr>
<tr class="separator:a136cdba60a6781c15c6869ddcc7f2e1a inherit pub_methods_classhueplusplus_1_1_base_device"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab7554114eee573ab784c44d53f439028 inherit pub_methods_classhueplusplus_1_1_base_device"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhueplusplus_1_1_base_device.html#ab7554114eee573ab784c44d53f439028">setName</a> (const std::string &amp;name)</td></tr>
<tr class="memdesc:ab7554114eee573ab784c44d53f439028 inherit pub_methods_classhueplusplus_1_1_base_device"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function that sets the name of the device.  <a href="classhueplusplus_1_1_base_device.html#ab7554114eee573ab784c44d53f439028">More...</a><br /></td></tr>
<tr class="separator:ab7554114eee573ab784c44d53f439028 inherit pub_methods_classhueplusplus_1_1_base_device"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa6ac28ae3879a41ace1cd6806ca9a2f1 inherit pub_methods_classhueplusplus_1_1_base_device"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhueplusplus_1_1_base_device.html#aa6ac28ae3879a41ace1cd6806ca9a2f1">refresh</a> (bool force=false)</td></tr>
<tr class="memdesc:aa6ac28ae3879a41ace1cd6806ca9a2f1 inherit pub_methods_classhueplusplus_1_1_base_device"><td class="mdescLeft">&#160;</td><td class="mdescRight">Refreshes internal cached state.  <a href="classhueplusplus_1_1_base_device.html#aa6ac28ae3879a41ace1cd6806ca9a2f1">More...</a><br /></td></tr>
<tr class="separator:aa6ac28ae3879a41ace1cd6806ca9a2f1 inherit pub_methods_classhueplusplus_1_1_base_device"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5dd630da2c99842700d555788c0b75b1 inherit pub_methods_classhueplusplus_1_1_base_device"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhueplusplus_1_1_base_device.html#a5dd630da2c99842700d555788c0b75b1">setRefreshDuration</a> (std::chrono::steady_clock::duration refreshDuration)</td></tr>
<tr class="memdesc:a5dd630da2c99842700d555788c0b75b1 inherit pub_methods_classhueplusplus_1_1_base_device"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets custom refresh interval for this device.  <a href="classhueplusplus_1_1_base_device.html#a5dd630da2c99842700d555788c0b75b1">More...</a><br /></td></tr>
<tr class="separator:a5dd630da2c99842700d555788c0b75b1 inherit pub_methods_classhueplusplus_1_1_base_device"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-attribs"></a>
Static Public Attributes</h2></td></tr>
<tr class="memitem:a217c7b22366aa74fa4e1be768f69ebfa"><td class="memItemLeft" align="right" valign="top">static constexpr int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhueplusplus_1_1sensors_1_1_z_g_p_switch.html#a217c7b22366aa74fa4e1be768f69ebfa">c_button1</a> = 34</td></tr>
<tr class="memdesc:a217c7b22366aa74fa4e1be768f69ebfa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Code for tap button 1.  <a href="#a217c7b22366aa74fa4e1be768f69ebfa">More...</a><br /></td></tr>
<tr class="separator:a217c7b22366aa74fa4e1be768f69ebfa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7492028e93635836d736b040eb1d1e87"><td class="memItemLeft" align="right" valign="top">static constexpr int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhueplusplus_1_1sensors_1_1_z_g_p_switch.html#a7492028e93635836d736b040eb1d1e87">c_button2</a> = 16</td></tr>
<tr class="memdesc:a7492028e93635836d736b040eb1d1e87"><td class="mdescLeft">&#160;</td><td class="mdescRight">Code for tap button 2.  <a href="#a7492028e93635836d736b040eb1d1e87">More...</a><br /></td></tr>
<tr class="separator:a7492028e93635836d736b040eb1d1e87"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8aa09f0d86e1aa9c063a183bc64ee8a8"><td class="memItemLeft" align="right" valign="top">static constexpr int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhueplusplus_1_1sensors_1_1_z_g_p_switch.html#a8aa09f0d86e1aa9c063a183bc64ee8a8">c_button3</a> = 17</td></tr>
<tr class="memdesc:a8aa09f0d86e1aa9c063a183bc64ee8a8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Code for tap button 3.  <a href="#a8aa09f0d86e1aa9c063a183bc64ee8a8">More...</a><br /></td></tr>
<tr class="separator:a8aa09f0d86e1aa9c063a183bc64ee8a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7eacb689dd3a8776a407bbc1291f147b"><td class="memItemLeft" align="right" valign="top">static constexpr int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhueplusplus_1_1sensors_1_1_z_g_p_switch.html#a7eacb689dd3a8776a407bbc1291f147b">c_button4</a> = 18</td></tr>
<tr class="memdesc:a7eacb689dd3a8776a407bbc1291f147b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Code for tap button 4.  <a href="#a7eacb689dd3a8776a407bbc1291f147b">More...</a><br /></td></tr>
<tr class="separator:a7eacb689dd3a8776a407bbc1291f147b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa991714df25bad7e99cc387c500ddf77"><td class="memItemLeft" align="right" valign="top">static constexpr const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhueplusplus_1_1sensors_1_1_z_g_p_switch.html#aa991714df25bad7e99cc387c500ddf77">typeStr</a> = &quot;ZGPSwitch&quot;</td></tr>
<tr class="memdesc:aa991714df25bad7e99cc387c500ddf77"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classhueplusplus_1_1sensors_1_1_z_g_p_switch.html" title="ZigBee Green Power sensor for button presses. ">ZGPSwitch</a> sensor type name.  <a href="#aa991714df25bad7e99cc387c500ddf77">More...</a><br /></td></tr>
<tr class="separator:aa991714df25bad7e99cc387c500ddf77"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pro_methods_classhueplusplus_1_1_base_device"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_classhueplusplus_1_1_base_device')"><img src="closed.png" alt="-"/>&#160;Protected Member Functions inherited from <a class="el" href="classhueplusplus_1_1_base_device.html">hueplusplus::BaseDevice</a></td></tr>
<tr class="memitem:a48bf88e758fd7191c599a46751755c97 inherit pro_methods_classhueplusplus_1_1_base_device"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhueplusplus_1_1_base_device.html#a48bf88e758fd7191c599a46751755c97">BaseDevice</a> (int <a class="el" href="classhueplusplus_1_1_base_device.html#aa65a31223cfa2a054c28148c35c8b3cf">id</a>, const std::shared_ptr&lt; <a class="el" href="classhueplusplus_1_1_a_p_i_cache.html">APICache</a> &gt; &amp;baseCache)</td></tr>
<tr class="memdesc:a48bf88e758fd7191c599a46751755c97 inherit pro_methods_classhueplusplus_1_1_base_device"><td class="mdescLeft">&#160;</td><td class="mdescRight">Protected ctor that is used by subclasses, construct with shared cache.  <a href="classhueplusplus_1_1_base_device.html#a48bf88e758fd7191c599a46751755c97">More...</a><br /></td></tr>
<tr class="separator:a48bf88e758fd7191c599a46751755c97 inherit pro_methods_classhueplusplus_1_1_base_device"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaa90386c0cea99464dee6bedb2c68254 inherit pro_methods_classhueplusplus_1_1_base_device"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhueplusplus_1_1_base_device.html#aaa90386c0cea99464dee6bedb2c68254">BaseDevice</a> (int <a class="el" href="classhueplusplus_1_1_base_device.html#aa65a31223cfa2a054c28148c35c8b3cf">id</a>, const <a class="el" href="classhueplusplus_1_1_hue_command_a_p_i.html">HueCommandAPI</a> &amp;commands, const std::string &amp;path, std::chrono::steady_clock::duration refreshDuration, const nlohmann::json &amp;currentState)</td></tr>
<tr class="memdesc:aaa90386c0cea99464dee6bedb2c68254 inherit pro_methods_classhueplusplus_1_1_base_device"><td class="mdescLeft">&#160;</td><td class="mdescRight">Protected ctor that is used by subclasses.  <a href="classhueplusplus_1_1_base_device.html#aaa90386c0cea99464dee6bedb2c68254">More...</a><br /></td></tr>
<tr class="separator:aaa90386c0cea99464dee6bedb2c68254 inherit pro_methods_classhueplusplus_1_1_base_device"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac8089e8f00d426427ed2fc7f6b817082 inherit pro_methods_classhueplusplus_1_1_base_device"><td class="memItemLeft" align="right" valign="top">virtual nlohmann::json&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhueplusplus_1_1_base_device.html#ac8089e8f00d426427ed2fc7f6b817082">sendPutRequest</a> (const std::string &amp;subPath, const nlohmann::json &amp;request, <a class="el" href="structhueplusplus_1_1_file_info.html">FileInfo</a> fileInfo)</td></tr>
<tr class="memdesc:ac8089e8f00d426427ed2fc7f6b817082 inherit pro_methods_classhueplusplus_1_1_base_device"><td class="mdescLeft">&#160;</td><td class="mdescRight">Utility function to send a put request to the device.  <a href="classhueplusplus_1_1_base_device.html#ac8089e8f00d426427ed2fc7f6b817082">More...</a><br /></td></tr>
<tr class="separator:ac8089e8f00d426427ed2fc7f6b817082 inherit pro_methods_classhueplusplus_1_1_base_device"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_attribs_classhueplusplus_1_1_base_device"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_classhueplusplus_1_1_base_device')"><img src="closed.png" alt="-"/>&#160;Protected Attributes inherited from <a class="el" href="classhueplusplus_1_1_base_device.html">hueplusplus::BaseDevice</a></td></tr>
<tr class="memitem:aa65a31223cfa2a054c28148c35c8b3cf inherit pro_attribs_classhueplusplus_1_1_base_device"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhueplusplus_1_1_base_device.html#aa65a31223cfa2a054c28148c35c8b3cf">id</a></td></tr>
<tr class="memdesc:aa65a31223cfa2a054c28148c35c8b3cf inherit pro_attribs_classhueplusplus_1_1_base_device"><td class="mdescLeft">&#160;</td><td class="mdescRight">holds the id of the device  <a href="classhueplusplus_1_1_base_device.html#aa65a31223cfa2a054c28148c35c8b3cf">More...</a><br /></td></tr>
<tr class="separator:aa65a31223cfa2a054c28148c35c8b3cf inherit pro_attribs_classhueplusplus_1_1_base_device"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a526b63fa6eb1c9dc9a7b1926ad0be27a inherit pro_attribs_classhueplusplus_1_1_base_device"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classhueplusplus_1_1_a_p_i_cache.html">APICache</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhueplusplus_1_1_base_device.html#a526b63fa6eb1c9dc9a7b1926ad0be27a">state</a></td></tr>
<tr class="memdesc:a526b63fa6eb1c9dc9a7b1926ad0be27a inherit pro_attribs_classhueplusplus_1_1_base_device"><td class="mdescLeft">&#160;</td><td class="mdescRight">holds the current state of the device  <a href="classhueplusplus_1_1_base_device.html#a526b63fa6eb1c9dc9a7b1926ad0be27a">More...</a><br /></td></tr>
<tr class="separator:a526b63fa6eb1c9dc9a7b1926ad0be27a inherit pro_attribs_classhueplusplus_1_1_base_device"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>ZigBee Green Power sensor for button presses. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="ac1a74b62d5772679d0a47593a9892ede"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac1a74b62d5772679d0a47593a9892ede">&#9670;&nbsp;</a></span>ZGPSwitch()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">hueplusplus::sensors::ZGPSwitch::ZGPSwitch </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classhueplusplus_1_1_sensor.html">Sensor</a>&#160;</td>
          <td class="paramname"><em>sensor</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Construct from generic sensor. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a736c8c1c6896793444a4d54675c9daa9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a736c8c1c6896793444a4d54675c9daa9">&#9670;&nbsp;</a></span>getButtonEvent()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int hueplusplus::sensors::ZGPSwitch::getButtonEvent </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the code of the last switch event. </p>
<p>Possible values are <a class="el" href="classhueplusplus_1_1sensors_1_1_z_g_p_switch.html#a217c7b22366aa74fa4e1be768f69ebfa">c_button1</a> etc., or any other value. </p>

</div>
</div>
<a id="a1ae003bf07c0104f348a6e85cb66ae6a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1ae003bf07c0104f348a6e85cb66ae6a">&#9670;&nbsp;</a></span>isOn()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool hueplusplus::sensors::ZGPSwitch::isOn </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Check if sensor is on. </p>
<p>Sensors which are off do not change their status </p>

</div>
</div>
<a id="aae18648544361a0f641c8e9d6870d66d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aae18648544361a0f641c8e9d6870d66d">&#9670;&nbsp;</a></span>setOn()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void hueplusplus::sensors::ZGPSwitch::setOn </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>on</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enable or disable sensor. </p>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::system_error</td><td>when system or socket operations fail </td></tr>
    <tr><td class="paramname"><a class="el" href="classhueplusplus_1_1_hue_exception.html" title="Exception class with file information. Base class of all custom exception classes. ">HueException</a></td><td>when response contained no body </td></tr>
    <tr><td class="paramname"><a class="el" href="classhueplusplus_1_1_hue_a_p_i_response_exception.html" title="Exception caused by a Hue API &quot;error&quot; response with additional information. ">HueAPIResponseException</a></td><td>when response contains an error </td></tr>
    <tr><td class="paramname">nlohmann::json::parse_error</td><td>when response could not be parsed </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a217c7b22366aa74fa4e1be768f69ebfa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a217c7b22366aa74fa4e1be768f69ebfa">&#9670;&nbsp;</a></span>c_button1</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">constexpr int hueplusplus::sensors::ZGPSwitch::c_button1 = 34</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Code for tap button 1. </p>

</div>
</div>
<a id="a7492028e93635836d736b040eb1d1e87"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7492028e93635836d736b040eb1d1e87">&#9670;&nbsp;</a></span>c_button2</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">constexpr int hueplusplus::sensors::ZGPSwitch::c_button2 = 16</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Code for tap button 2. </p>

</div>
</div>
<a id="a8aa09f0d86e1aa9c063a183bc64ee8a8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8aa09f0d86e1aa9c063a183bc64ee8a8">&#9670;&nbsp;</a></span>c_button3</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">constexpr int hueplusplus::sensors::ZGPSwitch::c_button3 = 17</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Code for tap button 3. </p>

</div>
</div>
<a id="a7eacb689dd3a8776a407bbc1291f147b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7eacb689dd3a8776a407bbc1291f147b">&#9670;&nbsp;</a></span>c_button4</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">constexpr int hueplusplus::sensors::ZGPSwitch::c_button4 = 18</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Code for tap button 4. </p>

</div>
</div>
<a id="aa991714df25bad7e99cc387c500ddf77"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa991714df25bad7e99cc387c500ddf77">&#9670;&nbsp;</a></span>typeStr</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">constexpr const char * hueplusplus::sensors::ZGPSwitch::typeStr = &quot;ZGPSwitch&quot;</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p><a class="el" href="classhueplusplus_1_1sensors_1_1_z_g_p_switch.html" title="ZigBee Green Power sensor for button presses. ">ZGPSwitch</a> sensor type name. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>include/hueplusplus/<a class="el" href="_z_l_l_sensors_8h_source.html">ZLLSensors.h</a></li>
<li>src/<a class="el" href="_z_l_l_sensors_8cpp.html">ZLLSensors.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>