Update Reference.md

This commit is contained in:
HomeSpan 2020-11-25 19:30:37 -06:00 committed by GitHub
parent aed2936b11
commit 16636f0ec3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

@ -6,9 +6,9 @@ The HomeSpan Library is invoked by including *HomeSpan.h* in your Arduino sketch
#include "HomeSpan.h" #include "HomeSpan.h"
``` ```
## *homeSpan* (object) ## *homeSpan*
At runtime this HomeSpan will create a global object named `homeSpan` that supports the following methods: At runtime this HomeSpan will create a global **object** named `homeSpan` that supports the following methods:
* `void begin(Category catID, char *displayName, char *hostNameBase, char *modelName)` * `void begin(Category catID, char *displayName, char *hostNameBase, char *modelName)`
* initializes HomeSpan * initializes HomeSpan
@ -54,18 +54,18 @@ The following **optional** `homeSpan` methods override various HomeSpan initiali
* `void setMaxConnections(uint8_t nCon)` * `void setMaxConnections(uint8_t nCon)`
* sets the maximum number of HAP Controllers that be simultaneously connected to HomeSpan (default=8) * sets the maximum number of HAP Controllers that be simultaneously connected to HomeSpan (default=8)
## *SpanAccessory()* (class) ## *SpanAccessory()*
Creating an instance of this class add a new HAP Accessory to the HomeSpan HAP Database. Creating an instance of this **class** add a new HAP Accessory to the HomeSpan HAP Database.
* every HomeSpan sketch requires at least one Accessory * every HomeSpan sketch requires at least one Accessory
* there are no arguments or associated methods * there are no arguments or associated methods
* you must call `homeSpan.begin()` before instantiating any Accessories * you must call `homeSpan.begin()` before instantiating any Accessories
* example: `new SpanAccessory();` * example: `new SpanAccessory();`
## *SpanService()* (base class) ## *SpanService()*
This is a **base class** from which all HomeSpan Services are derived. To create a new Service, instantiate one of HomeSpan Services defined in the Service namespace This is a **base class** from which all HomeSpan Services are derived, and should not be directly instantiated. Rather, to create a new Service, instantiate one of HomeSpan Services defined in the [Service](ServiceList.md) namespace.
* `SpanService()` * `SpanService()`