public final class Processing
extends java.lang.Object
Constructor and Description |
---|
Processing() |
Modifier and Type | Method and Description |
---|---|
static void |
closeDevices(Server server,
Raspberry rpi)
closeDevices: this method close all OUT devices of the Raspberry.
|
static Device |
digital2Volt(Device device)
digital2Volt: this method return the device passed as parameter, but with the data converted
from the digital value read to Volts.
|
static void |
execCommandLinux(java.lang.String command)
execCommandLinux: this method exec linux command.
|
static int |
getNTCParameterValue(java.lang.String ntc,
java.lang.String value)
getNTCParameterValue: return the value of one parameter from the NTC.
|
static java.lang.String |
NTC2Temp(Device device)
NTC2Temp: this method return the temperature of the device passed as parameter.
|
static Response |
processPOSTCommand(ServerStatus server,
Raspberry rpi,
Request objRequest)
processPOSTCommand: this method process the command send by POST http method
|
static void |
shutdown(java.lang.String opt)
shutdown: this method exec a shutdown or a restart command.
|
static ServerStatus |
updateServer(ServerStatus server,
java.lang.String strStatus)
updateServer: This method update the global status stored in this server.
|
static ServerStatus |
updateStatus(ServerStatus server,
Raspberry rpi)
updateStatus: this method update the server status.
|
static Device |
volt2Omh(Device device)
volt2Omh: this method return the device passed as parameter, but with the data converted
from Volts to Ohmns.
|
public static Response processPOSTCommand(ServerStatus server, Raspberry rpi, Request objRequest)
server
- Server with the logical devices.rpi
- Object who represents the actual hardware.objRequest
- Object with the requestpublic static ServerStatus updateStatus(ServerStatus server, Raspberry rpi)
server
- Server with the logical devices.rpi
- Object who represents the actual hardware.public static ServerStatus updateServer(ServerStatus server, java.lang.String strStatus)
server
- Server object to update with the global status.strStatus
- String with the status serialized in JSON.public static void shutdown(java.lang.String opt)
opt
- String with the option.public static void execCommandLinux(java.lang.String command)
command
- String with the command to exec.public static Device digital2Volt(Device device)
device
- to get the voltage from the digital value readed for the ADC.public static Device volt2Omh(Device device)
device
- to get the resistance from the voltagepublic static java.lang.String NTC2Temp(Device device)
device
- Device to obtain the temperature.public static int getNTCParameterValue(java.lang.String ntc, java.lang.String value)
ntc
- NTC to get the characteristic parameter.value
- Name of the characteristic parameter.