Handle all updates and interfacing between the front-end and back-end
- Source:
Methods
(inner) autosave()
- Source:
Creates a JSON save labled "Autosave"
(inner) checkBraking(basePacket) → {Object}
- Source:
Checks packet for primary and seconday braking status
changes indicators and deletes flags
Parameters:
Name | Type | Description |
---|---|---|
basePacket |
Object | The original packet |
Returns:
fixedPacket The modified packet
- Type
- Object
(inner) checkPackets(input)
- Source:
Checks weather given packet is a HV or LV packet and increments counter accordingly
Parameters:
Name | Type | Description |
---|---|---|
input |
Object | Packet to check |
(inner) checkRecieve()
- Source:
Checks if dashboard has recieved packets within timeout period
If so, sets recieve indicator good and renders to tables
If bad,sets recieve indicator bad and stops rendering to tables
(inner) checkTransmit()
- Source:
Sets LV and HV indicators based on boneStatus
(inner) createDashboard()
- Source:
Function to create the caches and tables and dropdowns of the dash
(inner) displayTimer(timer)
- Source:
Displays the given timer in defined display location
Parameters:
Name | Type | Description |
---|---|---|
timer |
Timer | Displays the timers current time |
(inner) init()
- Source:
Function to run at start of dashboard
(inner) podConnectionCheck()
- Source:
Checks if recieving packets, sends heartbeats to pod, checks if we get call back from pod
Updates Table Lables
(inner) renderData(group, sensor)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
group |
String | Group the sensor belongs to |
sensor |
String | Sensor to modify |
(inner) sendHeartbeats()
- Source:
Sends TCP heartbeats to Pod
(inner) setControlPanelListeners()
- Source:
Creates the states and state machine buttons
(inner) setHVIndicator(state)
- Source:
Sets the HV indicator
Parameters:
Name | Type | Description |
---|---|---|
state |
Boolean | true for ok false for bad |
(inner) setLVIndicator(state)
- Source:
Sets the LV indicator
Parameters:
Name | Type | Description |
---|---|---|
state |
Boolean | true for ok false for bad |
(inner) setRecieve(state)
- Source:
Sets recieve indicators and starts/stops timer based on status
Parameters:
Name | Type | Description |
---|---|---|
state |
Boolean | true for ok false for bad |
(inner) togglePrimBrake(state, call)
- Source:
Toggles the primary braking indicators and calls the
communication call if noted by call
Parameters:
Name | Type | Description |
---|---|---|
state |
Boolean | // True for on, false for off |
call |
Boolean |
(inner) toggleSecBrake(state, call)
- Source:
Toggles the secondary braking indicators and calls the
communication call if noted by call
Parameters:
Name | Type | Description |
---|---|---|
state |
Boolean | // True for on, false for off |
call |
Boolean |
(inner) updateLabels()
- Source:
Updates lables of tables based on recieving packets or not