getDpsInfos

Requires:
@ray-js/ray≥1.5.2

Method signature
getDpsInfos(params: )

Description

Get all DP information for a device, typically to retrieve DP names, used with updateDpName

Parameters

ParameterTypeRequiredDescription
YesRequest parameters

Return Value

Type: Promise<IGetDpsInfosResponse[]>
Array of DP info; each item contains code, dpId, value, time, type, name

Referenced Types

interfaceIGetDpsInfosResponse
PropertyTypeDescription
codestringDP Code
dpIdnumberDP ID
valuestringDP value
namestringDP name
timenumberMost recent DP report time
typestringDP type

Examples

Basic usage

import { getDpsInfos } from '@ray-js/ray';

getDpsInfos({
  devId: 'vdevo169477319679442',
  gwId: 'vdevo169477319679442',
}).then((res) => {
  console.log('DP info:', res);
}).catch((error) => {
  console.error(error);
});