public class SCADASystem
extends java.lang.Object
implements java.lang.Runnable
Constructor and Description |
---|
SCADASystem(DBHandler dbhandler,
boolean desktopApp)
The constructor will create a new instance of a SCADASystem
|
Modifier and Type | Method and Description |
---|---|
java.util.HashMap<java.lang.String,Sensor> |
getCustomMapping()
This method returns the mapping of the sensors for use in other applications, effectively the same as getMap
however this method returns tag based instead of backend ID based.
|
java.util.ArrayList<Equation> |
getEquations()
This method returns all of the equations found in the DB
|
java.util.HashMap<java.lang.Integer,Sensor> |
getMap()
This method returns the mapping of the sensors for use in other applications
|
void |
run()
Used by the thread runners.
|
void |
toggleDataSave(java.lang.Boolean bool)
Sets whether or not the system shoulk store data into the db
|
void |
updateData(java.lang.Integer address,
java.util.ArrayList<java.lang.String> packets)
This method updates the values of all of the sensors in the system.
|
public SCADASystem(DBHandler dbhandler, boolean desktopApp)
dbhandler
- The database handler that is connected to the SCADA.dbdesktopApp
- True if desktop, false if notpublic java.util.HashMap<java.lang.String,Sensor> getCustomMapping()
public java.util.ArrayList<Equation> getEquations()
public java.util.HashMap<java.lang.Integer,Sensor> getMap()
public void run()
run
in interface java.lang.Runnable
public void toggleDataSave(java.lang.Boolean bool)
bool
- True for store false for view onlypublic void updateData(java.lang.Integer address, java.util.ArrayList<java.lang.String> packets)
address
- The can address that was receivedpackets
- The data received over the can