int HVS_B0307::ReadVoltage(__u16* v) { __u16 code; int rc=ReadCode(&code); if ( rc&CAMAC_CC_ERRORS ) return rc; *v = Voltage(code); return rc; }
double ThreeWayPowerMerge::Current() { double Volts = Voltage(); if (Volts > 0.0) { return power_load / Volts; } return 0.0; }
bool DSKY::IsPowered() { if (Voltage() < SP_MIN_ACVOLTAGE){ return false; } if (DimmerRotationalSwitch != NULL) { if (DimmerRotationalSwitch->GetState() == 0) { return false; } } return true; }
void FORTE_iCreateBattery::executeEvent(int pa_nEIID){ switch (pa_nEIID){ case scm_nEventREQID: create_battery_charge(); Charging() = static_cast<TForteInt16>(gc_charge_state); //get_create_charging_state(LAG()); Voltage() = static_cast<TForteInt16>(gc_batt_voltage); Current() = static_cast<TForteInt16>(gc_current_flow); Temperature() = static_cast<TForteInt16>(gc_batt_temp); Charge() = static_cast<TForteInt16>(gc_batt_charge); Capacity() = static_cast<TForteInt16>(gc_batt_capacity); sendOutputEvent(scm_nEventCNFID); break; } }
int PTPSoCTestJigInterface2::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: on_switchFLY_clicked(); break; case 1: on_switchSRCIMP_clicked(); break; case 2: on_comboBox_10_currentIndexChanged((*reinterpret_cast< int(*)>(_a[1]))); break; case 3: EnDisSRCIM((*reinterpret_cast< bool(*)>(_a[1]))); break; case 4: TestButton(); break; case 5: SwitchMux(); break; case 6: ReadCodeID(); break; case 7: ReadRelays(); break; case 8: ResetRelays(); break; case 9: SendCommand(); break; case 10: Multimeter(); break; case 11: Oscilloscope(); break; case 12: FunctionGenerator(); break; case 13: ShortLocator(); break; case 14: InCircuitMeasurement(); break; case 15: VoltageCurrent(); break; case 16: Voltage((*reinterpret_cast< int(*)>(_a[1]))); break; case 17: R2Wire((*reinterpret_cast< int(*)>(_a[1]))); break; case 18: R4Wire((*reinterpret_cast< int(*)>(_a[1]))); break; case 19: Current((*reinterpret_cast< int(*)>(_a[1]))); break; case 20: Oscilloscope1((*reinterpret_cast< int(*)>(_a[1]))); break; case 21: Oscilloscope2((*reinterpret_cast< int(*)>(_a[1]))); break; case 22: FunctionGenerater((*reinterpret_cast< int(*)>(_a[1]))); break; case 23: ShortLocater((*reinterpret_cast< int(*)>(_a[1]))); break; case 24: InCircuitMeasureMent((*reinterpret_cast< int(*)>(_a[1]))); break; case 25: VoltageCurrent1((*reinterpret_cast< int(*)>(_a[1]))); break; case 26: VoltageCurrent2((*reinterpret_cast< int(*)>(_a[1]))); break; case 27: MuxInputs((*reinterpret_cast< int(*)>(_a[1]))); break; case 28: callMuxTestInput(); break; case 29: callMuxRefInput(); break; case 30: callCommandInput(); break; case 31: EmbeddedKey(); break; case 32: CommandSelection((*reinterpret_cast< int(*)>(_a[1]))); break; case 33: psocError((*reinterpret_cast< bool(*)>(_a[1]))); break; case 34: receiveValue((*reinterpret_cast< uint(*)>(_a[1]))); break; case 35: receiveValue((*reinterpret_cast< double(*)>(_a[1]))); break; case 36: receiveValue((*reinterpret_cast< QString(*)>(_a[1]))); break; default: ; } _id -= 37; } return _id; }
Voltage BatteryVoltage::create() { const double R1 = 806.0; const double R2 = 2000.0; return Voltage(BATT, (R1+R2)/R2); }