public class NetLogger extends java.lang.Object implements LoggerInterface, SecsEventListener, java.lang.Runnable
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
cvsRev |
| Constructor and Description |
|---|
NetLogger(java.lang.String receiveString,
java.lang.String sendString,
int port) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
displayBytes(byte[] data) |
boolean |
getDisplayBytes() |
boolean |
getDisplayMessages() |
void |
log(java.lang.String msg)
Send the given string to the listening ports.
|
static void |
main(java.lang.String[] args)
Used for debugging only.
|
void |
received(byte[] data)
This will be called wheneever raw bytes of data are read from the port.
|
void |
received(SecsMsg msg)
Called whenever a message is received.
|
void |
register() |
void |
register(SecsEventHandler theHandler) |
void |
registerForId(int id) |
void |
registerForId(SecsEventHandler theHandler,
int id) |
void |
run()
runs the server and waits for input on the selected port.
|
void |
secsEvent(SecsEvent theEvent)
This method will be called when a SecsEvent accurs.
|
void |
sent(byte[] data)
Called whenever data is sent through the port.
|
void |
sent(SecsMsg msg)
Called whenever a message is sent.
|
void |
setDisplayBytes(boolean newValue)
This allows the logger to control the display of byte data.
|
void |
setDisplayEvents(boolean newValue)
This method will turn on the display of all events.
|
void |
setDisplayMessages(boolean newValue)
This allows the logger to control the display of message data.
|
public static final java.lang.String cvsRev
public NetLogger(java.lang.String receiveString,
java.lang.String sendString,
int port)
public java.lang.String displayBytes(byte[] data)
public boolean getDisplayBytes()
public boolean getDisplayMessages()
public void log(java.lang.String msg)
public static void main(java.lang.String[] args)
public void received(byte[] data)
LoggerInterfacereceived in interface LoggerInterfacepublic void received(SecsMsg msg)
LoggerInterfacereceived in interface LoggerInterfacepublic void register()
public void register(SecsEventHandler theHandler)
public void registerForId(int id)
public void registerForId(SecsEventHandler theHandler, int id)
public void run()
run in interface java.lang.Runnablepublic void secsEvent(SecsEvent theEvent)
SecsEventListenersecsEvent in interface SecsEventListenerpublic void sent(byte[] data)
LoggerInterfacesent in interface LoggerInterfacepublic void sent(SecsMsg msg)
LoggerInterfacesent in interface LoggerInterfacepublic void setDisplayBytes(boolean newValue)
LoggerInterfacesetDisplayBytes in interface LoggerInterfacepublic void setDisplayEvents(boolean newValue)
setDisplayEvents in interface LoggerInterfacepublic void setDisplayMessages(boolean newValue)
LoggerInterfacesetDisplayMessages in interface LoggerInterfaceCopyright © 1999-2025 ErgoTech Systems, Inc. All Rights Reserved.