public class Server
extends java.lang.Object
Constructor and Description |
---|
Server() |
Modifier and Type | Method and Description |
---|---|
void |
addDevice(Device device)
addDevice: This add a Device to the list of devices in the Server
|
int |
getConfigTimerAutonomousRunEvery()
getConfigTimerAutonomousRunEvery: get the value who indicates how long run the Autonomous mode timer.
|
int |
getConfigTimerAutonomousWaitStart()
getConfigTimerAutonomousWaitStart: get the time to wait before the Autonomous mode start.
|
int |
getConfigTimerAutonomousWaitTime()
getConfigTimerAutonomousWaitTime: get the difference of time without connection, before start autonomous mode.
|
int |
getConfigTimerLEDRunEvery()
getConfigTimerLEDRunEvery: get the value who indicates how long run the LED Display timer.
|
int |
getConfigTimerLEDWaitStart()
getConfigTimerLEDWaitStart: get the time to wait before the LED Display start.
|
Device |
getDevice(int pos)
getDevice: returns the device in the position specified.
|
Device |
getDevice(java.lang.String name)
getDevice: returns the device whose name matches with the parameter.
|
java.lang.String |
getIdentifier()
getIdentifier: get the identifier (name) of the server.
|
java.lang.String |
getIpAddress()
getIpAddress: get the IP address of the server.
|
java.lang.String |
getLastCommand()
getLastCommand: return the last command received on the server
|
java.util.Date |
getLastConnDate()
getLastConnDate: get the last connection Date.
|
java.lang.String |
getLastResponse()
getLastResponse: return the last command response sent by the server.
|
java.util.ArrayList<Device> |
getListDevices()
getListDevices: return the list of devices.
|
int |
getNumDevices()
getNumDevices: return the number of devices on this server.
|
boolean |
getOnline()
getOnline: get the status of the server.
|
java.lang.Integer |
getPort()
getPort: get the port of the server.
|
void |
setConfigTimerAutonomousRunEvery(int configTimerAutonomousRunEvery)
setConfigTimerAutonomousRunEvery: set the value who indicates how long run the Autonomous mode timer.
|
void |
setConfigTimerAutonomousWaitStart(int configTimerAutonomousWaitStart)
setConfigTimerAutonomousWaitStart: set the time to wait before the Autonomous mode start.
|
void |
setConfigTimerAutonomousWaitTime(int configTimerAutonomousWaitTime)
setConfigTimerAutonomousWaitTime: Set the difference of time without connection, before start autonomous mode.
|
void |
setConfigTimerLEDRunEvery(int configTimerLEDRunEvery)
setConfigTimerLEDRunEvery: set the value who indicates how long run the LED Display timer.
|
void |
setConfigTimerLEDWaitStart(int configTimerLEDWaitStart)
setConfigTimerLEDWaitStart: set the time to wait before the LED Display start.
|
void |
setIdentifier(java.lang.String identifier)
setIdentifier: set the identifier (name) of the server.
|
void |
setIpAddress(java.lang.String ipAddress)
setIpAddress: set the IP address of the server.
|
void |
setLastCommand(java.lang.String lastCommand)
setLastCommand: set the last command received on the server
|
void |
setLastConnDate()
setLastConnDate: set the last connection Date.
|
void |
setLastConnDate(java.util.Date lastConnDate)
setLastConnDate: set the last connection Date.
|
void |
setLastResponse(java.lang.String lastResponse)
setLastResponse: set the last command response sent by the server.
|
void |
setOnline(boolean Online)
setOnline: set the status of the server.
|
void |
setPort(java.lang.Integer port)
setPort: set the port of the server.
|
java.lang.String |
toString()
toString:
|
void |
updateDevice(Device device)
updateDevice: update the device in the device list, searching their position by their name.
|
int |
updateDevice(Device device,
int pos)
updateDevice: update the device in the specified position.
|
public java.lang.String getIdentifier()
public void setIdentifier(java.lang.String identifier)
identifier
- the identifier to setpublic java.lang.String getIpAddress()
public void setIpAddress(java.lang.String ipAddress)
ipAddress
- the ipAddress to setpublic java.lang.Integer getPort()
public void setPort(java.lang.Integer port)
port
- the port to setpublic boolean getOnline()
public void setOnline(boolean Online)
Online
- the dateOnline to setpublic java.util.Date getLastConnDate()
public void setLastConnDate(java.util.Date lastConnDate)
lastConnDate
- the lastConnDate to setpublic void setLastConnDate()
public java.lang.String getLastCommand()
public void setLastCommand(java.lang.String lastCommand)
lastCommand
- the lastCommand to setpublic java.lang.String getLastResponse()
public void setLastResponse(java.lang.String lastResponse)
lastResponse
- the lastResponse to setpublic void addDevice(Device device)
device
- Device to add.public int updateDevice(Device device, int pos)
device
- Device to update.pos
- Position of the device to update.public void updateDevice(Device device)
device
- to update.public int getNumDevices()
public java.util.ArrayList<Device> getListDevices()
public Device getDevice(int pos)
pos
- Positionpublic Device getDevice(java.lang.String name)
name
- string with the name of the device to search.public int getConfigTimerLEDWaitStart()
public void setConfigTimerLEDWaitStart(int configTimerLEDWaitStart)
configTimerLEDWaitStart
- the configTimerLEDWaitStart to setpublic int getConfigTimerLEDRunEvery()
public void setConfigTimerLEDRunEvery(int configTimerLEDRunEvery)
configTimerLEDRunEvery
- the configTimerLEDRunEvery to setpublic int getConfigTimerAutonomousWaitStart()
public void setConfigTimerAutonomousWaitStart(int configTimerAutonomousWaitStart)
configTimerAutonomousWaitStart
- the configTimerAutonomousWaitStart to setpublic int getConfigTimerAutonomousRunEvery()
public void setConfigTimerAutonomousRunEvery(int configTimerAutonomousRunEvery)
configTimerAutonomousRunEvery
- the configTimerAutonomousRunEvery to setpublic int getConfigTimerAutonomousWaitTime()
public void setConfigTimerAutonomousWaitTime(int configTimerAutonomousWaitTime)
configTimerAutonomousWaitTime
- the configTimerAutonomousWaitTime to setpublic java.lang.String toString()
toString
in class java.lang.Object