About Slave Connection WhoIs Request
I am devoloping a bacnet Slave application. And I created a thread to set AI values. I am setting the values as periodicaly.
First question is that This solotion is normal. I don't wait any request from master side. And I dont know how I can listen the request?
First question is that, first row of In this Thread is
I mean first I am saying Who I am before setting values.
Is it normal. Or How can listen Who-Is request that coming from master?
Thank you for your responce?
My approach would be to:
- create the LocalDevice
- start the operation of the slave (i.e. whatever generates the AI values and upon change writes the values to the local objects)
- init the LocalDevice
- send the IAm
Master applications will not typically send out WhoIs requests except on startup (although they might occasionally poll just to be sure). The expectation is that new devices will declare their presence with an IAm on startup.
Thank you for your responce;
But There is a case. I think It is posible Slave application can be start first, before Master. In this case Master application cannot know the slave application.
Ok Master will be send WhoIs. But Slave application how will be AmI message
BACnet4J handles that for you. It will receive the WhoIs and reply with an IAm automatically as appropriate (i.e. if it satisfies the WhoIs parameterization).
Really!!! If It is this like It is ok.
But I am tested it with cimetrics bacnet explorer. When I started My slave application first, bacnet explorer cannot see it. But When I started bacnet explorer first, Bacnet explorer can find out my slave application
Make sure the explorer is sending a WhoIs, and if so that any parameterization isn't excluding your slave device.
Now I checked again. I am sure that sending WhoIs message. I see that network analyzer.
I am starting "SlaveDeviceTest" application.
Is there any application or program for testing.
Can you get a trace of the WhoIs?
I atached word document for screen shut
Attachment: download link
The WhoIs trace looks fine, but why isn't it a broadcast? Also, on what port are you starting your local device?
I realized too on last night , I am using different port for localdevice . So that I cannot take whois message. I am so sorry. :)
Broadcase address is 47808 but localdevice port 2068.
I changed the localdevice port to 47808 and the problem is fixed.
Thank you for support.
Shortly there are two questions.
1-What is the remotedevice in bacnet4j. When can be used it? And Which sitiation?
2-There is the constucture for localedevice, it is below
public LocalDevice(int deviceId, String broadcastAddress, String localBindAddress)
Why is being used localBindAddress?
RemoteDevice's are local proxies of other devices on the network. The localBindAddress allows you choose on which NIC to listen.