public class SerialPortDevice extends PortDeviceServer
SimpleDataSource.NameEditorData
DataSource.Writable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
cvsRev |
static int |
MAX_CHAR_INPUT |
static java.lang.String |
PORT_FACTORY_NAME
The name of the port factory.
|
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 |
---|
SerialPortDevice()
This sets the factory name.
|
Modifier and Type | Method and Description |
---|---|
void |
asyncValueInput(ValueChangedEvent newEvent)
This is the trigger routine.
|
java.util.LinkedHashMap |
availableServers()
No servers are available currently.
|
void |
clearMessageLog()
This will send an empty string as the message string and send a value
of zero (NO_ERROR) to the output.
|
PortInterface |
connect()
This will checkout a port and so connect to the device.
|
static java.lang.String |
convertEscapedCharacters(java.lang.String input)
Users can enter \r,\n, etc and they will be converted to their non-escaped version.
|
SimpleDataSource |
createServer(java.lang.String className,
java.lang.String serverName)
This method should never be called since "availableServers" returns null.
|
int |
getBaudRate()
This is the baud rate.
|
int |
getDataBits()
This is the data bits.
|
java.lang.String |
getEndString() |
int |
getFlowControl() |
int |
getInterCharacterTimeout()
The inter-character timeout.
|
int |
getParity()
This is the parity.
|
int |
getPort()
This is the port number.
|
int |
getResponseTimeout()
The response timeout.
|
int |
getStopBits()
This is the stop bits.
|
boolean |
hasServers()
Returns true.
|
void |
messageLog(java.lang.String msg,
int errorNumber)
Logs informational/debug messages.
|
void |
refreshCurrentValue()
Poll the port for an unsolicited value.
|
void |
releasePort()
Release the port interface.
|
void |
setBaudRate(int newValue)
This is the baud rate.
|
void |
setDataBits(int newValue)
This is the data bits.
|
void |
setEndString(java.lang.String endString) |
void |
setFlowControl(int flowControl) |
void |
setInterCharacterTimeout(int interCharacterTimeout)
The inter-character timeout.
|
void |
setParity(int newValue)
This is the parity.
|
void |
setPort(int newValue)
This is the port number.
|
void |
setResponseTimeout(int responseTimeout)
The response timeout.
|
void |
setStopBits(int newValue)
This is the stop bits.
|
void |
setTimebase(double newValue)
Sets the timebase of the server in seconds.
|
void |
stop()
Release the serial port.
|
void |
syncSendToPort(ValueChangedEvent event)
Sends the string directly to the port.
|
void |
syncSendToPort(ValueObjectInterface value) |
void |
valueInput(ValueChangedEvent newEvent)
This is the trigger routine.
|
canConnect, configurePort, destroy, equals, getLinkTimeout, getLinkTimeoutMilliseconds, incrementErrorCount, init, initializePortPool, isSimulating, isSimulationFlag, printException, releasePortPool, resetErrorCount, setLinkTimeout, setName, setSimulationFlag, simulationStateChanged, start, toString
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
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, 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 java.lang.String cvsRev
public static final int MAX_CHAR_INPUT
public static final java.lang.String PORT_FACTORY_NAME
public void asyncValueInput(ValueChangedEvent newEvent) throws VIBUpdateFailedException
VIBUpdateFailedException
public java.util.LinkedHashMap availableServers()
availableServers
in class DeviceManagerManipulator
public void clearMessageLog()
clearMessageLog
in class PortDeviceServer
public PortInterface connect() throws java.io.IOException, BadParameterException
BadParameterException
- thrown if "checkout" of the portPool throwsjava.io.IOException
- thrown if "checkout" of the portPool throwspublic static java.lang.String convertEscapedCharacters(java.lang.String input)
public SimpleDataSource createServer(java.lang.String className, java.lang.String serverName) throws BadParameterException
createServer
in class DeviceManagerManipulator
BadParameterException
availableServers()
public int getBaudRate()
setBaudRate
public int getDataBits()
setDataBits
public java.lang.String getEndString()
public int getFlowControl()
public int getInterCharacterTimeout()
public int getParity()
setParity
public int getPort()
setPort
public int getResponseTimeout()
getResponseTimeout
in class PortDeviceServer
public int getStopBits()
setStopBits
public boolean hasServers()
hasServers
in class PortDeviceServer
public void messageLog(java.lang.String msg, int errorNumber)
messageLog
in class PortDeviceServer
public void refreshCurrentValue()
refreshCurrentValue
in class SimpleDataSource
public void releasePort()
public void setBaudRate(int newValue)
getBaudRate
public void setDataBits(int newValue)
getDataBits
public void setEndString(java.lang.String endString)
endString
- the endString to setpublic void setFlowControl(int flowControl)
flowControl
- The flowControl to set.public void setInterCharacterTimeout(int interCharacterTimeout)
public void setParity(int newValue)
getParity
public void setPort(int newValue)
getPort
public void setResponseTimeout(int responseTimeout)
setResponseTimeout
in class PortDeviceServer
public void setStopBits(int newValue)
getStopBits
public void setTimebase(double newValue)
setTimebase
in class PortDeviceServer
newValue
- the timebase of the serverSimpleDataSource.getTimebase()
public void stop() throws BadParameterException
stop
in class PortDeviceServer
BadParameterException
PortDeviceServer.stop()
public void syncSendToPort(ValueChangedEvent event) throws VIBUpdateFailedException
VIBUpdateFailedException
public void syncSendToPort(ValueObjectInterface value) throws VIBUpdateFailedException
VIBUpdateFailedException
public void valueInput(ValueChangedEvent newEvent) throws VIBUpdateFailedException
valueInput
in class Manipulator
newEvent
- The ValueChangedEvent that the bean or data source has sent.VIBUpdateFailedException
Copyright © 1999-2025 ErgoTech Systems, Inc. All Rights Reserved.