//--- (YGenericSensor implementation)

    protected override void _parseAttr(YAPI.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._parseAttr(json_val);
    }
Exemple #2
0
    //--- (YGps implementation)

    protected override void _parseAttr(YAPI.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("constellation"))
        {
            _constellation = json_val.getInt("constellation");
        }
        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._parseAttr(json_val);
    }
Exemple #3
0
    //--- (generated code: YWireless implementation)

    protected override void _parseAttr(YAPI.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._parseAttr(json_val);
    }
    //--- (YBuzzer implementation)

    protected override void _parseAttr(YAPI.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._parseAttr(json_val);
    }
Exemple #5
0
    //--- (YWakeUpMonitor implementation)

    protected override void _parseAttr(YAPI.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._parseAttr(json_val);
    }
    //--- (YRangeFinder implementation)

    protected override void _parseAttr(YAPI.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._parseAttr(json_val);
    }
        //--- (YPowerSupply implementation)

        protected override void _parseAttr(YAPI.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._parseAttr(json_val);
        }
Exemple #8
0
    //--- (end of generated code: YFileRecord definitions)

    public YFileRecord(string data)
    {
        //--- (generated code: YFileRecord attributes initialization)
        //--- (end of generated code: YFileRecord attributes initialization)
        YAPI.YJSONObject p = new YAPI.YJSONObject(data);
        p.parse();
        this._name = p.getString("name");
        this._size = p.getInt("size");
        this._crc  = p.getInt("crc");
    }
Exemple #9
0
    //--- (end of generated code: YWlanRecord definitions)

    public YWlanRecord(string data)
    {
        //--- (generated code: YWlanRecord attributes initialization)
        //--- (end of generated code: YWlanRecord attributes initialization)
        YAPI.YJSONObject p = new YAPI.YJSONObject(data);
        p.parse();
        this._ssid    = p.getString("ssid");
        this._sec     = p.getString("sec");
        this._rssi    = p.getInt("rssi");
        this._channel = p.getInt("channel");
    }
Exemple #10
0
    //--- (generated code: YFiles implementation)

    protected override void _parseAttr(YAPI.YJSONObject json_val)
    {
        if (json_val.has("filesCount"))
        {
            _filesCount = json_val.getInt("filesCount");
        }
        if (json_val.has("freeSpace"))
        {
            _freeSpace = json_val.getInt("freeSpace");
        }
        base._parseAttr(json_val);
    }
    //--- (YTilt implementation)

    protected override void _parseAttr(YAPI.YJSONObject json_val)
    {
        if (json_val.has("bandwidth"))
        {
            _bandwidth = json_val.getInt("bandwidth");
        }
        if (json_val.has("axis"))
        {
            _axis = json_val.getInt("axis");
        }
        base._parseAttr(json_val);
    }
Exemple #12
0
    //--- (YInputChain implementation)

    protected override void _parseAttr(YAPI.YJSONObject json_val)
    {
        if (json_val.has("expectedNodes"))
        {
            _expectedNodes = json_val.getInt("expectedNodes");
        }
        if (json_val.has("detectedNodes"))
        {
            _detectedNodes = json_val.getInt("detectedNodes");
        }
        if (json_val.has("refreshRate"))
        {
            _refreshRate = json_val.getInt("refreshRate");
        }
        if (json_val.has("bitChain1"))
        {
            _bitChain1 = json_val.getString("bitChain1");
        }
        if (json_val.has("bitChain2"))
        {
            _bitChain2 = json_val.getString("bitChain2");
        }
        if (json_val.has("bitChain3"))
        {
            _bitChain3 = json_val.getString("bitChain3");
        }
        if (json_val.has("bitChain4"))
        {
            _bitChain4 = json_val.getString("bitChain4");
        }
        if (json_val.has("bitChain5"))
        {
            _bitChain5 = json_val.getString("bitChain5");
        }
        if (json_val.has("bitChain6"))
        {
            _bitChain6 = json_val.getString("bitChain6");
        }
        if (json_val.has("bitChain7"))
        {
            _bitChain7 = json_val.getString("bitChain7");
        }
        if (json_val.has("watchdogPeriod"))
        {
            _watchdogPeriod = json_val.getInt("watchdogPeriod");
        }
        if (json_val.has("chainDiags"))
        {
            _chainDiags = json_val.getInt("chainDiags");
        }
        base._parseAttr(json_val);
    }
