//--- (YWakeUpMonitor implementation) #pragma warning disable 1998 internal override void imm_parseAttr(YJSONObject json_val) { if (json_val.has("powerDuration")) { _powerDuration = json_val.getInt("powerDuration"); } if (json_val.has("sleepCountdown")) { _sleepCountdown = json_val.getInt("sleepCountdown"); } if (json_val.has("nextWakeUp")) { _nextWakeUp = json_val.getLong("nextWakeUp"); } if (json_val.has("wakeUpReason")) { _wakeUpReason = json_val.getInt("wakeUpReason"); } if (json_val.has("wakeUpState")) { _wakeUpState = json_val.getInt("wakeUpState"); } if (json_val.has("rtcTime")) { _rtcTime = json_val.getLong("rtcTime"); } base.imm_parseAttr(json_val); }
//--- (YGenericSensor implementation) #pragma warning disable 1998 internal override void imm_parseAttr(YJSONObject json_val) { if (json_val.has("signalValue")) { _signalValue = Math.Round(json_val.getDouble("signalValue") * 1000.0 / 65536.0) / 1000.0; } if (json_val.has("signalUnit")) { _signalUnit = json_val.getString("signalUnit"); } if (json_val.has("signalRange")) { _signalRange = json_val.getString("signalRange"); } if (json_val.has("valueRange")) { _valueRange = json_val.getString("valueRange"); } if (json_val.has("signalBias")) { _signalBias = Math.Round(json_val.getDouble("signalBias") * 1000.0 / 65536.0) / 1000.0; } if (json_val.has("signalSampling")) { _signalSampling = json_val.getInt("signalSampling"); } if (json_val.has("enabled")) { _enabled = json_val.getInt("enabled") > 0 ? 1 : 0; } base.imm_parseAttr(json_val); }
//--- (YRangeFinder implementation) #pragma warning disable 1998 internal override void imm_parseAttr(YJSONObject json_val) { if (json_val.has("rangeFinderMode")) { _rangeFinderMode = json_val.getInt("rangeFinderMode"); } if (json_val.has("timeFrame")) { _timeFrame = json_val.getLong("timeFrame"); } if (json_val.has("quality")) { _quality = json_val.getInt("quality"); } if (json_val.has("hardwareCalibration")) { _hardwareCalibration = json_val.getString("hardwareCalibration"); } if (json_val.has("currentTemperature")) { _currentTemperature = Math.Round(json_val.getDouble("currentTemperature") * 1000.0 / 65536.0) / 1000.0; } if (json_val.has("command")) { _command = json_val.getString("command"); } base.imm_parseAttr(json_val); }
//--- (generated code: YMessageBox implementation) #pragma warning disable 1998 internal override void imm_parseAttr(YJSONObject json_val) { if (json_val.has("slotsInUse")) { _slotsInUse = json_val.getInt("slotsInUse"); } if (json_val.has("slotsCount")) { _slotsCount = json_val.getInt("slotsCount"); } if (json_val.has("slotsBitmap")) { _slotsBitmap = json_val.getString("slotsBitmap"); } if (json_val.has("pduSent")) { _pduSent = json_val.getInt("pduSent"); } if (json_val.has("pduReceived")) { _pduReceived = json_val.getInt("pduReceived"); } if (json_val.has("command")) { _command = json_val.getString("command"); } base.imm_parseAttr(json_val); }
//--- (YBuzzer implementation) #pragma warning disable 1998 internal override void imm_parseAttr(YJSONObject json_val) { if (json_val.has("frequency")) { _frequency = Math.Round(json_val.getDouble("frequency") * 1000.0 / 65536.0) / 1000.0; } if (json_val.has("volume")) { _volume = json_val.getInt("volume"); } if (json_val.has("playSeqSize")) { _playSeqSize = json_val.getInt("playSeqSize"); } if (json_val.has("playSeqMaxSize")) { _playSeqMaxSize = json_val.getInt("playSeqMaxSize"); } if (json_val.has("playSeqSignature")) { _playSeqSignature = json_val.getInt("playSeqSignature"); } if (json_val.has("command")) { _command = json_val.getString("command"); } base.imm_parseAttr(json_val); }
//--- (generated code: YWireless implementation) #pragma warning disable 1998 internal override void imm_parseAttr(YJSONObject json_val) { if (json_val.has("linkQuality")) { _linkQuality = json_val.getInt("linkQuality"); } if (json_val.has("ssid")) { _ssid = json_val.getString("ssid"); } if (json_val.has("channel")) { _channel = json_val.getInt("channel"); } if (json_val.has("security")) { _security = json_val.getInt("security"); } if (json_val.has("message")) { _message = json_val.getString("message"); } if (json_val.has("wlanConfig")) { _wlanConfig = json_val.getString("wlanConfig"); } if (json_val.has("wlanState")) { _wlanState = json_val.getInt("wlanState"); } base.imm_parseAttr(json_val); }
//--- (generated code: YDataLogger implementation) #pragma warning disable 1998 internal override void imm_parseAttr(YJSONObject json_val) { if (json_val.has("currentRunIndex")) { _currentRunIndex = json_val.getInt("currentRunIndex"); } if (json_val.has("timeUTC")) { _timeUTC = json_val.getLong("timeUTC"); } if (json_val.has("recording")) { _recording = json_val.getInt("recording"); } if (json_val.has("autoStart")) { _autoStart = json_val.getInt("autoStart") > 0 ? 1 : 0; } if (json_val.has("beaconDriven")) { _beaconDriven = json_val.getInt("beaconDriven") > 0 ? 1 : 0; } if (json_val.has("clearHistory")) { _clearHistory = json_val.getInt("clearHistory") > 0 ? 1 : 0; } base.imm_parseAttr(json_val); }
//--- (YGps implementation) #pragma warning disable 1998 internal override void imm_parseAttr(YJSONObject json_val) { if (json_val.has("isFixed")) { _isFixed = json_val.getInt("isFixed") > 0 ? 1 : 0; } if (json_val.has("satCount")) { _satCount = json_val.getLong("satCount"); } if (json_val.has("coordSystem")) { _coordSystem = json_val.getInt("coordSystem"); } if (json_val.has("latitude")) { _latitude = json_val.getString("latitude"); } if (json_val.has("longitude")) { _longitude = json_val.getString("longitude"); } if (json_val.has("dilution")) { _dilution = Math.Round(json_val.getDouble("dilution") * 1000.0 / 65536.0) / 1000.0; } if (json_val.has("altitude")) { _altitude = Math.Round(json_val.getDouble("altitude") * 1000.0 / 65536.0) / 1000.0; } if (json_val.has("groundSpeed")) { _groundSpeed = Math.Round(json_val.getDouble("groundSpeed") * 1000.0 / 65536.0) / 1000.0; } if (json_val.has("direction")) { _direction = Math.Round(json_val.getDouble("direction") * 1000.0 / 65536.0) / 1000.0; } if (json_val.has("unixTime")) { _unixTime = json_val.getLong("unixTime"); } if (json_val.has("dateTime")) { _dateTime = json_val.getString("dateTime"); } if (json_val.has("utcOffset")) { _utcOffset = json_val.getInt("utcOffset"); } if (json_val.has("command")) { _command = json_val.getString("command"); } base.imm_parseAttr(json_val); }
//--- (YPowerSupply implementation) #pragma warning disable 1998 internal override void imm_parseAttr(YJSONObject json_val) { if (json_val.has("voltageSetPoint")) { _voltageSetPoint = Math.Round(json_val.getDouble("voltageSetPoint") * 1000.0 / 65536.0) / 1000.0; } if (json_val.has("currentLimit")) { _currentLimit = Math.Round(json_val.getDouble("currentLimit") * 1000.0 / 65536.0) / 1000.0; } if (json_val.has("powerOutput")) { _powerOutput = json_val.getInt("powerOutput") > 0 ? 1 : 0; } if (json_val.has("voltageSense")) { _voltageSense = json_val.getInt("voltageSense"); } if (json_val.has("measuredVoltage")) { _measuredVoltage = Math.Round(json_val.getDouble("measuredVoltage") * 1000.0 / 65536.0) / 1000.0; } if (json_val.has("measuredCurrent")) { _measuredCurrent = Math.Round(json_val.getDouble("measuredCurrent") * 1000.0 / 65536.0) / 1000.0; } if (json_val.has("inputVoltage")) { _inputVoltage = Math.Round(json_val.getDouble("inputVoltage") * 1000.0 / 65536.0) / 1000.0; } if (json_val.has("vInt")) { _vInt = Math.Round(json_val.getDouble("vInt") * 1000.0 / 65536.0) / 1000.0; } if (json_val.has("ldoTemperature")) { _ldoTemperature = Math.Round(json_val.getDouble("ldoTemperature") * 1000.0 / 65536.0) / 1000.0; } if (json_val.has("voltageTransition")) { _voltageTransition = json_val.getString("voltageTransition"); } if (json_val.has("voltageAtStartUp")) { _voltageAtStartUp = Math.Round(json_val.getDouble("voltageAtStartUp") * 1000.0 / 65536.0) / 1000.0; } if (json_val.has("currentAtStartUp")) { _currentAtStartUp = Math.Round(json_val.getDouble("currentAtStartUp") * 1000.0 / 65536.0) / 1000.0; } if (json_val.has("command")) { _command = json_val.getString("command"); } base.imm_parseAttr(json_val); }
//--- (end of generated code: YWlanRecord definitions) internal YWlanRecord(string json_str) { YJSONObject json = new YJSONObject(json_str); json.parse(); _ssid = json.getString("ssid"); _channel = json.getInt("channel"); _sec = json.getString("sec"); _rssi = json.getInt("rssi"); }
//--- (end of generated code: YFileRecord definitions) public YFileRecord(string json_str) { YJSONObject json; json = new YJSONObject(json_str); json.parse(); _name = json.getString("name"); _crc = json.getInt("crc"); _size = json.getInt("size"); }
//--- (generated code: YFiles implementation) #pragma warning disable 1998 internal override void imm_parseAttr(YJSONObject json_val) { if (json_val.has("filesCount")) { _filesCount = json_val.getInt("filesCount"); } if (json_val.has("freeSpace")) { _freeSpace = json_val.getInt("freeSpace"); } base.imm_parseAttr(json_val); }
//--- (YTilt implementation) #pragma warning disable 1998 internal override void imm_parseAttr(YJSONObject json_val) { if (json_val.has("bandwidth")) { _bandwidth = json_val.getInt("bandwidth"); } if (json_val.has("axis")) { _axis = json_val.getInt("axis"); } base.imm_parseAttr(json_val); }
//--- (YRelay implementation) #pragma warning disable 1998 internal override void imm_parseAttr(YJSONObject json_val) { if (json_val.has("state")) { _state = json_val.getInt("state") > 0 ? 1 : 0; } if (json_val.has("stateAtPowerOn")) { _stateAtPowerOn = json_val.getInt("stateAtPowerOn"); } if (json_val.has("maxTimeOnStateA")) { _maxTimeOnStateA = json_val.getLong("maxTimeOnStateA"); } if (json_val.has("maxTimeOnStateB")) { _maxTimeOnStateB = json_val.getLong("maxTimeOnStateB"); } if (json_val.has("output")) { _output = json_val.getInt("output") > 0 ? 1 : 0; } if (json_val.has("pulseTimer")) { _pulseTimer = json_val.getLong("pulseTimer"); } if (json_val.has("delayedPulseTimer")) { YJSONObject subjson = json_val.getYJSONObject("delayedPulseTimer"); if (subjson.has("moving")) { _delayedPulseTimer.moving = subjson.getInt("moving"); } if (subjson.has("target")) { _delayedPulseTimer.target = subjson.getInt("target"); } if (subjson.has("ms")) { _delayedPulseTimer.ms = subjson.getInt("ms"); } } if (json_val.has("countdown")) { _countdown = json_val.getLong("countdown"); } base.imm_parseAttr(json_val); }
//--- (YCompass implementation) #pragma warning disable 1998 internal override void imm_parseAttr(YJSONObject json_val) { if (json_val.has("bandwidth")) { _bandwidth = json_val.getInt("bandwidth"); } if (json_val.has("axis")) { _axis = json_val.getInt("axis"); } if (json_val.has("magneticHeading")) { _magneticHeading = Math.Round(json_val.getDouble("magneticHeading") * 1000.0 / 65536.0) / 1000.0; } base.imm_parseAttr(json_val); }
//--- (YQuadratureDecoder implementation) #pragma warning disable 1998 internal override void imm_parseAttr(YJSONObject json_val) { if (json_val.has("speed")) { _speed = Math.Round(json_val.getDouble("speed") * 1000.0 / 65536.0) / 1000.0; } if (json_val.has("decoding")) { _decoding = json_val.getInt("decoding") > 0 ? 1 : 0; } if (json_val.has("edgesPerCycle")) { _edgesPerCycle = json_val.getInt("edgesPerCycle"); } base.imm_parseAttr(json_val); }
//--- (YMultiAxisController implementation) #pragma warning disable 1998 internal override void imm_parseAttr(YJSONObject json_val) { if (json_val.has("nAxis")) { _nAxis = json_val.getInt("nAxis"); } if (json_val.has("globalState")) { _globalState = json_val.getInt("globalState"); } if (json_val.has("command")) { _command = json_val.getString("command"); } base.imm_parseAttr(json_val); }
//--- (YDualPower implementation) #pragma warning disable 1998 internal override void imm_parseAttr(YJSONObject json_val) { if (json_val.has("powerState")) { _powerState = json_val.getInt("powerState"); } if (json_val.has("powerControl")) { _powerControl = json_val.getInt("powerControl"); } if (json_val.has("extVoltage")) { _extVoltage = json_val.getInt("extVoltage"); } base.imm_parseAttr(json_val); }
//--- (YWeighScale implementation) #pragma warning disable 1998 internal override void imm_parseAttr(YJSONObject json_val) { if (json_val.has("excitation")) { _excitation = json_val.getInt("excitation"); } if (json_val.has("compTempAdaptRatio")) { _compTempAdaptRatio = Math.Round(json_val.getDouble("compTempAdaptRatio") * 1000.0 / 65536.0) / 1000.0; } if (json_val.has("compTempAvg")) { _compTempAvg = Math.Round(json_val.getDouble("compTempAvg") * 1000.0 / 65536.0) / 1000.0; } if (json_val.has("compTempChg")) { _compTempChg = Math.Round(json_val.getDouble("compTempChg") * 1000.0 / 65536.0) / 1000.0; } if (json_val.has("compensation")) { _compensation = Math.Round(json_val.getDouble("compensation") * 1000.0 / 65536.0) / 1000.0; } if (json_val.has("zeroTracking")) { _zeroTracking = Math.Round(json_val.getDouble("zeroTracking") * 1000.0 / 65536.0) / 1000.0; } if (json_val.has("command")) { _command = json_val.getString("command"); } base.imm_parseAttr(json_val); }
//--- (YHubPort implementation) #pragma warning disable 1998 internal override void imm_parseAttr(YJSONObject json_val) { if (json_val.has("enabled")) { _enabled = json_val.getInt("enabled") > 0 ? 1 : 0; } if (json_val.has("portState")) { _portState = json_val.getInt("portState"); } if (json_val.has("baudRate")) { _baudRate = json_val.getInt("baudRate"); } base.imm_parseAttr(json_val); }
//--- (YDaisyChain implementation) #pragma warning disable 1998 internal override void imm_parseAttr(YJSONObject json_val) { if (json_val.has("daisyState")) { _daisyState = json_val.getInt("daisyState"); } if (json_val.has("childCount")) { _childCount = json_val.getInt("childCount"); } if (json_val.has("requiredChildCount")) { _requiredChildCount = json_val.getInt("requiredChildCount"); } base.imm_parseAttr(json_val); }
//--- (YLed implementation) #pragma warning disable 1998 internal override void imm_parseAttr(YJSONObject json_val) { if (json_val.has("power")) { _power = json_val.getInt("power") > 0 ? 1 : 0; } if (json_val.has("luminosity")) { _luminosity = json_val.getInt("luminosity"); } if (json_val.has("blinking")) { _blinking = json_val.getInt("blinking"); } base.imm_parseAttr(json_val); }
//--- (YPowerOutput implementation) #pragma warning disable 1998 internal override void imm_parseAttr(YJSONObject json_val) { if (json_val.has("voltage")) { _voltage = json_val.getInt("voltage"); } base.imm_parseAttr(json_val); }
//--- (YLightSensor implementation) #pragma warning disable 1998 internal override void imm_parseAttr(YJSONObject json_val) { if (json_val.has("measureType")) { _measureType = json_val.getInt("measureType"); } base.imm_parseAttr(json_val); }
//--- (YPwmPowerSource implementation) #pragma warning disable 1998 internal override void imm_parseAttr(YJSONObject json_val) { if (json_val.has("powerMode")) { _powerMode = json_val.getInt("powerMode"); } base.imm_parseAttr(json_val); }
//--- (YOsControl implementation) #pragma warning disable 1998 internal override void imm_parseAttr(YJSONObject json_val) { if (json_val.has("shutdownCountdown")) { _shutdownCountdown = json_val.getInt("shutdownCountdown"); } base.imm_parseAttr(json_val); }
//--- (YCurrent implementation) #pragma warning disable 1998 internal override void imm_parseAttr(YJSONObject json_val) { if (json_val.has("enabled")) { _enabled = json_val.getInt("enabled") > 0 ? 1 : 0; } base.imm_parseAttr(json_val); }
//--- (YPwmInput implementation) #pragma warning disable 1998 internal override void imm_parseAttr(YJSONObject json_val) { if (json_val.has("dutyCycle")) { _dutyCycle = Math.Round(json_val.getDouble("dutyCycle") * 1000.0 / 65536.0) / 1000.0; } if (json_val.has("pulseDuration")) { _pulseDuration = Math.Round(json_val.getDouble("pulseDuration") * 1000.0 / 65536.0) / 1000.0; } if (json_val.has("frequency")) { _frequency = Math.Round(json_val.getDouble("frequency") * 1000.0 / 65536.0) / 1000.0; } if (json_val.has("period")) { _period = Math.Round(json_val.getDouble("period") * 1000.0 / 65536.0) / 1000.0; } if (json_val.has("pulseCounter")) { _pulseCounter = json_val.getLong("pulseCounter"); } if (json_val.has("pulseTimer")) { _pulseTimer = json_val.getLong("pulseTimer"); } if (json_val.has("pwmReportMode")) { _pwmReportMode = json_val.getInt("pwmReportMode"); } if (json_val.has("debouncePeriod")) { _debouncePeriod = json_val.getInt("debouncePeriod"); } if (json_val.has("bandwidth")) { _bandwidth = json_val.getInt("bandwidth"); } if (json_val.has("edgesPerPeriod")) { _edgesPerPeriod = json_val.getInt("edgesPerPeriod"); } base.imm_parseAttr(json_val); }
//--- (YBluetoothLink implementation) #pragma warning disable 1998 internal override void imm_parseAttr(YJSONObject json_val) { if (json_val.has("ownAddress")) { _ownAddress = json_val.getString("ownAddress"); } if (json_val.has("pairingPin")) { _pairingPin = json_val.getString("pairingPin"); } if (json_val.has("remoteAddress")) { _remoteAddress = json_val.getString("remoteAddress"); } if (json_val.has("remoteName")) { _remoteName = json_val.getString("remoteName"); } if (json_val.has("mute")) { _mute = json_val.getInt("mute") > 0 ? 1 : 0; } if (json_val.has("preAmplifier")) { _preAmplifier = json_val.getInt("preAmplifier"); } if (json_val.has("volume")) { _volume = json_val.getInt("volume"); } if (json_val.has("linkState")) { _linkState = json_val.getInt("linkState"); } if (json_val.has("linkQuality")) { _linkQuality = json_val.getInt("linkQuality"); } if (json_val.has("command")) { _command = json_val.getString("command"); } base.imm_parseAttr(json_val); }
//--- (YServo implementation) #pragma warning disable 1998 internal override void imm_parseAttr(YJSONObject json_val) { if (json_val.has("position")) { _position = json_val.getInt("position"); } if (json_val.has("enabled")) { _enabled = json_val.getInt("enabled") > 0 ? 1 : 0; } if (json_val.has("range")) { _range = json_val.getInt("range"); } if (json_val.has("neutral")) { _neutral = json_val.getInt("neutral"); } if (json_val.has("move")) { YJSONObject subjson = json_val.getYJSONObject("move"); if (subjson.has("moving")) { _move.moving = subjson.getInt("moving"); } if (subjson.has("target")) { _move.target = subjson.getInt("target"); } if (subjson.has("ms")) { _move.ms = subjson.getInt("ms"); } } if (json_val.has("positionAtPowerOn")) { _positionAtPowerOn = json_val.getInt("positionAtPowerOn"); } if (json_val.has("enabledAtPowerOn")) { _enabledAtPowerOn = json_val.getInt("enabledAtPowerOn") > 0 ? 1 : 0; } base.imm_parseAttr(json_val); }