Commit Graph

347 Commits

Author SHA1 Message Date
skarg 6c5fe45769 Changed buffer from volatile pointers to non-volatile data, to pointers to volatile variables. 2012-01-25 19:03:54 +00:00
skarg 6fefac808f Added FIFO Pull function to remove one or more bytes from the FIFO. Added unit tests for FIFO Pull. 2012-01-13 17:56:55 +00:00
skarg e3e706ffa9 Increased number of cycles for testing FIFO. 2012-01-12 23:07:28 +00:00
skarg 1006b642e7 I was thinking that this might need to be done to separate the head from tail in case head is incremented by ISR while this is called. 2012-01-09 23:16:53 +00:00
skarg 10b6e58f2c Improved FIFO_Available by allowing the last byte to be available. 2012-01-06 18:52:44 +00:00
skarg 7d87b88d47 Corrected compiler warnings. 2011-12-20 15:39:30 +00:00
gri6507 fd4a0ebb62 * Updated the perl bindings to work with the new style extract API and removed vestigial code
* Updated the perl bindings readme.txt
* Fixed a small bug in the new bacapp_print_value() function which incorrectly interpreted the return status from the snprintf function.
2011-12-15 00:03:04 +00:00
gri6507 6e82afde79 Another attempt to refactor the bacapp_print_value function into a print() and
an extract() function. The original implementation used calloc() inside the
extract() routine which forced all clients, including embedded builds, to have a
heap. This was very heavy handed. The new solution is must more flexible. 
* If the client want to use the print() functionality, they will have to support
  calloc and string safe variable argument length function similar to snprintf.
  This seems reasonable because if you can print, then you can typically support
  these complex capabilities. 
* For clients that don't want to print, but still want to parse the bacpp value
  into a string, they can use the new extract() method, which only requires
  supports for snprintf. This would require a compile time definition of
  BACAPP_SNPRINTF_ENABLED.
* For clients which don't want the overhead of these heavy handed methods, it is
  possible to set compile time flags to not inherit either the print() or the
  extract() functions.
