|
JBImprov
Improv Wi-Fi provisioning over serial and Bluetooth LE
|
Base class for the ways a client can talk to the device. More...
#include <JBImprov.h>
Protected Member Functions | |
| virtual void | begin () |
| Called from JBImprov::begin(). | |
| virtual void | loop () |
| Called from JBImprov::loop(). | |
| virtual void | sendState (JBImprovState state)=0 |
| Report the provisioning state. Called on every change and when asked. | |
| virtual void | sendError (JBImprovError error)=0 |
| Write an error state to the client. Use setError() instead, it skips repeats. | |
| virtual void | sendResult (uint8_t command, const uint8_t *data, uint8_t length)=0 |
Send an RPC result. data holds length prefixed strings. | |
| virtual bool | handleTransportCommand (uint8_t command, const uint8_t *data, uint8_t length) |
| Handle a command whose meaning depends on the transport (0x02). | |
| virtual bool | isAuthorized () |
| true if commands that change the device are allowed now. | |
| virtual void | authorizationUsed () |
| Called after an authorized command was used, to restart an authorization timeout. | |
| virtual bool | scanResultsPerNetwork () |
| void | handleCommand (uint8_t command, const uint8_t *data, uint8_t length) |
| Pass a received RPC command to JBImprov. | |
| void | setError (JBImprovError error) |
| Report an error state if it differs from the last one sent. | |
Protected Attributes | |
| JBImprov * | _improv = nullptr |
| The JBImprov instance this transport was added to. | |
| JBImprovError | _lastError = JBImprovError::None |
| The last error state sent, used by setError(). | |
Friends | |
| class | JBImprov |
Base class for the ways a client can talk to the device.
Applications don't call these methods; they are used by JBImprov.
|
inlineprotectedvirtual |
Called after an authorized command was used, to restart an authorization timeout.
Reimplemented in JBImprovBLE.
|
inlineprotectedvirtual |
Called from JBImprov::begin().
Reimplemented in JBImprovBLE.
|
inlineprotectedvirtual |
Handle a command whose meaning depends on the transport (0x02).
Reimplemented in JBImprovBLE, and JBImprovSerial.
|
inlineprotectedvirtual |
true if commands that change the device are allowed now.
Reimplemented in JBImprovBLE.
|
inlineprotectedvirtual |
Called from JBImprov::loop().
Reimplemented in JBImprovBLE, and JBImprovSerial.
|
inlineprotectedvirtual |
true to send one RPC result per scanned network (serial), false for one combined result (BLE).
Reimplemented in JBImprovSerial.
|
protectedpure virtual |
Write an error state to the client. Use setError() instead, it skips repeats.
Implemented in JBImprovBLE, and JBImprovSerial.
|
protectedpure virtual |
Send an RPC result. data holds length prefixed strings.
Implemented in JBImprovBLE, and JBImprovSerial.
|
protectedpure virtual |
Report the provisioning state. Called on every change and when asked.
Implemented in JBImprovBLE, and JBImprovSerial.