[Logo] Serotonin Software Community
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
execute multiple bacnet services  XML
Forum Index » BACnet4J general discussion
Author Message
mark33333

Initiate

Joined: 21/07/2010 12:26:19
Messages: 3
Offline

Hi
is it possible to execute multiple services for different bacnet devices simultaneously?

execute multiple of RequestService (each one for different bacnet device) at once and then listen for answer from them?

or is it must be:

execute in sequence send RequestService to 1 device and wait for Ack and then send for another device?
mlohbihler

Master
[Avatar]

Joined: 01/03/2007 22:48:52
Messages: 1456
Offline

The former. Different threads can be used to send messages simultaneously. In fact, multiple messages can be sent to the same device simultaneously. If you want to do this in a single thread, i.e. send the messages and then pick up responses, it is possible, but not necessarily simple.

Best regards,
Matthew Lohbihler
mark33333

Initiate

Joined: 21/07/2010 12:26:19
Messages: 3
Offline

thanks
Just one more question. I'm wondering if it is possible to configure each device on different local port:
first device on local port 47808
second on local port 47809
third on local port 47810
etc... (to prevent local port number conflicts)
and send messages (each message, RequestService in one thread) to all devices simultaneously with "segmentation supported"?
Can segments from one communiaction thread be mixed with segments from another communication (with another divice) in that case?
mlohbihler

Master
[Avatar]

Joined: 01/03/2007 22:48:52
Messages: 1456
Offline

I'm wondering if it is possible to configure each device on different local port:


Yes. It messes a bit with discovery broadcasts though.

and send messages (each message, RequestService in one thread) to all devices simultaneously with "segmentation supported"?


Yes.

Can segments from one communiaction thread be mixed with segments from another communication (with another divice) in that case?


? Not sure what you're after here. Segmentation is required because UDP packet size is limited. A segment is just a part of a larger message; without the other segments it's useless.

Best regards,
Matthew Lohbihler
mark33333

Initiate

Joined: 21/07/2010 12:26:19
Messages: 3
Offline


Thank you for quick response and sorry for my English it could be better.
Can segments from one communiaction thread be mixed with segments from another communication (with another divice) in that case?

I don't understand how segments are assign to message when they are received not in order.
first device on local port 47808
second on local port 47809
third on local port 47810

Segments send from devices could be received not in order. Eg:
1. message1.segment1
2. message2.segment1
3. message3.segment1
4. message1.segment2
5. message2.segment2
6. message3.segment2
Does any of that segments could be assigned to wrong message or even ommited (and corrupt whole RequestServiceAck)?
mlohbihler

Master
[Avatar]

Joined: 01/03/2007 22:48:52
Messages: 1456
Offline

I don't understand how segments are assign to message when they are received not in order.


It's been a while since i wrote that stuff, but it works.

Does any of that segments could be assigned to wrong message or even ommited (and corrupt whole RequestServiceAck)?


Sure, stuff could get corrupted, but it should be handled properly. If you find otherwise, let me know.

Best regards,
Matthew Lohbihler
 
Forum Index » BACnet4J general discussion
Go to:   
Powered by JForum 2.1.9 © JForum Team