2011-12-12 16:22:04 +00:00
skarg 4c78ada0ed Changes from r2160 broke microcontroller ports compiles. Reverting until fixed. 2011-12-07 03:16:57 +00:00
gri6507 2b433d72a7 Added the ability to parse the OBJECT_PROPERTY_VALUE into a string (bacapp_extract_value) in addition to outputting it to a stream (bacapp_print_value). 2011-11-28 15:33:58 +00:00
tbrennan3 cbc62dd6c0 Extended the test for supported services for routed devices to the device's PROP_PROTOCOL_SERVICES_SUPPORTED.
Support calling of Routed_Device_Service_Approval() with a NULL buffer if just testing for support.
2011-10-27 20:34:45 +00:00
tbrennan3 0291493fd2 Fixes a build error when BACAPP_PRINT_ENABLED=1 but PRINT_ENABLED isn't. 2011-10-20 19:25:20 +00:00
tbrennan3 416eee50fe Per the BTL test cases for 14.1.7, 14.1.x1, and 14.1.8, the device should respond back with an original-broadcast-npdu for a Forward-NPDU and an Original-Broadcast-NPDU; this makes this so for BACnet/IP.
Minor fixes for build errors and warnings.
2011-10-19 18:48:24 +00:00
skarg 4a779febca Added some volatile keywords to make it interrupt safe. 2011-10-18 02:24:44 +00:00
skarg dda49e2824 Added Relinquish-Default to Enumerated special property cases. 2011-10-06 15:24:30 +00:00
skarg 551637d6af Undefined error print since this case is very common for the client applications. 2011-10-05 14:31:09 +00:00
skarg 9c1f651458 Moved Device object dependency to the demo handlers. 2011-10-03 22:24:57 +00:00
skarg ed4a72ed0a Fixed print-enabled define checking. 2011-10-03 22:05:39 +00:00
skarg 2b0fac263c Added Added more explicit error checking on WritePropertyMultiple decoding (untested). 2011-10-03 19:18:27 +00:00
skarg 3bd72dc18d Removed fix for Revision 2094, as this broke the ability to bind to MAC addresses, and the NPDU is the source for the SNET in the address. 2011-10-03 14:12:53 +00:00
skarg 2ffdc9bc53 Added missing return result to fix compiler warning. 2011-10-03 14:00:25 +00:00
skarg 043b840d82 Removed extra word to fix compiler error. 2011-10-03 13:50:26 +00:00
petermcs fe7af042b9 Array index is now unsigned so > 0 test will not work. Use explicit check for BACNET_ARRAY_ALL instead. 2011-10-02 20:19:07 +00:00
tbrennan3 7eb2109dc4 Added the ability to ask for the BVLC Function Code in the lower layers; particular need was to recognize bcasts and not respond with Reject-Message-to-Network. 2011-09-30 20:00:48 +00:00
tbrennan3 3c9f0c9298 Had an issue where Original_Broadcast requests were not responded to with Original_Broadcast packets; this is a fix for that. 2011-09-19 15:20:26 +00:00
tbrennan3 24bea2eb82 Handle the case where Device ID is BACNET_MAX_INSTANCE: for RP and RPM, put the real device ID in the response. 2011-09-19 13:06:55 +00:00
tbrennan3 7b3a6b3465 Missed a NAK case; got it now! 2011-09-18 19:49:14 +00:00
tbrennan3 9d9c1eedaf More compliant DCC Disable or Disable_Initiation: if no time argument is given, take it as indefinite (a large number) rather than 0. 2011-09-18 17:13:04 +00:00
skarg 120c2734ee Added ascii-hex conversion in the octet-string library to allow ascii-hex to be parsed correctly from demo applications. 2011-09-17 04:21:32 +00:00
tbrennan3 ce7e651156 Provided a feedback path, so we can find out if our foreign device registration has been NAK'd. 2011-09-12 21:21:39 +00:00
tbrennan3 364293b075 Added NAK functionality for BBMD commands when not supported.
Also record any BVLL Result returned to us (eg, for foreign device registration).
2011-09-12 20:52:42 +00:00
tbrennan3 46d7daf405 Arranged the BBMD functions so that BBMD_ENABLE shrouds all the code used just by implementations which serve as a BBMD device.
Left the few for registering as a foreign device in the common code body (no #ifdef around them), and moved them to one area toward the end of the file.  (Seemed like too few to justify having their own source code file.) Allow foreign device registration function without requiring BBMD_ENABLE.
2011-09-12 11:54:42 +00:00
skarg 3e134011a1 Splinted the code, and fixed the errors. 2011-08-24 23:29:53 +00:00
skarg 58691c16d6 Changed the Treply_delay wait to be smaller when the next message in the queue is does not match. 2011-08-24 12:48:33 +00:00
skarg 26b5fdd3d0 Returned Tusage_delay to the MS/TP state machines to fix excessive Reply-Posponed messages when received packet is decoupled from immediate handling. Some BACnet routers do not handle Reply-Postponed correctly and drop the subsequent valid reply.
Added Slave Node FSM to linux/win32 MS/TP layer.
Added PDU queue to Linux MS/TP datalink layer.
2011-08-24 12:33:20 +00:00
k001a c40b355694 Handling of GetAlarmSummary service. 2011-08-23 21:22:06 +00:00
skarg f19f2c29d9 Converted all the BACnet-array-index variables from int32 to uint32 as they were intended. 2011-08-23 20:11:42 +00:00
tbrennan3 a92160f73d Revised BBMD registration functions to return something approximating a goodness value. (Still too happy for invalid BBMDs, but it's a start.)
Fixed handling of bacapp_decode_context_data() for some of the more unusual (empty, etc) cases I've seen.
2011-08-22 19:45:41 +00:00
skarg 9da1ab453a Added some encoding functions for WPM. Thank you, Nikola Jelic! 2011-08-19 17:21:39 +00:00
skarg 61f0a0211d Splinted files and corrected splint errors. 2011-08-17 03:59:31 +00:00
skarg 8d9b987064 Corrected unit tests for iam, event, ai, and bacdevobjpropref. Removed device from unit test since it needs reworked for unit testing due to object dependencies. Noted that lc object fails test and needs fixed. 2011-08-17 03:47:43 +00:00
skarg 3e1cb1847f Indented project. 2011-08-17 02:27:11 +00:00
k001a 7ccbb406b4 WritePropertyMultiple: if an attempt is made to write to a commandable property without specifying the priority then the writing is at the lowest priority (number 16). 2011-08-15 09:35:14 +00:00
k001a c61c096dc7 Intrinsic reporting for analog-input objects.
Print on output details of WritePropertyMultiple.
2011-07-11 21:29:51 +00:00
skarg ff393a665a Fixing DOS/Unix/MAC EOL and line endings using fixup.sh script. 2011-07-09 17:25:42 +00:00
skarg 51c6134e15 Converted comments to C style using convert.sh script. 2011-07-09 17:23:41 +00:00
skarg 97e70a55b7 Changed Hop Count NPDU encoding to encode the actual hop count, not one less. 2011-07-07 20:53:27 +00:00
skarg ad27b84949 Changed Hop Count default to 255. BTL NPDU tests expect Hop Count to start at 255. Added ability of Hop Count default to be overridden in Makefile or project file if you need to make it smaller in your implementation. 2011-07-07 16:43:43 +00:00
k001a ccf1335979 Added Notification Class object. I will use it to intrinsic reporting.
Notification Class objects can be disabled when define INTRINSIC_REPORTING (bacdef.h) will be removed.
2011-06-17 16:23:47 +00:00
k001a 52c745cd06 Removed encode_tagged_enumerated function, because it was identical like encode_application_enumerated (I didn't see this before). 2011-06-14 21:25:32 +00:00