Differentiate peripheral errors: request vs. disconnect ()

* Beginning to add differentiation for hardware disconnect alerts.

* Set connected status after error is sent.
This commit is contained in:
Evelyn Eastmond 2018-10-17 15:48:07 -04:00 committed by Eric Rosenbaum
parent 899ce56214
commit 2564b24d71
4 changed files with 60 additions and 25 deletions
src/engine

View file

@ -457,11 +457,19 @@ class Runtime extends EventEmitter {
}
/**
* Event name for reporting that a peripheral has encountered an error.
* Event name for reporting that a peripheral has encountered a request error.
* @const {string}
*/
static get PERIPHERAL_ERROR () {
return 'PERIPHERAL_ERROR';
static get PERIPHERAL_REQUEST_ERROR () {
return 'PERIPHERAL_REQUEST_ERROR';
}
/**
* Event name for reporting that a peripheral has encountered a disconnect error.
* @const {string}
*/
static get PERIPHERAL_DISCONNECT_ERROR () {
return 'PERIPHERAL_DISCONNECT_ERROR';
}
/**