ibms-dome/ibms_react/src/utils/baja/bajaUtil.js

12 lines
439 B
JavaScript
Raw Normal View History

2023-02-06 00:06:41 +08:00
export function PointSubscribe(baja, sub, ordPath, pointName) {
// ord <20><><EFBFBD>n<EFBFBD>q<EFBFBD>\<5C><><EFBFBD>I<EFBFBD><49>
baja.Ord.make(`local:|foxs:|station:|slot:/${ordPath}`)
.get()
.then(folder => {
folder.getSlots().is("control:NumericWritable").eachValue((point) => {
if (point.getDisplayName() === pointName) {
baja.Ord.make(`local:|foxs:|station:|slot:/${ordPath}/${pointName}`).get({ subscriber: sub })
}
})
})
}