public class DF1DeviceServer extends PLCDeviceServer
SimpleDataSource.NameEditorData
DataSource.Writable
Modifier and Type | Field and Description |
---|---|
static byte |
ACK
ACK - 0x06
|
static java.lang.String |
cvsRev |
static byte |
DATA_REQUEST_MSG_LENGTH
The length of an outgoing data request message - 18
|
static int |
debugLevel
The debug level.
|
static java.util.Vector |
df1DeviceServers
We maintain a list of all instances of DF1DeviceServers which can
be readily accessed when creating a list for the editor.
|
static byte |
DLE
DLE - 0x06
|
static byte |
ENQ
ENQ - 0x05
|
static byte |
EOT
EOT - 0x04
|
static byte |
ETX
ETX - 0x03
|
static byte |
NAK
NAK - 0xF
|
static java.lang.String |
PORT_FACTORY_NAME
The name of the port factory.
|
static byte |
SOH
SOH - 0x00
|
static byte |
STX
STX - 0x02
|
sharedPLCSimulation
CANNOT_OPEN_PORT, currentErrorCount, 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 |
---|
DF1DeviceServer()
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
_initializePortPool()
If the port and host are set, this creates the factory for this object.
|
java.util.LinkedHashMap |
availableServers()
No servers are available currently.
|
SimpleDataSource |
createServer(java.lang.String className,
java.lang.String serverName)
This method should never be called since "availableServers" returns null.
|
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.
|
int |
getACK(PortInterface port)
Return on valid ACK or return an error code on NAK or other error.
|
int |
getBaudRate() |
static java.util.Vector |
getDF1DeviceServers() |
int |
getFlowControl() |
int |
getParity() |
int |
getPCAddress()
Returns the PC Address.
|
int |
getPortNumber()
Returns the serial port number.
|
int |
getStopBits() |
void |
initializePortPool()
Sets the SerialPort parameters after creating the port.
|
PLCDataBlock |
readDevice(PLCDataBlock msgOut)
Read the packet from the PLC.
|
void |
setBaudRate(int baudRate) |
void |
setFlowControl(int flowControl) |
void |
setParity(int parity) |
void |
setPCAddres(int pcAddress)
Set the PC Address.
|
void |
setPortNumber(int portNumber)
Sets the serial port number of the PLC.
|
void |
setSerialPortParameters()
Sets the SerialPort parameters.
|
void |
setStopBits(int stopBits) |
void |
stop()
Overridden to remove the instance from the df1DeviceServers 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, isSimulating, isSimulationFlag, messageLog, releasePortPool, resetErrorCount, setLinkTimeout, setName, setResponseTimeout, setSimulationFlag, setTimebase
clientRequest, 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 final byte ACK
public static final java.lang.String cvsRev
public static final byte DATA_REQUEST_MSG_LENGTH
public static int debugLevel
public static java.util.Vector df1DeviceServers
public static final byte DLE
public static final byte ENQ
public static final byte EOT
public static final byte ETX
public static final byte NAK
public static final java.lang.String PORT_FACTORY_NAME
public static final byte SOH
public static final byte STX
public void _initializePortPool()
factoryName
- public java.util.LinkedHashMap availableServers()
availableServers
in class DeviceManagerManipulator
public SimpleDataSource createServer(java.lang.String className, java.lang.String serverName) throws BadParameterException
createServer
in class DeviceManagerManipulator
BadParameterException
availableServers()
public static java.lang.String forceLoad(java.lang.String value)
public int getACK(PortInterface port) throws PLCException, java.io.IOException
PLCException
java.io.IOException
public int getBaudRate()
public static java.util.Vector getDF1DeviceServers()
public int getFlowControl()
public int getParity()
public int getPCAddress()
public int getPortNumber()
public int getStopBits()
public void initializePortPool()
initializePortPool
in class PortDeviceServer
PortDeviceServer.initializePortPool()
public PLCDataBlock readDevice(PLCDataBlock msgOut) throws PLCException
readDevice
in class PLCDeviceServer
msgOut
- the message to sendPLCException
public void setBaudRate(int baudRate)
baudRate
- The baudRate to set.public void setFlowControl(int flowControl)
flowControl
- The flowControl to set.public void setParity(int parity)
parity
- The parity to set.public void setPCAddres(int pcAddress)
public void setPortNumber(int portNumber)
portNumber
- The portNumber to set.public void setSerialPortParameters()
public void setStopBits(int stopBits)
stopBits
- The stopBits to set.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.