Skip to content

Commit

Permalink
Merge pull request #71 from iain-anderson/config-redux-branch
Browse files Browse the repository at this point in the history
fix: reduce config size to fit within Consul limits
  • Loading branch information
edward-scott committed Dec 12, 2022
2 parents f964847 + b465bc3 commit 3ba4b59
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
## EdgeX BACnet Device Service
[Github repository](https://github.com/edgexfoundry/device-bacnet-c)

## v2.3.1

<a name="2.3.0"></a>
### Bug Fixes 🐛

- Reduce configuration size to fit within Consul limits
- Fix wrong command line in docker configuration

## v2.3.0 - 2022-11-09

Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ethernet (/IP) or serial (/MSTP).

### Requirements
This device service requires the EdgeX Device SDK for C
(device-sdk-c), version 2.0.x
(device-sdk-c), version 2.3

### BACnet stack
The device service is built using Steve Karg's BACnet stack version 0.8.6. Some
Expand Down Expand Up @@ -76,10 +76,14 @@ profiles included are for the KMC BAC-4021C, KMC BAC-5051E, KMC BAC-5901CE, KMC
BAC-9001 and for the Simple Server Application from the BACnet stack.

## Example Configurations
Example TOML configurations for the device service are present in res/{ip,
mstp}/. The BACnet/IP configuration contains a commented out section with an
An example TOML configuration for the device service is present in the res/
drectory. The configuration contains a commented out section with an
example on how to set up the device service to point to a BBMD device.

The default port for the service is 59980. The alternative port 59981 has been
reserved, for deployments where it is required to run instances of both ip and
mstp services.

## Documentation
Further documentation can be found in the docs/ directory. This describes
device addressing, deviceResource specification, operation with the simulator,
Expand Down
5 changes: 4 additions & 1 deletion src/c/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -664,9 +664,12 @@ int main (int argc, char *argv[])
/* Setup default configuration */

defaults = iot_data_alloc_map (IOT_DATA_STRING);
#ifdef BACDL_MSTP
iot_data_string_map_add (defaults, "DefaultDevicePath", iot_data_alloc_string (DEFAULT_MSTP_PATH, IOT_DATA_REF));
#else
iot_data_string_map_add (defaults, "BBMD_ADDRESS", iot_data_alloc_string ("", IOT_DATA_REF));
iot_data_string_map_add (defaults, "BBMD_PORT", iot_data_alloc_string ("", IOT_DATA_REF));
iot_data_string_map_add (defaults, "DefaultDevicePath", iot_data_alloc_string (DEFAULT_MSTP_PATH, IOT_DATA_REF));
#endif

/* Start the device service*/
devsdk_service_start (impl->service, defaults, &e);
Expand Down

0 comments on commit 3ba4b59

Please sign in to comment.