public class SineServer extends SimpleDataSource
SimpleDataSource.NameEditorData
DataSource.Writable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
cvsRev |
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, debugLevel, DEFAULT_AUTOSUSPEND, dontConnect, gwtLog, hardSuspended, popupLogger, PRIMARYOUTPORTNAME, sendColors, stopped, suspended, timedPopupLogger, traceLogger, valueHi, valueHiHi, valueLo, valueLoLo
Constructor and Description |
---|
SineServer()
Create the SineServer, a composite periodic oscillator.
|
Modifier and Type | Method and Description |
---|---|
double |
calculateValue(double time)
This will calculate the value for a specific time.
|
float |
getFreqFactor()
Returns the frequency multiplier of the SineServer.
|
int |
getMaxAmp()
Accesses the current maximum amplitude value.
|
int |
getOffset()
Returns the amplitude offset of the server.
|
float |
getTimeOffset()
Returns the time offset of the SineServer (in seconds).
|
void |
refreshCurrentValue()
Sets the new value.
|
void |
setFreqFactor(float newValue)
Sets the frequency multiplier of the SineServer.
|
void |
setMaxAmp(int newValue)
Sets the amplitude of the server.
|
void |
setOffset(int newValue)
Sets the amplitude offset of the server.
|
void |
setTimeOffset(float newValue)
Sets the time offset of the SineServer (in seconds).
|
addConnector, 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, toString, 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, 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, whoAmI
public static final java.lang.String cvsRev
public SineServer()
public double calculateValue(double time)
public float getFreqFactor()
setFreqFactor(float)
public int getMaxAmp()
setMaxAmp(int)
,
Writing VIB Data Sources: Get/Set Methodspublic int getOffset()
setOffset(int)
public float getTimeOffset()
setTimeOffset(float)
public void refreshCurrentValue()
newValue = ( sin(x*f)*cos(x*f/5))*maxAmp + offSet;where x is the time since the server started, in seconds, + the (optional) time offset, and f is the frequency multiplier (default is 1.0). This method is called automatically by the timer in SimpleDataSource every timebase interval.
refreshCurrentValue
in class SimpleDataSource
public void setFreqFactor(float newValue)
newValue
- The new frequency multiplier value.getTimeOffset()
public void setMaxAmp(int newValue)
newValue
- The new amplitude setting.getMaxAmp()
public void setOffset(int newValue)
newValue
- The new offset value.getOffset()
public void setTimeOffset(float newValue)
newValue
- The new time offset value.getTimeOffset()
Copyright © 1999-2025 ErgoTech Systems, Inc. All Rights Reserved.