public abstract class PortDeviceServer extends DeviceManagerManipulator implements SimulationListener
SimpleDataSource.NameEditorDataDataSource.Writable| Modifier and Type | Field and Description |
|---|---|
static int |
CANNOT_OPEN_PORT
Port cannot be opened.
|
int |
currentErrorCount
The current error count.
|
int |
debugLevel
The specific debug level for this device server.
|
static java.lang.String |
DEFAULT_NAME
An arbitrary assigned name.
|
static int |
globalDebugLevel
The debug level for all PLCs.
|
static boolean |
globalSimulation
This variable will be true if we are simulating PLC read/writes.
|
static int |
MISSING_PARAMETER
Some parameter is not yet set.
|
static int |
NO_ERROR
No Error.
|
static int |
NO_PORT
Port does not exist.
|
static int |
NO_RESOURCES
Out of resources.
|
static int |
PORT_ERROR
Some error with the open port.
|
static int |
READ_ERROR
Some error reading the PLC.
|
static java.lang.String |
TOO_MANY_ERRORS_STRING
The string that is displayed when too many errors have been detected.
|
static int |
UNKNOWN_ERROR
Some unidentified error.
|
static int |
WRITE_ERROR
Some error writing the PLC.
|
cvsRevUPDATE_DISPLAYED_VALUE, VALUE_INPUTcustomTimer, EXPORT_READ_ONLY, EXPORT_READ_WRITE, NO_EXPORT, requiresSyncWrite, sharedTimer, syncWriteTimeout, timebaseautoSuspend, AUTOSUSPEND_DEFAULT, AUTOSUSPEND_NEVER, AUTOSUSPEND_NO_LISTENERS, AUTOSUSPEND_NO_LISTENERS_AND_NO_SOURCES, colorHi, colorHiHi, colorLo, colorLoLo, colorNormal, connectors, consoleLogger, currentColor, currentValue, DEFAULT_AUTOSUSPEND, dontConnect, gwtLog, hardSuspended, popupLogger, PRIMARYOUTPORTNAME, sendColors, stopped, suspended, timedPopupLogger, traceLogger, valueHi, valueHiHi, valueLo, valueLoLo| Constructor and Description |
|---|
PortDeviceServer()
The default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canConnect()
This is designed for subclasses to modify to determine if they have
all the information to connect to the server.
|
void |
clearMessageLog()
This will send an empty string as the message string and send a value
of zero (NO_ERROR) to the output.
|
void |
configurePort()
Perform any configuration required on the port.
|
void |
destroy()
Indicate by means of a property change event that the device server is
no more.
|
boolean |
equals(java.lang.Object test)
Returns true if the object passed equals this object.
|
double |
getLinkTimeout()
Returns the link timeout in seconds.
|
int |
getLinkTimeoutMilliseconds()
Returns the link timeout in milliseconds.
|
int |
getResponseTimeout()
Returns the response timeout for this connection .
|
abstract boolean |
hasServers()
Returns true if this device has servers associated with it.
|
void |
incrementErrorCount()
This routine increments the error count.
|
void |
init()
Initialize the Ports.
|
void |
initializePortPool()
Creates the factory for this object.
|
boolean |
isSimulating() |
boolean |
isSimulationFlag() |
void |
messageLog(java.lang.String msg,
int errorNumber)
Logs informational/debug messages.
|
void |
printException(java.lang.Throwable t)
Print the exceptions.
|
void |
releasePortPool()
Frees all port/factory related resources for this component.
|
void |
resetErrorCount()
This routine resets the current error count.
|
void |
setLinkTimeout(double linkTimeout)
Sets the link timeout in seconds.
|
void |
setName(java.lang.String name)
The name of the device.
|
void |
setResponseTimeout(int responseTimeout)
Sets the response timeout for this connection.
|
void |
setSimulationFlag(boolean simulationFlag)
Force the listener to understand this method.
|
void |
setTimebase(double newValue)
Sets the timebase.
|
void |
simulationStateChanged(SimulationChangedEvent simulationChangedEvent)
Sets/resets the global simulation flag.
|
void |
start()
This method controls communication to the device.
|
void |
stop()
This method is the opposite of "start" after calling this method, until
the start method is called again, there will be no communication with the
device.
|
java.lang.String |
toString()
Returns the assigned name of this device.
|
availableServers, clientRequest, createServer, deleteDevice, deleteServer, earlyStart, getEditableServers, getPersistentServers, getServerContainer, getServers, getServersInternal, getViewServers, preparingServer, setContainer, setServersgetDefaultQualityForLocationgetInPortNames, getStaticLocationFor, setBooleanValue, setBoolValue, setByteValue, setDoubleValue, setFloatValue, setIntValue, setLongValue, setShortValue, setStringValue, valueChanged, valueInputaddConnector, addConnector, addDataSource, addPropertyChangeListener, addValueChangedListener, addVetoableChangeListener, authenticatedClientRequest, clientResponse, determineSuspendedStatus, getClassLicenseManager, getContainer, getCustomTimer, getDataSource, getDataSources, getDisplayName, getExportCriteria, getExposeComponentConnections, getName, getOutPortNames, getPullFromServers, getPushData, getPushName, getPushToServers, getServerListData, getTimebase, getTrace, isActive, isScreenLocal, refreshCurrentValue, removeConnector, removeDataSource, removePropertyChangeListener, removeValueChangedListener, removeVetoableChangeListener, requestSyncWrite, setAutoSuspend, setClassLicenseManager, setCustomTimer, setDataSourceName, setExportCriteria, setExposeComponentConnections, setPullFromServers, setPushData, setPushName, setPushToServers, setScreenLocal, setServerListData, setTrace, setValueObject, tick, VIBEventaddVIBEventListener, checkScript, executeInScriptInternal, executeScript, executeScriptInternal, executeScriptInternal, getAutoSuspend, getBooleanValue, getBoolValue, getColorHi, getColorHiHi, getColorLo, getColorLoLo, getColorNormal, getConnectors, getConsoleLogger, getCurrentColor, getDataSourceName, getDoubleValue, getFloatValue, getGWTLogger, getIncomingValueObject, getInScript, getIntValue, getLongValue, getParent, getPopupLogger, getScript, getScriptEngine, getSendColors, getSources, getStringValue, getSyncWriteTimeout, getTimedPopupLogger, getTraceLogger, getValueHi, getValueHiHi, getValueLo, getValueLoLo, getValueObject, isHardSuspended, isRunning, isSendOnlyChangedValuesDefault, isSuspended, logException, logGWT, logGWT, logMessage, logTrace, n2sortConnectors, performScriptSubstitutions, popupMessage, post, removeConnector, removeVIBEventListener, replaceConnectors, scriptExtensionSubstition, setColorHi, setColorHiHi, setColorLo, setColorLoLo, setColorNormal, setConsoleLogger, setGWTLogger, setHardSuspended, setInScript, setParent, setPopupLogger, setScript, setSendColors, setSendOnlyChangedValuesDefault, setSyncWriteTimeout, setTimedPopupLogger, setTraceLogger, setValueHi, setValueHiHi, setValueLo, setValueLoLo, updateColor, updateListeners, updateListeners, updateListeners, whoAmIpublic static final int CANNOT_OPEN_PORT
public int currentErrorCount
public int debugLevel
public static final java.lang.String DEFAULT_NAME
public static int globalDebugLevel
public static boolean globalSimulation
public static final int MISSING_PARAMETER
public static final int NO_ERROR
public static final int NO_PORT
public static final int NO_RESOURCES
public static final int PORT_ERROR
public static final int READ_ERROR
public static java.lang.String TOO_MANY_ERRORS_STRING
public static final int UNKNOWN_ERROR
public static final int WRITE_ERROR
public boolean canConnect()
public void clearMessageLog()
public void configurePort()
public void destroy()
throws BadParameterException
destroy in class DeviceManagerManipulatorBadParameterExceptionDataSource.destroy()public boolean equals(java.lang.Object test)
equals in class java.lang.Objectpublic double getLinkTimeout()
public int getLinkTimeoutMilliseconds()
public int getResponseTimeout()
public abstract boolean hasServers()
public void incrementErrorCount()
public void init()
throws BadParameterException
init in class DeviceManagerManipulatorBadParameterExceptionDataSource.init()public void initializePortPool()
factoryName - public boolean isSimulating()
public boolean isSimulationFlag()
public void messageLog(java.lang.String msg,
int errorNumber)
public void printException(java.lang.Throwable t)
public void releasePortPool()
factoryName - public void resetErrorCount()
public void setLinkTimeout(double linkTimeout)
linkTimeout - the linkTimeout to setpublic void setName(java.lang.String name)
throws BadParameterException
setName in class DeviceManagerManipulatorBadParameterException#getTagNamepublic void setResponseTimeout(int responseTimeout)
public void setSimulationFlag(boolean simulationFlag)
SimulationListenersetSimulationFlag in interface SimulationListenersimulation - The simulation to set.public void setTimebase(double newValue)
setTimebase in class SimpleDataSourcenewValue - the timebase of the serverSimpleDataSource.getTimebase()public void simulationStateChanged(SimulationChangedEvent simulationChangedEvent) throws java.lang.Exception
simulationStateChanged in interface SimulationListenerjava.lang.Exception - TODOSimulationListener.simulationStateChanged(com.ergotech.util.SimulationChangedEvent)public void start()
throws BadParameterException,
VIBUpdateFailedException
start in class DeviceManagerManipulatorBadParameterExceptionVIBUpdateFailedExceptioncom.ergotech.vib.utils.LifeCycle#start()public void stop()
throws BadParameterException
stop in class DeviceManagerManipulatorBadParameterExceptioncom.ergotech.vib.utils.LifeCycle#stop()public java.lang.String toString()
toString in class ManipulatorsetName(java.lang.String)Copyright © 1999-2025 ErgoTech Systems, Inc. All Rights Reserved.