//--- (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");
            }
            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);
        }
예제 #3
0
        //--- (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);
        }
예제 #4
0
        //--- (YHumidity implementation)
#pragma warning disable 1998
        internal override void imm_parseAttr(YJSONObject json_val)
        {
            if (json_val.has("relHum"))
            {
                _relHum = Math.Round(json_val.getDouble("relHum") * 1000.0 / 65536.0) / 1000.0;
            }
            if (json_val.has("absHum"))
            {
                _absHum = Math.Round(json_val.getDouble("absHum") * 1000.0 / 65536.0) / 1000.0;
            }
            base.imm_parseAttr(json_val);
        }
예제 #5
0
        //--- (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);
        }
예제 #6
0
        //--- (YVoltageOutput implementation)
#pragma warning disable 1998
        internal override void imm_parseAttr(YJSONObject json_val)
        {
            if (json_val.has("currentVoltage"))
            {
                _currentVoltage = Math.Round(json_val.getDouble("currentVoltage") * 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;
            }
            base.imm_parseAttr(json_val);
        }
예제 #7
0
        //--- (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);
        }
예제 #8
0
        //--- (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);
        }
예제 #9
0
        //--- (YPower implementation)
#pragma warning disable 1998
        internal override void imm_parseAttr(YJSONObject json_val)
        {
            if (json_val.has("cosPhi"))
            {
                _cosPhi = Math.Round(json_val.getDouble("cosPhi") * 1000.0 / 65536.0) / 1000.0;
            }
            if (json_val.has("meter"))
            {
                _meter = Math.Round(json_val.getDouble("meter") * 1000.0 / 65536.0) / 1000.0;
            }
            if (json_val.has("meterTimer"))
            {
                _meterTimer = json_val.getInt("meterTimer");
            }
            base.imm_parseAttr(json_val);
        }
예제 #10
0
        //--- (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);
        }
예제 #11
0
        //--- (YCurrentLoopOutput implementation)
#pragma warning disable 1998
        internal override void imm_parseAttr(YJSONObject json_val)
        {
            if (json_val.has("current"))
            {
                _current = Math.Round(json_val.getDouble("current") * 1000.0 / 65536.0) / 1000.0;
            }
            if (json_val.has("currentTransition"))
            {
                _currentTransition = json_val.getString("currentTransition");
            }
            if (json_val.has("currentAtStartUp"))
            {
                _currentAtStartUp = Math.Round(json_val.getDouble("currentAtStartUp") * 1000.0 / 65536.0) / 1000.0;
            }
            if (json_val.has("loopPower"))
            {
                _loopPower = json_val.getInt("loopPower");
            }
            base.imm_parseAttr(json_val);
        }
예제 #12
0
        //--- (generated code: YGyro 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("xValue"))
            {
                _xValue = Math.Round(json_val.getDouble("xValue") * 1000.0 / 65536.0) / 1000.0;
            }
            if (json_val.has("yValue"))
            {
                _yValue = Math.Round(json_val.getDouble("yValue") * 1000.0 / 65536.0) / 1000.0;
            }
            if (json_val.has("zValue"))
            {
                _zValue = Math.Round(json_val.getDouble("zValue") * 1000.0 / 65536.0) / 1000.0;
            }
            base.imm_parseAttr(json_val);
        }
예제 #13
0
        //--- (YAltitude implementation)
#pragma warning disable 1998
        internal override void imm_parseAttr(YJSONObject json_val)
        {
            if (json_val.has("qnh"))
            {
                _qnh = Math.Round(json_val.getDouble("qnh") * 1000.0 / 65536.0) / 1000.0;
            }
            if (json_val.has("technology"))
            {
                _technology = json_val.getString("technology");
            }
            base.imm_parseAttr(json_val);
        }
예제 #14
0
        //--- (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;
            }
            base.imm_parseAttr(json_val);
        }
예제 #15
0
        //--- (YMotor implementation)
#pragma warning disable 1998
        internal override void imm_parseAttr(YJSONObject json_val)
        {
            if (json_val.has("motorStatus"))
            {
                _motorStatus = json_val.getInt("motorStatus");
            }
            if (json_val.has("drivingForce"))
            {
                _drivingForce = Math.Round(json_val.getDouble("drivingForce") * 1000.0 / 65536.0) / 1000.0;
            }
            if (json_val.has("brakingForce"))
            {
                _brakingForce = Math.Round(json_val.getDouble("brakingForce") * 1000.0 / 65536.0) / 1000.0;
            }
            if (json_val.has("cutOffVoltage"))
            {
                _cutOffVoltage = Math.Round(json_val.getDouble("cutOffVoltage") * 1000.0 / 65536.0) / 1000.0;
            }
            if (json_val.has("overCurrentLimit"))
            {
                _overCurrentLimit = json_val.getInt("overCurrentLimit");
            }
            if (json_val.has("frequency"))
            {
                _frequency = Math.Round(json_val.getDouble("frequency") * 1000.0 / 65536.0) / 1000.0;
            }
            if (json_val.has("starterTime"))
            {
                _starterTime = json_val.getInt("starterTime");
            }
            if (json_val.has("failSafeTimeout"))
            {
                _failSafeTimeout = json_val.getInt("failSafeTimeout");
            }
            if (json_val.has("command"))
            {
                _command = json_val.getString("command");
            }
            base.imm_parseAttr(json_val);
        }
