1
0
mirror of https://github.com/stargieg/bacnet-stack synced 2025-10-26 23:35:52 +08:00
bacnet-stack/include
Steve Karg 17058b23b3 [r3137] Adds two new functions to the ring buffer implementation, one to walk the ring by getting a pointer to the next element in the ring, and the other to Pop (remove) a specified element from somewhere in the ring and then move any elements up towards the head to fill the gap left. With these new functions in place, the Linux MS/TP datalink MSTP_Get_Reply() has been updated to walk the ring buffer to try to find the matching reply. If it is found then it is processed in the same way as usual, and then removed from the ring.
When a packet is received which expects a reply a copy is stored in the PDU ring buffer so it can be matched with the reply. Unfortunately when the reply is received it is only checked against the first entry in the ring buffer. This can cause a failure if a second packet expecting a reply has been received while waiting for the first reply to arrive.
This is a known issue in the bacnet-stack open source stack, and there is a outstanding FIXME in the latest version of the source code:

        /* The ANSWER_DATA_REQUEST state is entered when a  */
        /* BACnet Data Expecting Reply, a Test_Request, or  */
        /* a proprietary frame that expects a reply is received. */
        /* FIXME: MSTP_Get_Reply waits for a matching reply, but
           if the next queued message doesn't match, then we
           sit here for Treply_delay doing nothing */