Exemple #13
0
    //--- (YRelay implementation)

    protected override void _parseAttr(YAPI.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"))
        {
            YAPI.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._parseAttr(json_val);
    }
Exemple #14
0
    //--- (YDaisyChain implementation)

    protected override void _parseAttr(YAPI.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._parseAttr(json_val);
    }
    //--- (YLed implementation)

    protected override void _parseAttr(YAPI.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._parseAttr(json_val);
    }
Exemple #16
0
    //--- (YDualPower implementation)

    protected override void _parseAttr(YAPI.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._parseAttr(json_val);
    }
    //--- (YHubPort implementation)

    protected override void _parseAttr(YAPI.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._parseAttr(json_val);
    }
Exemple #18
0
    //--- (YMultiAxisController implementation)

    protected override void _parseAttr(YAPI.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._parseAttr(json_val);
    }
Exemple #19
0
    //--- (YQuadratureDecoder implementation)

    protected override void _parseAttr(YAPI.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._parseAttr(json_val);
    }
Exemple #20
0
    //--- (YCompass implementation)

    protected override void _parseAttr(YAPI.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._parseAttr(json_val);
    }
    //--- (YOsControl implementation)

    protected override void _parseAttr(YAPI.YJSONObject json_val)
    {
        if (json_val.has("shutdownCountdown"))
        {
            _shutdownCountdown = json_val.getInt("shutdownCountdown");
        }
        base._parseAttr(json_val);
    }
Exemple #22
0
    //--- (YPwmPowerSource implementation)

    protected override void _parseAttr(YAPI.YJSONObject json_val)
    {
        if (json_val.has("powerMode"))
        {
            _powerMode = json_val.getInt("powerMode");
        }
        base._parseAttr(json_val);
    }
    //--- (YLightSensor implementation)

    protected override void _parseAttr(YAPI.YJSONObject json_val)
    {
        if (json_val.has("measureType"))
        {
            _measureType = json_val.getInt("measureType");
        }
        base._parseAttr(json_val);
    }
        //--- (YPowerOutput implementation)

        protected override void _parseAttr(YAPI.YJSONObject json_val)
        {
            if (json_val.has("voltage"))
            {
                _voltage = json_val.getInt("voltage");
            }
            base._parseAttr(json_val);
        }
Exemple #25
0
        //--- (YMultiCellWeighScale implementation)

        protected override void _parseAttr(YAPI.YJSONObject json_val)
        {
            if (json_val.has("cellCount"))
            {
                _cellCount = json_val.getInt("cellCount");
            }
            if (json_val.has("externalSense"))
            {
                _externalSense = json_val.getInt("externalSense") > 0 ? 1 : 0;
            }
            if (json_val.has("excitation"))
            {
                _excitation = json_val.getInt("excitation");
            }
            if (json_val.has("tempAvgAdaptRatio"))
            {
                _tempAvgAdaptRatio = Math.Round(json_val.getDouble("tempAvgAdaptRatio") * 1000.0 / 65536.0) / 1000.0;
            }
            if (json_val.has("tempChgAdaptRatio"))
            {
                _tempChgAdaptRatio = Math.Round(json_val.getDouble("tempChgAdaptRatio") * 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._parseAttr(json_val);
        }
    //--- (YServo implementation)

    protected override void _parseAttr(YAPI.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"))
        {
            YAPI.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._parseAttr(json_val);
    }
    //--- (YPwmInput implementation)

    protected override void _parseAttr(YAPI.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._parseAttr(json_val);
    }
    //--- (YBluetoothLink implementation)

    protected override void _parseAttr(YAPI.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._parseAttr(json_val);
    }
    //--- (YAnButton implementation)

    protected override void _parseAttr(YAPI.YJSONObject json_val)
    {
        if (json_val.has("calibratedValue"))
        {
            _calibratedValue = json_val.getInt("calibratedValue");
        }
        if (json_val.has("rawValue"))
        {
            _rawValue = json_val.getInt("rawValue");
        }
        if (json_val.has("analogCalibration"))
        {
            _analogCalibration = json_val.getInt("analogCalibration") > 0 ? 1 : 0;
        }
        if (json_val.has("calibrationMax"))
        {
            _calibrationMax = json_val.getInt("calibrationMax");
        }
        if (json_val.has("calibrationMin"))
        {
            _calibrationMin = json_val.getInt("calibrationMin");
        }
        if (json_val.has("sensitivity"))
        {
            _sensitivity = json_val.getInt("sensitivity");
        }
        if (json_val.has("isPressed"))
        {
            _isPressed = json_val.getInt("isPressed") > 0 ? 1 : 0;
        }
        if (json_val.has("lastTimePressed"))
        {
            _lastTimePressed = json_val.getLong("lastTimePressed");
        }
        if (json_val.has("lastTimeReleased"))
        {
            _lastTimeReleased = json_val.getLong("lastTimeReleased");
        }
        if (json_val.has("pulseCounter"))
        {
            _pulseCounter = json_val.getLong("pulseCounter");
        }
        if (json_val.has("pulseTimer"))
        {
            _pulseTimer = json_val.getLong("pulseTimer");
        }
        if (json_val.has("inputType"))
        {
            _inputType = json_val.getInt("inputType");
        }
        base._parseAttr(json_val);
    }
        //--- (YRealTimeClock implementation)

        protected override void _parseAttr(YAPI.YJSONObject json_val)
        {
            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("timeSet"))
            {
                _timeSet = json_val.getInt("timeSet") > 0 ? 1 : 0;
            }
            base._parseAttr(json_val);
        }