예제 #16
0
        //--- (YPwmOutput 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("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("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("pwmTransition"))
            {
                _pwmTransition = json_val.getString("pwmTransition");
            }
            if (json_val.has("enabledAtPowerOn"))
            {
                _enabledAtPowerOn = json_val.getInt("enabledAtPowerOn") > 0 ? 1 : 0;
            }
            if (json_val.has("dutyCycleAtPowerOn"))
            {
                _dutyCycleAtPowerOn = Math.Round(json_val.getDouble("dutyCycleAtPowerOn") * 1000.0 / 65536.0) / 1000.0;
            }
            base.imm_parseAttr(json_val);
        }
예제 #17
0
        //--- (YProximity 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("detectionThreshold"))
            {
                _detectionThreshold = json_val.getInt("detectionThreshold");
            }
            if (json_val.has("detectionHysteresis"))
            {
                _detectionHysteresis = json_val.getInt("detectionHysteresis");
            }
            if (json_val.has("presenceMinTime"))
            {
                _presenceMinTime = json_val.getInt("presenceMinTime");
            }
            if (json_val.has("removalMinTime"))
            {
                _removalMinTime = json_val.getInt("removalMinTime");
            }
            if (json_val.has("isPresent"))
            {
                _isPresent = json_val.getInt("isPresent") > 0 ? 1 : 0;
            }
            if (json_val.has("lastTimeApproached"))
            {
                _lastTimeApproached = json_val.getLong("lastTimeApproached");
            }
            if (json_val.has("lastTimeRemoved"))
            {
                _lastTimeRemoved = json_val.getLong("lastTimeRemoved");
            }
            if (json_val.has("pulseCounter"))
            {
                _pulseCounter = json_val.getLong("pulseCounter");
            }
            if (json_val.has("pulseTimer"))
            {
                _pulseTimer = json_val.getLong("pulseTimer");
            }
            if (json_val.has("proximityReportMode"))
            {
                _proximityReportMode = json_val.getInt("proximityReportMode");
            }
            base.imm_parseAttr(json_val);
        }
예제 #18
0
        //--- (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);
        }
        //--- (YTemperature implementation)
#pragma warning disable 1998
        internal override void imm_parseAttr(YJSONObject json_val)
        {
            if (json_val.has("sensorType"))
            {
                _sensorType = json_val.getInt("sensorType");
            }
            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("command"))
            {
                _command = json_val.getString("command");
            }
            base.imm_parseAttr(json_val);
        }
예제 #20
0
        //--- (YStepperMotor implementation)
#pragma warning disable 1998
        internal override void imm_parseAttr(YJSONObject json_val)
        {
            if (json_val.has("motorState"))
            {
                _motorState = json_val.getInt("motorState");
            }
            if (json_val.has("diags"))
            {
                _diags = json_val.getInt("diags");
            }
            if (json_val.has("stepPos"))
            {
                _stepPos = json_val.getDouble("stepPos") / 16.0;
            }
            if (json_val.has("speed"))
            {
                _speed = Math.Round(json_val.getDouble("speed") * 1000.0 / 65536.0) / 1000.0;
            }
            if (json_val.has("pullinSpeed"))
            {
                _pullinSpeed = Math.Round(json_val.getDouble("pullinSpeed") * 1000.0 / 65536.0) / 1000.0;
            }
            if (json_val.has("maxAccel"))
            {
                _maxAccel = Math.Round(json_val.getDouble("maxAccel") * 1000.0 / 65536.0) / 1000.0;
            }
            if (json_val.has("maxSpeed"))
            {
                _maxSpeed = Math.Round(json_val.getDouble("maxSpeed") * 1000.0 / 65536.0) / 1000.0;
            }
            if (json_val.has("stepping"))
            {
                _stepping = json_val.getInt("stepping");
            }
            if (json_val.has("overcurrent"))
            {
                _overcurrent = json_val.getInt("overcurrent");
            }
            if (json_val.has("tCurrStop"))
            {
                _tCurrStop = json_val.getInt("tCurrStop");
            }
            if (json_val.has("tCurrRun"))
            {
                _tCurrRun = json_val.getInt("tCurrRun");
            }
            if (json_val.has("alertMode"))
            {
                _alertMode = json_val.getString("alertMode");
            }
            if (json_val.has("auxMode"))
            {
                _auxMode = json_val.getString("auxMode");
            }
            if (json_val.has("auxSignal"))
            {
                _auxSignal = json_val.getInt("auxSignal");
            }
            if (json_val.has("command"))
            {
                _command = json_val.getString("command");
            }
            base.imm_parseAttr(json_val);
        }