The fix for this is to check all the messages in the PDU queue to see if any of them match, and if one does then handle it in the normal way. Thank you to Ian Smith of Abelon Systems Ltd. for the patch!
2018-03-25 15:59:10 +02:00
..
abort.h fork from http://sourceforge.net/projects/bacnet/ 2013-03-21 22:53:31 +01:00
access_rule.h update to r3056 from https://sourceforge.net/p/bacnet/code/3056/tree/trunk/bacnet-stack/ add ipv6 and schedule support 2016-10-30 16:16:03 +01:00
address.h update to r3056 from https://sourceforge.net/p/bacnet/code/3056/tree/trunk/bacnet-stack/ add ipv6 and schedule support 2016-10-30 16:16:03 +01:00
alarm_ack.h fork from http://sourceforge.net/projects/bacnet/ 2013-03-21 22:53:31 +01:00
apdu.h fork from http://sourceforge.net/projects/bacnet/ 2013-03-21 22:53:31 +01:00
arcnet.h fork from http://sourceforge.net/projects/bacnet/ 2013-03-21 22:53:31 +01:00
arf.h update to r3056 from https://sourceforge.net/p/bacnet/code/3056/tree/trunk/bacnet-stack/ add ipv6 and schedule support 2016-10-30 16:16:03 +01:00
assigned_access_rights.h update to r3056 from https://sourceforge.net/p/bacnet/code/3056/tree/trunk/bacnet-stack/ add ipv6 and schedule support 2016-10-30 16:16:03 +01:00
authentication_factor_format.h update to r3056 from https://sourceforge.net/p/bacnet/code/3056/tree/trunk/bacnet-stack/ add ipv6 and schedule support 2016-10-30 16:16:03 +01:00
authentication_factor.h update to r3056 from https://sourceforge.net/p/bacnet/code/3056/tree/trunk/bacnet-stack/ add ipv6 and schedule support 2016-10-30 16:16:03 +01:00
awf.h update to r3056 from https://sourceforge.net/p/bacnet/code/3056/tree/trunk/bacnet-stack/ add ipv6 and schedule support 2016-10-30 16:16:03 +01:00
bacaddr.h fork from http://sourceforge.net/projects/bacnet/ 2013-03-21 22:53:31 +01:00
bacapp.h update to r3056 from https://sourceforge.net/p/bacnet/code/3056/tree/trunk/bacnet-stack/ add ipv6 and schedule support 2016-10-30 16:16:03 +01:00
bacdcode.h [r3081] Added encode/decode for BACnet address. 2017-04-04 23:22:21 +02:00
bacdef.h fix compiler warning unused var. add macro unused_var 2016-12-03 12:23:18 +01:00
bacdevobjpropref.h [r3096] Fixed compilation of unit tests. 2017-04-04 23:58:02 +02:00
bacenum.h update to r3056 from https://sourceforge.net/p/bacnet/code/3056/tree/trunk/bacnet-stack/ add ipv6 and schedule support 2016-10-30 16:16:03 +01:00
bacerror.h fork from http://sourceforge.net/projects/bacnet/ 2013-03-21 22:53:31 +01:00
bacint.h [r3082] Added functions to encode/decode unsigned64 values. 2017-04-04 23:23:17 +02:00
bacnet.h fork from http://sourceforge.net/projects/bacnet/ 2013-03-21 22:53:31 +01:00
bacprop.h fork from http://sourceforge.net/projects/bacnet/ 2013-03-21 22:53:31 +01:00
bacpropstates.h fork from http://sourceforge.net/projects/bacnet/ 2013-03-21 22:53:31 +01:00
bacreal.h fork from http://sourceforge.net/projects/bacnet/ 2013-03-21 22:53:31 +01:00
bacsec.h update to r3056 from https://sourceforge.net/p/bacnet/code/3056/tree/trunk/bacnet-stack/ add ipv6 and schedule support 2016-10-30 16:16:03 +01:00
bacstr.h update to r3056 from https://sourceforge.net/p/bacnet/code/3056/tree/trunk/bacnet-stack/ add ipv6 and schedule support 2016-10-30 16:16:03 +01:00
bactext.h [r3083] Added DCC enum text names. 2017-04-04 23:23:49 +02:00
bactimevalue.h update to r3056 from https://sourceforge.net/p/bacnet/code/3056/tree/trunk/bacnet-stack/ add ipv6 and schedule support 2016-10-30 16:16:03 +01:00
bigend.h fork from http://sourceforge.net/projects/bacnet/ 2013-03-21 22:53:31 +01:00
bip.h [r3093] Added function to BIP to detect when the UDP port number changed. 2017-04-04 23:29:56 +02:00
bip6.h update to r3056 from https://sourceforge.net/p/bacnet/code/3056/tree/trunk/bacnet-stack/ add ipv6 and schedule support 2016-10-30 16:16:03 +01:00
bits.h [r3094] Fixed the BITMASK_CHECK macro to actually compare to the mask. 2017-04-04 23:29:56 +02:00
bvlc.h update to r3056 from https://sourceforge.net/p/bacnet/code/3056/tree/trunk/bacnet-stack/ add ipv6 and schedule support 2016-10-30 16:16:03 +01:00
bvlc6.h update to r3056 from https://sourceforge.net/p/bacnet/code/3056/tree/trunk/bacnet-stack/ add ipv6 and schedule support 2016-10-30 16:16:03 +01:00
bytes.h fork from http://sourceforge.net/projects/bacnet/ 2013-03-21 22:53:31 +01:00
client.h [r3084] Added buffer size to COV handler function parameters. 2017-04-04 23:24:30 +02:00
config.h update to r3056 from https://sourceforge.net/p/bacnet/code/3056/tree/trunk/bacnet-stack/ add ipv6 and schedule support 2016-10-30 16:16:03 +01:00
cov.h [r3078] Added buffer size to COV handler function parameters. 2017-04-04 22:28:35 +02:00
crc.h fork from http://sourceforge.net/projects/bacnet/ 2013-03-21 22:53:31 +01:00
credential_authentication_factor.h update to r3056 from https://sourceforge.net/p/bacnet/code/3056/tree/trunk/bacnet-stack/ add ipv6 and schedule support 2016-10-30 16:16:03 +01:00
datalink.h update to r3056 from https://sourceforge.net/p/bacnet/code/3056/tree/trunk/bacnet-stack/ add ipv6 and schedule support 2016-10-30 16:16:03 +01:00
datetime.h [r3085] Added wildcard date comparison functions. 2017-04-04 23:25:03 +02:00
dcc.h [r3086] Fixed JavaDoc comments. 2017-04-04 23:25:49 +02:00
debug.h update to r3056 from https://sourceforge.net/p/bacnet/code/3056/tree/trunk/bacnet-stack/ add ipv6 and schedule support 2016-10-30 16:16:03 +01:00
dlenv.h fork from http://sourceforge.net/projects/bacnet/ 2013-03-21 22:53:31 +01:00
dlmstp.h update to r3056 from https://sourceforge.net/p/bacnet/code/3056/tree/trunk/bacnet-stack/ add ipv6 and schedule support 2016-10-30 16:16:03 +01:00
ethernet.h update to r3056 from https://sourceforge.net/p/bacnet/code/3056/tree/trunk/bacnet-stack/ add ipv6 and schedule support 2016-10-30 16:16:03 +01:00
event.h update to r3056 from https://sourceforge.net/p/bacnet/code/3056/tree/trunk/bacnet-stack/ add ipv6 and schedule support 2016-10-30 16:16:03 +01:00
fifo.h fork from http://sourceforge.net/projects/bacnet/ 2013-03-21 22:53:31 +01:00
filename.h fork from http://sourceforge.net/projects/bacnet/ 2013-03-21 22:53:31 +01:00
get_alarm_sum.h update to r3056 from https://sourceforge.net/p/bacnet/code/3056/tree/trunk/bacnet-stack/ add ipv6 and schedule support 2016-10-30 16:16:03 +01:00
getevent.h fork from http://sourceforge.net/projects/bacnet/ 2013-03-21 22:53:31 +01:00
handlers.h [r3079] Added function to get the DCC password from demo handler. 2017-04-04 22:29:27 +02:00
iam.h fork from http://sourceforge.net/projects/bacnet/ 2013-03-21 22:53:31 +01:00
ihave.h fork from http://sourceforge.net/projects/bacnet/ 2013-03-21 22:53:31 +01:00
indtext.h [r3063] Merged revision(s) 3061 from branches/releases/bacnet-stack-0-8-0: 2016-11-01 19:27:17 +01:00
key.h fork from http://sourceforge.net/projects/bacnet/ 2013-03-21 22:53:31 +01:00
keylist.h update to r3056 from https://sourceforge.net/p/bacnet/code/3056/tree/trunk/bacnet-stack/ add ipv6 and schedule support 2016-10-30 16:16:03 +01:00
lighting.h update to r3056 from https://sourceforge.net/p/bacnet/code/3056/tree/trunk/bacnet-stack/ add ipv6 and schedule support 2016-10-30 16:16:03 +01:00
lso.h fork from http://sourceforge.net/projects/bacnet/ 2013-03-21 22:53:31 +01:00
memcopy.h [r3087] Refactored memcopy range check. 2017-04-04 23:27:20 +02:00
mstp.h update to r3056 from https://sourceforge.net/p/bacnet/code/3056/tree/trunk/bacnet-stack/ add ipv6 and schedule support 2016-10-30 16:16:03 +01:00
mstpdef.h fork from http://sourceforge.net/projects/bacnet/ 2013-03-21 22:53:31 +01:00
mstptext.h fork from http://sourceforge.net/projects/bacnet/ 2013-03-21 22:53:31 +01:00
mydata.h fork from http://sourceforge.net/projects/bacnet/ 2013-03-21 22:53:31 +01:00
npdu.h fork from http://sourceforge.net/projects/bacnet/ 2013-03-21 22:53:31 +01:00
objects.h fork from http://sourceforge.net/projects/bacnet/ 2013-03-21 22:53:31 +01:00
proplist.h update to r3056 from https://sourceforge.net/p/bacnet/code/3056/tree/trunk/bacnet-stack/ add ipv6 and schedule support 2016-10-30 16:16:03 +01:00
ptransfer.h fork from http://sourceforge.net/projects/bacnet/ 2013-03-21 22:53:31 +01:00
rd.h fork from http://sourceforge.net/projects/bacnet/ 2013-03-21 22:53:31 +01:00
readrange.h [r3086] Fixed JavaDoc comments. 2017-04-04 23:25:49 +02:00
reject.h fork from http://sourceforge.net/projects/bacnet/ 2013-03-21 22:53:31 +01:00
ringbuf.h [r3137] Adds two new functions to the ring buffer implementation, one to walk the ring by getting a pointer to the next element in the ring, and the other to Pop (remove) a specified element from somewhere in the ring and then move any elements up towards the head to fill the gap left. With these new functions in place, the Linux MS/TP datalink MSTP_Get_Reply() has been updated to walk the ring buffer to try to find the matching reply. If it is found then it is processed in the same way as usual, and then removed from the ring. 2018-03-25 15:59:10 +02:00
rp.h [r3086] Fixed JavaDoc comments. 2017-04-04 23:25:49 +02:00
rpm.h update to r3056 from https://sourceforge.net/p/bacnet/code/3056/tree/trunk/bacnet-stack/ add ipv6 and schedule support 2016-10-30 16:16:03 +01:00
sbuf.h fork from http://sourceforge.net/projects/bacnet/ 2013-03-21 22:53:31 +01:00
timestamp.h [r3090] Added structure name. 2017-04-04 23:29:55 +02:00
timesync.h fork from http://sourceforge.net/projects/bacnet/ 2013-03-21 22:53:31 +01:00
tsm.h update to r3056 from https://sourceforge.net/p/bacnet/code/3056/tree/trunk/bacnet-stack/ add ipv6 and schedule support 2016-10-30 16:16:03 +01:00
txbuf.h fork from http://sourceforge.net/projects/bacnet/ 2013-03-21 22:53:31 +01:00
ucix.h update add compile switch for bac objects ai,ao,.. 2016-10-30 23:48:37 +01:00
version.h update add compile switch for bac objects ai,ao,.. 2016-10-30 23:48:37 +01:00
vmac.h update to r3056 from https://sourceforge.net/p/bacnet/code/3056/tree/trunk/bacnet-stack/ add ipv6 and schedule support 2016-10-30 16:16:03 +01:00
whohas.h fork from http://sourceforge.net/projects/bacnet/ 2013-03-21 22:53:31 +01:00
whois.h fork from http://sourceforge.net/projects/bacnet/ 2013-03-21 22:53:31 +01:00
wp.h fork from http://sourceforge.net/projects/bacnet/ 2013-03-21 22:53:31 +01:00
wpm.h update to r3056 from https://sourceforge.net/p/bacnet/code/3056/tree/trunk/bacnet-stack/ add ipv6 and schedule support 2016-10-30 16:16:03 +01:00