public class RS485Scan extends RS485ReadWriteServer
KEY_MAXADDRESS are scanned in a way that the read-configuration
command KEY_CONFIG is sent for each address, a certain maximum
time-out KEY_CYCLES turns is waited for an incomming reply. If no
reply is received, the next address is scanned. If there was a reply, the
answer is checked and the module found is displayed on the command line.RS485ReadWriteServer.Checksum, RS485ReadWriteServer.Command, RS485ReadWriteServer.Info, RS485ReadWriteServer.ReadWrite, RS485ReadWriteServer.ScanAbstractSerialDriver.Available| Modifier and Type | Field and Description |
|---|---|
private static char |
ADDRESS
The char denoting one address digit in the config command.
|
private static String |
DEFCONFIG
The default config command.
|
private static int |
DEFCYCLES
The default maximum wait cycles.
|
private static int |
DEFMAXADDRESS
The maximum default address to scan.
|
static String |
KEY_CONFIG
The key to config command.
|
static String |
KEY_CYCLES
The key to the maximum address.
|
static String |
KEY_MAXADDRESS
The key to the maximum address.
|
KEY_CHECKCHAR, KEY_CHECKSUM, KEY_CLOSE, KEY_CR, KEY_ECHO, KEY_FAILTIME, KEY_FAILURES, KEY_INVALID, KEY_MAXBUFFER, KEY_MAXBUSY, KEY_QUERYTIME, KEY_REINIT, KEY_RESPONDTIME, KEY_STARTUP, KEY_TIMEBUSYinport, KEY_BAUDRATE, KEY_CLOSETIMEOUT, KEY_DATABIT, KEY_FLOWCONTROL, KEY_INBUFFER, KEY_NOTIFYCOOLDOWN, KEY_OUTBUFFER, KEY_PARITYBIT, KEY_PORTNAME, KEY_RECEIVEFRAMING, KEY_RECEIVETHRESHOLD, KEY_RECEIVETIMEOUT, KEY_STOPBIT, KEY_TIMEOUT, LOCK, outport, STATICLOCKKEY_DRIVERNAMEKEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATORCONFIG, KEY_CLASS| Constructor and Description |
|---|
RS485Scan(Map prop)
Constructs a new port scanner.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
main(String[] arg)
Performs a port scan.
|
void |
start()
Starts the scan.
|
cancelCommand, deferCommand, endCommand, ensureCommand, exit, getCheckSum, getCheckSumming, isReadAlive, isReading, open, readString, setCheckSumming, startCommand, writeCommand, writeStringclose, createPortEventListener, createPortEventListener, deregisterSoleEventListener, disableEvent, enableEvent, getDriverName, init, isOpen, registerSoleEventListener, resetOriginalParameterscreateDriver, equals, hashCodeaugment, augment, augment, augment, augment, clone, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, initProperties, isNew, parseObject, parseObject, reload, reload, removeProperty, requires, rescanned, setObject, setProperties, setProperty, stringProperties, toStringpublic static final String KEY_MAXADDRESS
public static final String KEY_CONFIG
public static final String KEY_CYCLES
private static final int DEFMAXADDRESS
private static final String DEFCONFIG
ADDRESS.private static final int DEFCYCLES
private static final char ADDRESS
public RS485Scan(Map prop)
public void start()
public static void main(String[] arg)