A question about LocalDevice and RemoteDevice
I am reading the test examples in BACnet4J and have some questions. Could you please help me with them? Thank you very much!
Does the IP address for LocalDevice has to be the IP of the computer? What does this address mean?
When creating the RemoteDevice, I found that the InstanceNumber does not impact the program. As long as the Address is correct, the program will always run. And most of the examples does not give any value to Network. What does InstanceNumber and Network for?
Thank you very much!
- There are two IP addresses you can supply to a local device. The first is a broadcast address. If you don't know what this is, check out this: http://en.wikipedia.org/wiki/Broadcast_address.
The second is the local bind address. Often, something like "0.0.0.0" is fine, but if your host is multihomed you may want to be more specific. I recommend you don't set one unless you know why you might have to.
- Typically you won't create your own remote devices. These are created automatically when you receive IAm messages (in response to your WhoIs).The instance number is an identifier that typically won't change, and so can in many cases be used to uniquely identify a piece of equipment. It is also what is referenced in a WhoIs request when you specify limits.
Network is only required when - like you - the BACnet installation consists of more than one network. The network number is then an identifier of the network segment on which the device lives.