public class SerialPortManipulator extends SimpleManipulator
SimpleDataSource.NameEditorDataDataSource.Writable| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
cvsRev |
UPDATE_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, debugLevel, DEFAULT_AUTOSUSPEND, dontConnect, gwtLog, hardSuspended, popupLogger, PRIMARYOUTPORTNAME, sendColors, stopped, suspended, timedPopupLogger, traceLogger, valueHi, valueHiHi, valueLo, valueLoLo| Constructor and Description |
|---|
SerialPortManipulator() |
| Modifier and Type | Method and Description |
|---|---|
int |
available()
This will return the number of bytes available.
|
void |
close()
This will close a port (including all streams).
|
void |
configPorts()
Sets the baud rate, data bits, stop bits and parity for the port.
|
boolean |
connect()
This will open the serial port and so connect to the device.
|
int |
getBaudRate()
This is the baud rate.
|
int |
getDataBits()
This is the data bits.
|
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.
|
byte |
read()
This will read a single byte.
|
int |
read(byte[] b)
This will read an array of bytes and place them into the given array.
|
int |
read(byte[] b,
int off,
int len)
This will read an array of bytes and place them into the array of bytes
at a given offset (up to the length).
|
byte[] |
readAndWait(int timeout,
int interCharacterTimeout)
This will wait until we have received what the port thinks is everything.
|
void |
refreshCurrentValue()
Poll the port for an unsolicited value.
|
void |
setBaudRate(int newValue)
This is the baud rate.
|
void |
setDataBits(int newValue)
This is the data bits.
|
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 |
write(byte b)
This will write a single byte.
|
void |
write(byte[] b)
This will write a single byte.
|
void |
write(byte[] b,
int offset,
int length)
This will write an array of bytes.
|
getDefaultQualityForLocationgetInPortNames, getStaticLocationFor, setBooleanValue, setBoolValue, setByteValue, setDoubleValue, setFloatValue, setIntValue, setLongValue, setShortValue, setStringValue, toString, valueChanged, valueInputaddConnector, addConnector, addDataSource, addPropertyChangeListener, addValueChangedListener, addVetoableChangeListener, authenticatedClientRequest, clientRequest, clientResponse, destroy, 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, setContainer, setCustomTimer, setDataSourceName, setExportCriteria, setExposeComponentConnections, setName, setPullFromServers, setPushData, setPushName, setPushToServers, setScreenLocal, setServerListData, setTimebase, setTrace, setValueObject, start, stop, 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, init, 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 java.lang.String cvsRev
public int available()
throws java.io.IOException
java.io.IOExceptionpublic void close()
public void configPorts()
public boolean connect()
public int getBaudRate()
setBaudRatepublic int getDataBits()
setDataBitspublic int getInterCharacterTimeout()
public int getParity()
setParitypublic int getPort()
setPortpublic int getResponseTimeout()
public int getStopBits()
setStopBitspublic byte read()
throws java.io.IOException
java.io.IOExceptionpublic int read(byte[] b)
throws java.io.IOException
java.io.IOExceptionpublic int read(byte[] b,
int off,
int len)
throws java.io.IOException
java.io.IOExceptionpublic byte[] readAndWait(int timeout,
int interCharacterTimeout)
throws java.io.IOException
java.io.IOExceptionpublic void refreshCurrentValue()
refreshCurrentValue in class SimpleDataSourcepublic void setBaudRate(int newValue)
getBaudRatepublic void setDataBits(int newValue)
getDataBitspublic void setInterCharacterTimeout(int interCharacterTimeout)
public void setParity(int newValue)
getParitypublic void setPort(int newValue)
getPortpublic void setResponseTimeout(int responseTimeout)
public void setStopBits(int newValue)
getStopBitspublic void write(byte b)
throws java.io.IOException
java.io.IOExceptionpublic void write(byte[] b)
throws java.io.IOException
java.io.IOExceptionpublic void write(byte[] b,
int offset,
int length)
throws java.io.IOException
java.io.IOExceptionCopyright © 1999-2025 ErgoTech Systems, Inc. All Rights Reserved.