12 lines
439 B
JavaScript
12 lines
439 B
JavaScript
|
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 })
|
|||
|
}
|
|||
|
})
|
|||
|
})
|
|||
|
}
|