getVoltage method

double getVoltage()

Implementation

double getVoltage() {
  final pVoltage = calloc<Double>();
  try {
    bindings.voltageInputGetVoltage(_handle!, pVoltage);
    return pVoltage.value;
  } catch (e) {
    throw PhidgetException('An error occurred getting the voltage: $e');
  } finally {
    calloc.free(pVoltage);
  }
}