Update Reference.md

This commit is contained in:
HomeSpan 2021-11-11 21:12:47 -06:00 committed by GitHub
parent 6801dfe4c8
commit 8ffb62715e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 19 additions and 0 deletions

View File

@ -234,6 +234,25 @@ The following methods are supported:
* returns a pointer to the Characteristic itself so that the method can be chained during instantiation
* example: `(new Characteristic::SecuritySystemTargetState())->setValidValues(3,0,1,3);` creates a new Valid Value list of length=3 containing the values 0, 1, and 3. This has the effect of informing HomeKit that a SecuritySystemTargetState value of 2 (Night Arm) is not valid and should not be shown as a choice in the Home App
* `SpanCharacteristic *setPerms(uint8_t perms)`
* changes the default permissions for a Characteristic to *perms*, where
* *perms* - additive list of permissions as described in HAP-R2 Table 6-4. Valid values are PR, PW, EV, AA, TW, HD, and WR
* returns a pointer to the Characteristic itself so that the method can be chained during instantiation
* example: `(new Characteristic::IsConfigured(1))->setPerms(PW+PR+EV);`
* `SpanCharacteristic *addPerms(uint8_t perms)`
* adds new permissions, *perms*, to the default permissions for a Characteristic, where
* *perms* - additive list of permissions as described in HAP-R2 Table 6-4. Valid values are PR, PW, EV, AA, TW, HD, and WR
* returns a pointer to the Characteristic itself so that the method can be chained during instantiation
* example: `(new Characteristic::IsConfigured(1))->addPerms(PW);`
* `SpanCharacteristic *removePerms(uint8_t perms)`
* removes permissions, *perms*, from the default permissions of a Characteristic, where
* *perms* - additive list of permissions as described in HAP-R2 Table 6-4. Valid values are PR, PW, EV, AA, TW, HD, and WR
* returns a pointer to the Characteristic itself so that the method can be chained during instantiation
* example: `(new Characteristic::ConfiguredName("HDMI 1"))->removePerms(PW);`
## *SpanButton(int pin, uint16_t longTime, uint16_t singleTime, uint16_t doubleTime)*
Creating an instance of this **class** attaches a pushbutton handler to the ESP32 *pin* specified.