public class TplEvent extends EventObject
The replies fall into the following categories, discerned by the
string token following the ID. This token is the type and it defines also
the meaning of the third token, here called state. Additionally to these,
some quenched replies due to atuhentication or disconnect request exist.
These replies have no leading ID, but rather immediately start with either
CONNECT or DISCONNECT. Both are not further explained
here.
The main reply object types then fall into these categories:
1234564 COMMAND ERROR SYNTAX1234566 COMMAND ABORTEDBY 123456526920 DATA INLINE TELESCOPE.READY_STATE=0.026921 AUXILIARY.SENSOR[0].DESCRIPTION="Cabinet"26922 DATA INLINE TELESCOPE.READY=FAILED
26920 EVENT WARN AXIS[1]:142 "Speedwarn:23"| Modifier and Type | Field and Description |
|---|---|
static String |
COMMAND
Events following a command.
|
static String |
CONNECT
Connect event, will always get ID=0.
|
static String |
DATA
Events as reseults to data requests/settings.
|
static String |
DEBUG
Event debug error level.
|
static String |
DISCONNECT
Disconnect event, will always get ID=0.
|
static String |
ERROR
Event severe error level.
|
static String |
EVENT
General events not bound to commands or data.
|
private int |
id
The command id this event referes to.
|
private String |
info
The string after the id, type and the event state.
|
static String |
INFO
Event info error level.
|
private Object |
state
The state of the event object.
|
private Object |
type
The event type, one of COMMAND, DATA, EVENT, CONNECT or DISCONNECT.
|
static String |
WARN
Event warn error level.
|
source| Constructor and Description |
|---|
TplEvent(Object source,
String line)
Constructs a new tpl event from the line read.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getID()
Returns the unique integer id-this event follows.
|
String |
getInfo()
Returns any additional info attached to this event as a space-separated
string.
|
Object |
getState()
Returns the state of the event.
|
boolean |
isCommand()
Returns true if this tpl-event is a command type.
|
boolean |
isConnect()
Returns true if this tpl-event is of a general type.
|
boolean |
isData()
Returns true if this tpl-event is of data type.
|
boolean |
isDisconnect()
Returns true if this tpl-event is of a general type.
|
boolean |
isEvent()
Returns true if this tpl-event is of a general type.
|
private void |
parseLine(String read)
Parses the event out of the reply line read.
|
String |
toString()
Return the string representation.
|
getSourcepublic static final String CONNECT
public static final String DISCONNECT
public static final String COMMAND
public static final String DATA
public static final String EVENT
public static final String DEBUG
public static final String INFO
public static final String WARN
public static final String ERROR
private int id
private Object type
private Object state
private String info
public int getID()
public boolean isCommand()
public boolean isData()
public boolean isEvent()
public boolean isDisconnect()
public boolean isConnect()
public Object getState()
public String getInfo()
private void parseLine(String read)
public String toString()
toString in class EventObject