Device API
Add object to path
Path to add to (e.g. "Device.NAT.PortMapping.")
Optional object to add (if skipped will use default values)
Full path of new object
await usp.add("Device.NAT.PortMapping.")
Delete object at path
Full path to delete (e.g. "Device.NAT.PortMapping.1.")
await usp.del("Device.NAT.PortMapping.1.")
Disconenct from device
await usp.disconnect()
Get value at path
Location of value (e.g. "Device.DeviceInfo.")
await usp.get("Device.WiFi.Radio.1.") // or await usp.get(["Device.WiFi.Radio.1.", "Device.WiFi.Radio.2."])
Connection id
Create a command
Full path of command (e.g. "Device.IP.Diagnostics.IPPing()")
Subscription options (not required)
Function that executes command
const [ping, cleanPing] = await usp.operate("Device.IP.Diagnostics.IPPing()") const results = await ping({ Host: "iopsys.eu" }) await cleanPing()
Resolve references in message
Message with reference in it
Optional level of nesting to resolve to (avoid using high numbers)
await usp.get("Device.WiFi.Radio.1.").then(device.resolve)
Roles of current session
Set value at path
Value to assign
await usp.set("Device.WiFi.Radio.1.", { Name: "radio-1" }) // or await usp.set("Device.WiFi.Radio.1.Name", "radio-1")
Generated using TypeDoc
Device API