Update Reference.md

This commit is contained in:
HomeSpan 2023-01-13 07:28:52 -06:00 committed by GitHub
parent b453c51458
commit 837818f4cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -276,7 +276,7 @@ The following methods are supported:
* returns a vector of pointers to Services that were added using `addLink()` * returns a vector of pointers to Services that were added using `addLink()`
* useful for creating loops that iterate over all linked Services * useful for creating loops that iterate over all linked Services
* note that the returned vector points to generic SpanServices, which should be re-cast as needed * note that the returned vector points to generic SpanServices, which should be re-cast as needed
* example: `for(auto myValve : faucet::getLinks()) { if((MyValve *)myValve)->active->getVal()) ... }` checks all Valves linked to to a Faucet * example: `for(auto myValve : faucet->getLinks()) { if((MyValve *)myValve)->active->getVal()) ... }` checks all Valves linked to a Faucet
* `virtual boolean update()` * `virtual boolean update()`
* HomeSpan calls this method upon receiving a request from a HomeKit Controller to update one or more Characteristics associated with the Service. Users should override this method with code that implements that requested updates using one or more of the SpanCharacteristic methods below. Method **must** return *true* if update succeeds, or *false* if not. * HomeSpan calls this method upon receiving a request from a HomeKit Controller to update one or more Characteristics associated with the Service. Users should override this method with code that implements that requested updates using one or more of the SpanCharacteristic methods below. Method **must** return *true* if update succeeds, or *false* if not.