public abstract class ModbusDeviceServerBase extends PLCDeviceServer
Modifier and Type | Class and Description |
---|---|
class |
ModbusDeviceServerBase.TimingMetrics
Store the messages that take the longest, and shortest to get a response.
|
SimpleDataSource.NameEditorData
DataSource.Writable
Modifier and Type | Field and Description |
---|---|
static int |
metricPrintFrequency
If > 0 timing metrics will be printed for the device server.
|
static java.util.Vector |
modbusDeviceServers
We maintain a list of all instances of ModbusDeviceServers which can
be readily accessed when creating a list for the editor.
|
cvsRev, sharedPLCSimulation
CANNOT_OPEN_PORT, currentErrorCount, debugLevel, DEFAULT_NAME, globalDebugLevel, globalSimulation, MISSING_PARAMETER, NO_ERROR, NO_PORT, NO_RESOURCES, PORT_ERROR, READ_ERROR, TOO_MANY_ERRORS_STRING, UNKNOWN_ERROR, WRITE_ERROR
UPDATE_DISPLAYED_VALUE, VALUE_INPUT
customTimer, EXPORT_READ_ONLY, EXPORT_READ_WRITE, NO_EXPORT, requiresSyncWrite, sharedTimer, syncWriteTimeout, timebase
autoSuspend, 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 |
---|
ModbusDeviceServerBase() |
Modifier and Type | Method and Description |
---|---|
void |
_initializePortPool()
This is used by the subclasses to set the port names before calling "initializePortPool"
here it just calls initializePortPool directly.
|
java.util.LinkedHashMap<java.lang.String,java.lang.String> |
availableServers()
The list of possible sub-servers of this device.
|
java.lang.String |
deviceType()
The type of the address block.
|
static java.lang.String |
forceLoad(java.lang.String value)
This is generated by the property editor to force a reference
to the DeviceServer for genjar.
|
static java.util.Vector<? extends ModbusDeviceServerBase> |
getModbusDeviceServers() |
boolean |
isBlockReads()
Returns true if we are blocking reads.
|
PLCDataBlock |
readDevice(PLCDataBlock msgOut)
Read the packet from the PLC.
|
void |
setBlockReads(boolean flag)
Set to true to prevent the blocking of reads.
|
void |
setName(java.lang.String name)
If the name is changed we need to update the list of device servers.
|
void |
setTimebase(double newValue)
Sets the timebase.
|
void |
stop()
Overridden to remove the instance from the modbusDeviceServers
Vector.
|
PLCDataBlock |
writeDevice(PLCDataBlock msgOut)
Writes the packet to the PLC.
|
addServer, aggregateBlocks, destroy, getBlocksForType, getMaximumBlockOffset, getRegisterBlock, getRegisterBlockLocal, getRegisterBlockShared, hasServers, printException, readAllLongTimebaseServers, removeServer, setMaximumBlockOffset, simulatedWrite, simulatedWrite, simulateRead, simulationStateChanged, start, toString
canConnect, clearMessageLog, configurePort, equals, getLinkTimeout, getLinkTimeoutMilliseconds, getResponseTimeout, incrementErrorCount, init, initializePortPool, isSimulating, isSimulationFlag, messageLog, releasePortPool, resetErrorCount, setLinkTimeout, setResponseTimeout, setSimulationFlag
clientRequest, createServer, deleteDevice, deleteServer, earlyStart, getEditableServers, getPersistentServers, getServerContainer, getServers, getServersInternal, getViewServers, preparingServer, setContainer, setServers
getDefaultQualityForLocation
getInPortNames, getStaticLocationFor, setBooleanValue, setBoolValue, setByteValue, setDoubleValue, setFloatValue, setIntValue, setLongValue, setShortValue, setStringValue, valueChanged, valueInput
addConnector, 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, VIBEvent
addVIBEventListener, 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, whoAmI
public static int metricPrintFrequency
public static java.util.Vector modbusDeviceServers
public void _initializePortPool()
public java.util.LinkedHashMap<java.lang.String,java.lang.String> availableServers()
availableServers
in class DeviceManagerManipulator
public java.lang.String deviceType()
public static java.lang.String forceLoad(java.lang.String value)
public static java.util.Vector<? extends ModbusDeviceServerBase> getModbusDeviceServers()
public boolean isBlockReads()
public PLCDataBlock readDevice(PLCDataBlock msgOut) throws PLCException
readDevice
in class PLCDeviceServer
msgOut
- the message to sendPLCException
public void setBlockReads(boolean flag)
flag
- set to true to cause blocking of reads.public void setName(java.lang.String name) throws BadParameterException
setName
in class PortDeviceServer
BadParameterException
SimpleDataSource.setName(java.lang.String)
public void setTimebase(double newValue)
setTimebase
in class PortDeviceServer
newValue
- the timebase of the serverSimpleDataSource.getTimebase()
public void stop() throws BadParameterException
stop
in class PLCDeviceServer
BadParameterException
DataSource.stop()
public PLCDataBlock writeDevice(PLCDataBlock msgOut) throws PLCException
writeDevice
in class PLCDeviceServer
PLCException
Copyright © 1999-2025 ErgoTech Systems, Inc. All Rights Reserved.