DcCurrentMeasurement
This service is experimental and may change in the future.
A service that reports a current measurement.
import { DcCurrentMeasurement } from "@devicescript/core"
const dcCurrentMeasurement = new DcCurrentMeasurement()
Registers
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 { DcCurrentMeasurement } from "@devicescript/core"
const dcCurrentMeasurement = new DcCurrentMeasurement()
// ...
const value = await dcCurrentMeasurement.measurementName.read()
write
and read
will block until a server is bound to the client.
reading
The current measurement.
type:
Register<number>
(packing formatf64
)read only
import { DcCurrentMeasurement } from "@devicescript/core"
const dcCurrentMeasurement = new DcCurrentMeasurement()
// ...
const value = await dcCurrentMeasurement.reading.read()
- track incoming values
import { DcCurrentMeasurement } from "@devicescript/core"
const dcCurrentMeasurement = new DcCurrentMeasurement()
// ...
dcCurrentMeasurement.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 { DcCurrentMeasurement } from "@devicescript/core"
const dcCurrentMeasurement = new DcCurrentMeasurement()
// ...
const value = await dcCurrentMeasurement.readingError.read()
- track incoming values
import { DcCurrentMeasurement } from "@devicescript/core"
const dcCurrentMeasurement = new DcCurrentMeasurement()
// ...
dcCurrentMeasurement.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 { DcCurrentMeasurement } from "@devicescript/core"
const dcCurrentMeasurement = new DcCurrentMeasurement()
// ...
const value = await dcCurrentMeasurement.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 { DcCurrentMeasurement } from "@devicescript/core"
const dcCurrentMeasurement = new DcCurrentMeasurement()
// ...
const value = await dcCurrentMeasurement.maxReading.read()
write
and read
will block until a server is bound to the client.