public class YSoundSpectrum extends YFunction
| Modifier and Type | Class and Description |
|---|---|
static interface |
YSoundSpectrum.TimedReportCallback
TimedReportCallback for SoundSpectrum
|
static interface |
YSoundSpectrum.UpdateCallback
Deprecated UpdateCallback for SoundSpectrum
|
| Modifier and Type | Field and Description |
|---|---|
protected int |
_integrationTime |
protected String |
_spectrumData |
protected YSoundSpectrum.UpdateCallback |
_valueCallbackSoundSpectrum |
static int |
INTEGRATIONTIME_INVALID
invalid integrationTime value
|
static String |
SPECTRUMDATA_INVALID
invalid spectrumData value
|
_advertisedValue, _cacheExpiration, _className, _dataStreams, _func, _funId, _hwId, _lastErrorMsg, _lastErrorType, _logicalName, _serial, _userData, _valueCallbackFunction, _yapi, ADVERTISEDVALUE_INVALID, FUNCTIONDESCRIPTOR_INVALID, LOGICALNAME_INVALID| Modifier | Constructor and Description |
|---|---|
protected |
YSoundSpectrum(String func) |
protected |
YSoundSpectrum(YAPIContext ctx,
String func) |
| Modifier and Type | Method and Description |
|---|---|
int |
_invokeValueCallback(String value) |
protected void |
_parseAttr(com.yoctopuce.YoctoAPI.YJSONObject json_val) |
static YSoundSpectrum |
FindSoundSpectrum(String func)
Retrieves a sound spectrum analyzer for a given identifier.
|
static YSoundSpectrum |
FindSoundSpectrumInContext(YAPIContext yctx,
String func)
Retrieves a sound spectrum analyzer for a given identifier in a YAPI context.
|
static YSoundSpectrum |
FirstSoundSpectrum()
comment from .yc definition
|
static YSoundSpectrum |
FirstSoundSpectrumInContext(YAPIContext yctx)
comment from .yc definition
|
int |
get_integrationTime()
Returns the integration time in milliseconds for calculating time
weighted spectrum data.
|
String |
get_spectrumData() |
int |
getIntegrationTime()
Returns the integration time in milliseconds for calculating time
weighted spectrum data.
|
YSoundSpectrum |
nextSoundSpectrum()
comment from .yc definition
|
int |
registerValueCallback(YSoundSpectrum.UpdateCallback callback)
Registers the callback function that is invoked on every change of advertised value.
|
int |
set_integrationTime(int newval)
Changes the integration time in milliseconds for computing time weighted
spectrum data.
|
int |
setIntegrationTime(int newval)
Changes the integration time in milliseconds for computing time weighted
spectrum data.
|
_AddToCache, _clearDataStreamCache, _decode_json_int, _decode_json_string, _download, _escapeAttr, _FindFromCache, _FindFromCacheInContext, _get_json_path_struct, _get_json_path, _is_valid_pass, _json_get_array, _json_get_key, _json_get_string, _parse, _parserHelper, _setAttr, _throw, _UpdateTimedReportCallbackList, _UpdateValueCallbackList, _upload, _upload, _uploadEx, clearCache, describe, errMessage, errorMessage, errorType, errType, FindFunction, FindFunctionInContext, FirstFunction, FirstFunctionInContext, functionDescriptor, get_advertisedValue, get_errorMessage, get_errorType, get_friendlyName, get_functionDescriptor, get_functionId, get_hardwareId, get_logicalName, get_module, get_serialNumber, get_userData, getAdvertisedValue, getErrorMessage, getErrorType, getFriendlyName, getFunctionDescriptor, getFunctionId, getHardwareId, getLogicalName, getModule, getUserData, isOnline, isReadOnly, load, loadAttribute, module, muteValueCallbacks, nextFunction, registerValueCallback, set_advertisedValue, set_logicalName, set_userData, setLogicalName, setUserData, toString, unmuteValueCallbacks, userDatapublic static final int INTEGRATIONTIME_INVALID
public static final String SPECTRUMDATA_INVALID
protected int _integrationTime
protected String _spectrumData
protected YSoundSpectrum.UpdateCallback _valueCallbackSoundSpectrum
protected YSoundSpectrum(YAPIContext ctx, String func)
func - : functionidprotected YSoundSpectrum(String func)
func - : functionidprotected void _parseAttr(com.yoctopuce.YoctoAPI.YJSONObject json_val)
throws Exception
_parseAttr in class YFunctionExceptionpublic int get_integrationTime()
throws YAPI_Exception
YAPI_Exception - on errorpublic int getIntegrationTime()
throws YAPI_Exception
YAPI_Exception - on errorpublic int set_integrationTime(int newval)
throws YAPI_Exception
newval - : an integer corresponding to the integration time in milliseconds for computing time weighted
spectrum dataYAPI_Exception - on errorpublic int setIntegrationTime(int newval)
throws YAPI_Exception
newval - : an integer corresponding to the integration time in milliseconds for computing time weighted
spectrum dataYAPI_Exception - on errorpublic String get_spectrumData() throws YAPI_Exception
YAPI_Exceptionpublic static YSoundSpectrum FindSoundSpectrum(String func)
func - : a string that uniquely characterizes the sound spectrum analyzer, for instance
MyDevice.soundSpectrum.public static YSoundSpectrum FindSoundSpectrumInContext(YAPIContext yctx, String func)
yctx - : a YAPI contextfunc - : a string that uniquely characterizes the sound spectrum analyzer, for instance
MyDevice.soundSpectrum.public int registerValueCallback(YSoundSpectrum.UpdateCallback callback)
callback - : the callback function to call, or a null pointer. The callback function should take two
arguments: the function object of which the value has changed, and the character string describing
the new advertised value.public int _invokeValueCallback(String value)
_invokeValueCallback in class YFunctionpublic YSoundSpectrum nextSoundSpectrum()
public static YSoundSpectrum FirstSoundSpectrum()
public static YSoundSpectrum FirstSoundSpectrumInContext(YAPIContext yctx)
Copyright © 2026. All rights reserved.