Constructor
new Feedbackstates(logger)
Parameters:
Name |
Type |
Description |
logger |
object
|
logger instance to be used by this class instance. |
- Author:
-
- Source:
Methods
addState(label, callback)
Creates a new feedbackstate in coredatabase table
Parameters:
Name |
Type |
Description |
label |
string
|
of new state |
callback |
function
|
success (true or false) |
- Source:
doesStateExist(stateLabel, callback)
Checks, if a state with label exists in database
Parameters:
Name |
Type |
Description |
stateLabel |
string
|
|
callback |
function
|
null or row of existing state |
- Source:
getAllStates(callback)
Returns all states from core database
Parameters:
Name |
Type |
Description |
callback |
function
|
rows or null |
- Source:
removeState(deviceId, callback)
Parameters:
Name |
Type |
Description |
deviceId |
integer
|
id of device in core database table alertdevices |
callback |
function
|
success (true or false) |
- Source:
setActive(state, callback)
Sets the state of a feedbackState to active
Parameters:
Name |
Type |
Description |
state |
integer
|
id of state in coredatabase to set state for |
callback |
function
|
success (true or false) |
- Source:
setInactive(state, callback)
Sets the state of a feedbackState to inactive
Parameters:
Name |
Type |
Description |
state |
integer
|
id of state in coredatabase to set state for |
callback |
function
|
success (true or false) |
- Source:
updateState(stateId, stateLabel, state, callback)
Update information of an existing state
Parameters:
Name |
Type |
Description |
stateId |
integer
|
id of state to be updated |
stateLabel |
string
|
label of state |
state |
integer
|
state (1 == active, 0 == inactive) |
callback |
function
|
success (true/false) |
- Source: