DcVoltageMeasurement
This service is experimental and may change in the future.
A service that reports a voltage measurement.
import { DcVoltageMeasurement } from "@devicescript/core"
const dcVoltageMeasurement = new DcVoltageMeasurement()
Registers
measurementType
The type of measurement that is taking place. Absolute results are measured with respect to ground, whereas differential results are measured against another signal that is not ground.
type:
Register<number>
(packing formatu8
)constant: the register value will not change (until the next reset)
read only
import { DcVoltageMeasurement } from "@devicescript/core"
const dcVoltageMeasurement = new DcVoltageMeasurement()
// ...
const value = await dcVoltageMeasurement.measurementType.read()
write
and read
will block until a server is bound to the client.
measurementName
A string containing the net name that is being measured e.g. POWER_DUT
or a reference e.g. DIFF_DEV1_DEV2
. These constants can be used to identify a measurement from client code.
type:
Register<string>
(packing formats
)constant: the register value will not change (until the next reset)
read only
import { DcVoltageMeasurement } from "@devicescript/core"
const dcVoltageMeasurement = new DcVoltageMeasurement()
// ...
const value = await dcVoltageMeasurement.measurementName.read()
write
and read
will block until a server is bound to the client.
reading
The voltage measurement.
type:
Register<number>
(packing formatf64
)read only
import { DcVoltageMeasurement } from "@devicescript/core"
const dcVoltageMeasurement = new DcVoltageMeasurement()
// ...
const value = await dcVoltageMeasurement.reading.read()
- track incoming values
import { DcVoltageMeasurement } from "@devicescript/core"
const dcVoltageMeasurement = new DcVoltageMeasurement()
// ...
dcVoltageMeasurement.reading.subscribe(async (value) => {
...
})
write
and read
will block until a server is bound to the client.
readingError
Absolute error on the reading value.
type:
Register<number>
(packing formatf64
)optional: this register may not be implemented
read only
import { DcVoltageMeasurement } from "@devicescript/core"
const dcVoltageMeasurement = new DcVoltageMeasurement()
// ...
const value = await dcVoltageMeasurement.readingError.read()
- track incoming values
import { DcVoltageMeasurement } from "@devicescript/core"
const dcVoltageMeasurement = new DcVoltageMeasurement()
// ...
dcVoltageMeasurement.readingError.subscribe(async (value) => {
...
})
write
and read
will block until a server is bound to the client.
minReading
Minimum measurable current
type:
Register<number>
(packing formatf64
)optional: this register may not be implemented
constant: the register value will not change (until the next reset)
read only
import { DcVoltageMeasurement } from "@devicescript/core"
const dcVoltageMeasurement = new DcVoltageMeasurement()
// ...
const value = await dcVoltageMeasurement.minReading.read()
write
and read
will block until a server is bound to the client.
maxReading
Maximum measurable current
type:
Register<number>
(packing formatf64
)optional: this register may not be implemented
constant: the register value will not change (until the next reset)
read only
import { DcVoltageMeasurement } from "@devicescript/core"
const dcVoltageMeasurement = new DcVoltageMeasurement()
// ...
const value = await dcVoltageMeasurement.maxReading.read()
write
and read
will block until a server is bound to the client.