Commit Graph

313 Commits

Author SHA1 Message Date
Steve Karg adff1f9c0f Fixed the ReinitializeDevice and DeviceCommunicationControl password length checking for non-UTF8 passwords. (#914) 2025-02-13 12:58:54 -06:00
Steve Karg f8e9ab8d86 Changed link-speed, network-number, network-number-quality, and apdu-length properties of the network port object to be optional when protocol-revision is 24 or greater. (#913) 2025-02-13 08:44:30 -06:00
Steve Karg 7b9d6d7dc5 Fixed error-code returned when an object does not support WriteProperty but has properties that are known. (#912) 2025-02-12 16:54:40 -06:00
Steve Karg ae135cd368 Bugfix/property list consistency testing (#910)
* Added unit test while reading all object properties to flag properties not in the property-list.

* Added enumeration for last-property used in unit testing.

* Added missing reliability property in the basic multistate output object example.

* Removed polarity property in binary value object as it is not standard.
2025-02-12 12:14:01 -06:00
Steve Karg bc2438f85b Fixed structured view object subtype get and set. (#909) 2025-02-10 09:56:52 -06:00
Steve Karg 66329a05a0 Bugfix/property array element zero size (#908)
* Changed BACnetARRAY index validation into ReadProperty, ReadPropertyMultiple, WriteProperty, and WritePropertyMultiple handlers.

* Changed the basic and example objects after refactoring BACnetARRAY index validation into ReadProperty, ReadPropertyMultiple, WriteProperty, and WritePropertyMultiple handlers.

* Added BACnet application decoder that understands that an array element of zero is an unsigned integer tagged value.  Fixes RP and RPM apps when reading the array element zero of arrays.
2025-02-10 09:44:53 -06:00
Steve Karg da3aaf3b48 Added Write_Enabled flag API into multi-state-input and multi-state-value basic objects. (#903) 2025-02-06 14:10:56 -06:00
Steve Karg 4d0c626c1d Fixed IPv6 handler to ignore original-broadcast when regiistered as a foreign-device (#898) 2025-01-29 15:28:35 -06:00
Steve Karg 44c2bccdeb Added linked list of lighting-command notification callbacks, (#893) 2025-01-21 14:30:38 -06:00
Steve Karg cfe257fe69 Fixed spelling errors detected by code-spell utility. (#895)
* Fixed spelling errors detected by code-spell utility.

* Fixed cppcheck preprocessorErrorDirective. Suppressed new cppcheck warnings until fixed.
2025-01-21 13:31:43 -06:00
Steve Karg 6806cc3bb7 Fixed CharacterString Value object name default and reverted API chan… (#888) 2025-01-06 11:40:03 -06:00
Tomasz Kazimierz Motyl 2ba59abbf8 Added DeleteObject and Cleanup support to basic CharacterString object (#886) 2025-01-06 08:20:49 -06:00
Steve Karg 94b3809a58 Bugfix/confirmed handlers empty service request (#885)
* Added reject in all confirmed service handlers, except GetEventInformation, when confirmed services with zero length occur which rejects with required parameters are missing message.

* Refactored errno use in service using debug_perror. Changed debug_perror usage to debug_fprintf. 

* Updated file and function headers in basic/service modules.

* Changed NDPU priority on confirmed messages to use requested NDPU priority.

* Renamed debug_aprintf to debug_printf_stdout for clarity.

* Convert most debug_fprintf usage to debug_print to reduce text bloat in AVR build
2025-01-05 10:09:39 -06:00
Jonathan 788d31902e PROP_RELIABILITY added to MSI and MSV as they answer to read request (#880)
Read request worked but write request gave "unknown property" error.

PROP_RELIABILITY is already (at least) in AI and AV (meaning that it make sense to add it to MSI and MSV rather than removing its reading).
2024-12-19 10:28:12 -06:00
Jonathan a9942de186 av.c, write present value: If type is not valid, don't overwrite error code (#881) 2024-12-19 10:27:10 -06:00
Jonathan 389b6a7d4d h_dcc.c : Return correct error when no service request (#877) 2024-12-18 11:40:23 -06:00
Steve Karg c7867f1ca9 Revert "DCC initiation disabled, only proceess and initiate allowed services for protocol-revision 20 (#868)"
This reverts commit 5a89525fec.

The honoring of DCC initiation disabled is accomplished in the various
bacnet/basic/service/s_xyz.c sending service modules.
2024-12-11 07:53:23 -06:00
pkjkaindi 5a89525fec DCC initiation disabled, only proceess and initiate allowed services for protocol-revision 20 (#868) 2024-12-10 14:22:28 -06:00
Steve Karg d4cbec91e2 Enabled style and CERT-C addon for CPPCHECK (#869)
* Enabled style and CERT-C addon for CPPCHECK with some suppressions and fixed the defects found..
2024-12-10 07:56:24 -06:00
Steve Karg f38b75b389 Fixed DeviceCommunicationControl service handler to return Service Request Denied when the DISABLE parameter is given in protocol-revision 20 or higher builds. (#867) 2024-12-05 10:17:44 -06:00
Steve Karg 001b69cbd8 Fixed dlmstp ringbuffer initialization corruption (#865)
* Added ringbuf API for testing.

* Fixed basic ms/tp datalink packet ringbuffer initialization buffer overrun.

* Added basic ms/tp datalink unit test

* Added Ringbuf_Initialize() API with buffer size checking.

* Changed examples to use Ringbuf_Initialize() API for buffer size checking.
2024-12-02 07:32:57 -06:00
Jonathan f28b03bf81 msv.c : Fix typo in Object_Name (#864) 2024-11-26 20:18:38 -06:00
Jonathan 1924ab9540 device.c : Add BitString_Value_Create and BitString_Value_Delete in Object_Table (#863) 2024-11-26 20:18:06 -06:00
Steve Karg fd3be47d86 Feature/date time mstimer clock (#861)
* Added daylight savings time calculation module with unit testing.

* Added datetime daylight savings time and clock API

* Added basic datetime_local() clock using mstimer as basis and time-sync option.  Integrated clock with ports/stm32f4xx example.
2024-11-24 11:20:25 -06:00
Steve Karg cdda524afc Added Time-Of-Device-Restart property to example device. (#860)
* Added Time-Of-Device-Restart property to example device.

* Added BACnetTimeStamp bacapp support for encode, decode, and parse.

* Added specific addresses handling to apps/writeprop bacwp command line.
2024-11-22 19:14:09 -06:00
Steve Karg 776b212995 Removed strcasecmp and strncasecmp because they are non-standand C functions. (#858) 2024-11-21 12:29:08 -06:00
Steve Karg 1375347ab6 Added bacnet_strnlen and bacnet_stricmp to avoid libc compiler problems (#857)
* Added bacnet_strnlen and bacnet_stricmp to avoid libc compiler problems

* FIxed compiler warnings in printf conversions.
2024-11-21 06:43:37 -06:00
Tomasz Kazimierz Motyl c71b2e3a66 Merge pull request #82 from se-apc/devel/object_event_state (#853)
Replacing hardcoded NORMAL event state with the factual objects event…

Co-authored-by: Tomasz Kazimierz Motyl <tomasz.motyl@se.com>
2024-11-21 05:20:30 -06:00
Steve Karg 51c915a5da Bugfix/lighting output dimming refactor (#855)
* Refactored lighting command operations from the lighting output object, and added unit testing. Integrated the result back into lighting-output object.
2024-11-13 15:24:25 -06:00
Tomasz Kazimierz Motyl 35d49a14ee Merge pull request #81 from se-apc/dc_Analogs_Event_Detection_Enable (#854)
Dc analogs event detection enable

Co-authored-by: Tomasz Kazimierz Motyl <tomasz.motyl@se.com>
Co-authored-by: dcmaverick <150046088+dcmaverick@users.noreply.github.com>
2024-11-13 08:37:08 -06:00
Tomasz Kazimierz Motyl ab74620449 Merge pull request #83 from se-apc/bugfix/fixing_error_condition_for__max_recipients_wp (#852)
Fixing ERROR_CODE_NO_SPACE_TO_WRITE_PROPERTY condition

Co-authored-by: Tomasz Kazimierz Motyl <tomasz.motyl@se.com>
2024-11-13 08:26:46 -06:00
Steve Karg cf77abac9b Feature/bacnet secure connect hub (#818)
* Added BACnet Secure Connect datalink.

* Added BACnet/SC hub application
---------

Co-authored-by: Kirill Neznamov <kirill.neznamov@dsr-corporation.com>
Co-authored-by: Mikhail Antropov <michail.antropov@dsr-corporation.com>
Co-authored-by: Ondřej Hruška <ondra@ondrovo.com>
Co-authored-by: Patrick Grimm <patrick@lunatiki.de>
2024-11-04 07:05:26 -06:00
Steve Karg a41e8177ba Added IPv6 Zone Index function to return ASCII. (#838) 2024-10-29 15:32:54 -05:00
Steve Karg 1444715c5a Add network port callbacks for pending changes activate and discard. (#836) 2024-10-29 14:28:21 -05:00
Steve Karg 089caf7e4b Fixed BACnet basic file object to have dynamic name, mime-type, path. (#835) 2024-10-29 13:30:03 -05:00
Steve Karg 3329dff337 Added WriteGroup service and Channel object interfaces (#829) 2024-10-25 10:43:29 -05:00
Steve Karg dcf79b038f Enabled BACnetARRAY checking when using proplist.c and added to apps/epics (#823) 2024-10-23 13:54:48 -05:00
Steve Karg c3cb72bc41 Fixed BACNET_APPLICATION_DATA_VALUE declarations to be initialized so that the next pointer is NULL by default. (#814) 2024-10-18 07:43:39 -05:00
Tomasz Kazimierz Motyl bcb82841fb Merge pull request #78 from se-apc/bugfix/stack_smashing_on_cov_subscriptions_encoding (#802)
Resolving stack-smashing problem associated with variable length of subscriber's process ID 2..5 bytes

Co-authored-by: Tomasz Kazimierz Motyl <tomasz.motyl@se.com>
2024-10-09 12:31:13 -05:00
Steve Karg c4c1d9f921 Added define to control IP_DHCP_Enable property being present in Network Port object (#796) 2024-10-04 22:15:31 -05:00
Patrick Grimm 712dda8bbe fix server app doesn't work with BAC_ROUTING (#783) 2024-10-04 13:47:52 -05:00
Jonathan 97cb612d6d netport.c : Tiny improvements (#792) 2024-10-02 08:05:06 -05:00
Steve Karg c18768ba61 Fixed BACnetAccessRule application integration into Access Rights object. Improved unit testing and code coverage. (#790) 2024-09-30 14:04:30 -05:00
Steve Karg 7b18add6d3 Issues/issue 787 app bacepics misses optional parameters for the device object (#789)
* Added some optional properties into the object property lists up to protocol-revision 22

* Added serial-number property to basic device object example.
2024-09-27 16:22:58 -05:00
Steve Karg 3eee88dd31 Added optional description property to basic network port object example. (#788) 2024-09-27 14:43:41 -05:00
Patrick Grimm cd3f79d544 Added ucix_get_list and ucix_set_list function (#780) 2024-09-24 16:24:28 -05:00
Steve Karg 3d86873346 Bugfix/read property multiple client errors (#765)
* Fixed variable data type for boolean in RPM structure.

* Fixed RPM error handling to use callback.

* Fixed bacrpm app example when not enough command line parameters are used

* Fixed empty-list EPICS printing.

* Fixed RPM-Ack processing for end of list-of-results

* Added minimal handling for segmentation-not-supported during RPM of object properties.
2024-09-21 09:26:09 -05:00
Tomasz Kazimierz Motyl 869a827d55 Secured Active-COV-Subscriptions property encoding. (#763) 2024-09-21 09:22:08 -05:00
Tomasz Kazimierz Motyl f4325f00b5 Fixed UTF-8 passwords for DeviceCommunicationControl to hold up to 20 UTF-8 characters (#767) 2024-09-19 08:37:36 -05:00
Jonathan b9adcc8097 Clean "types-limits" warnings (#766) 2024-09-19 08:31:49 -05:00