PCMonitor
This service is experimental and may change in the future.
Measures PC monitor.
import { PCMonitor } from "@devicescript/core"
const PCMonitor = new PCMonitor()
Registers
cpuUsage
CPU usage in percent.
type:
Register<number>
(packing formatu8
)read only
import { PCMonitor } from "@devicescript/core"
const PCMonitor = new PCMonitor()
// ...
const value = await PCMonitor.cpuUsage.read()
- track incoming values
import { PCMonitor } from "@devicescript/core"
const PCMonitor = new PCMonitor()
// ...
PCMonitor.cpuUsage.subscribe(async (value) => {
...
})
write
and read
will block until a server is bound to the client.
cpuTemperature
CPU temperature in Celsius.
type:
Register<number>
(packing formatu8
)read only
import { PCMonitor } from "@devicescript/core"
const PCMonitor = new PCMonitor()
// ...
const value = await PCMonitor.cpuTemperature.read()
- track incoming values
import { PCMonitor } from "@devicescript/core"
const PCMonitor = new PCMonitor()
// ...
PCMonitor.cpuTemperature.subscribe(async (value) => {
...
})
write
and read
will block until a server is bound to the client.
ramUsage
RAM usage in percent.
type:
Register<number>
(packing formatu8
)read only
import { PCMonitor } from "@devicescript/core"
const PCMonitor = new PCMonitor()
// ...
const value = await PCMonitor.ramUsage.read()
- track incoming values
import { PCMonitor } from "@devicescript/core"
const PCMonitor = new PCMonitor()
// ...
PCMonitor.ramUsage.subscribe(async (value) => {
...
})
write
and read
will block until a server is bound to the client.
gpuInformation
GPU info.
type:
Register<any[]>
(packing formatu8 u8
)track incoming values
import { PCMonitor } from "@devicescript/core"
const PCMonitor = new PCMonitor()
// ...
PCMonitor.gpuInformation.subscribe(async (value) => {
...
})
write
and read
will block until a server is bound to the client.
networkInformation
Network transmit/receive speed in Kbytes per second.
A measure of PC monitor.
type:
Register<any[]>
(packing formatu16 u16
)track incoming values
import { PCMonitor } from "@devicescript/core"
const PCMonitor = new PCMonitor()
// ...
PCMonitor.networkInformation.subscribe(async (value) => {
...
})
write
and read
will block until a server is bound to the client.