Open SamuelToh opened 4 years ago
Seems to work:
bacnetClient.on('listening', () => {
bacnetClient.whoIs({address: '192.168.1.255', net: 65535}); // broadcast & global whois
setTimeout(() => {
bacnetClient.close();
}, 5000);
Results in:
{
"len":2,
"type":16,
"service":0,
"header":{
"func":10,
"sender":{
"address":"192.168.1.10:64359",
"forwardedFrom":null,
"type":0,
"net":20,
"adr":[
192,
168,
1,
200,
186,
192
]
},
"apduType":16,
"expectingReply":false,
"confirmedService":false
},
"payload":{
"len":0,
"deviceId":1000,
"maxApdu":1440,
"segmentation":0,
"vendorId":35
}
}
Where this device is not on the local network
Node Version:
12.4.0
Node BACstack Version:
0.2.4
Feature Request / Question
In order to reach out to a specific device, commands like the read property will have to be explicit.
Unicasting
to an address is not sufficient as there can be more than 1 devices responding to the call. Hence to narrow down to a specific target device the parametersnet
andadr
must be set. At the momentwhoIs
does not disclose this.We will need to decode these information and make it available.
Current Behaviour (Bug Report)
N/A
Expected Behaviour (Bug Report)
The structure is recommended as this will make things easier for the lib user. All they need to do here would be to pass on the 'sender' object into the api like
readProp
and not care about the details.Steps to reproduce Issue (Bug Report)
-