Skip to content

Commit 9fa039d

Browse files
Updated readme and fixed the linux makefile
1 parent 9beb505 commit 9fa039d

File tree

2 files changed

+29
-19
lines changed

2 files changed

+29
-19
lines changed

README.md

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# BACnet Client Example C++
22

33
A basic BACnet IP client example written in C++ using the [CAS BACnet Stack](https://store.chipkin.com/services/stacks/bacnet-stack). This client example is meant to be used with the [BACnet IP server example](https://github.com/chipkin/BACnetServerExampleCPP). Supports WhoIs, Read property, and Write property services.
4+
This example shows how to use some of the BACnet client functionality of the CAS BACnet Stack and can be used to test communications with the BACnetServerExampleCPP.
45

56
## Supported CAS BACnet Stack Version
67

@@ -14,21 +15,29 @@ Build versions of this example can be downloaded from the releases page:
1415

1516
## Installation
1617

17-
Download the latest release zip file on the releases page.
18+
Download the latest release executable on the releases page.
1819

1920
## Usage
2021

22+
The target device for testing with this Client example application is the [BACnetServerExampleCPP](https://github.com/chipkin/BACnetServerExampleCPP)
23+
2124
```txt
2225
Usage: BACnetClient {IPAddress}
2326
Example: BACnetClient 192.168.1.126
2427
2528
Help:
26-
- Q - Quit
2729
- W - Send WhoIs message
28-
- R - Send Read property messages
29-
- U - Send Write property messages
30-
- C - Send Subscribe COV Request
31-
- T - Send Confirmed Text Message Request
30+
- R - Send ReadProperty messages
31+
- U - Send WriteProperty messages
32+
- S - Send SubscribeCOV Request
33+
- P - Send SubscribeCOVProperty Request
34+
- M - Send ConfirmedTextMessage Request
35+
- T - Send TimeSynchronization Request
36+
- R - Send ReinitializedDevice Request
37+
- D - Send DeviceCommunicationControl Request to Disable
38+
- E - Send DeviceCommunicationControl Request to Enable
39+
- H - Display Help information
40+
- Q - Quit
3241
```
3342
Client expects a device with the following objects:
3443

@@ -55,17 +64,19 @@ Client expects a device with the following objects:
5564

5665
## Build
5766

58-
A [Visual studio 2019](https://visualstudio.microsoft.com/downloads/) project is included with this project. This project also auto built using [Gitlab CI](https://docs.gitlab.com/ee/ci/) on every commit.
67+
A [Visual studio 2022](https://visualstudio.microsoft.com/downloads/) project is included with this project.
68+
69+
The CAS BACnet Stack submodule is required for compilation. Please contact Chipkin Automation Systems to purchase the CAS BACnet Stack.
5970

60-
The CAS BACnet Stack submodule is required for compilation.
71+
More information about the CAS BACnet Stack can be found here: [CAS BACnet Stack](https://store.chipkin.com/services/stacks/bacnet-stack)
6172

6273
## Example Output
6374
```txt
64-
CAS BACnet Stack Server Example v0.0.2.0
65-
https://github.com/chipkin/BACnetServerExampleCPP
75+
CAS BACnet Stack Client Example v1.0.0.0
76+
https://github.com/chipkin/BACnetClientExampleCPP
6677
6778
FYI: Loading CAS BACnet Stack functions... OK
68-
FYI: CAS BACnet Stack version: 3.16.0.0
79+
FYI: CAS BACnet Stack version: 5.1.2.0
6980
FYI: Connecting UDP Resource to port=[47808]... OK, Connected to port
7081
FYI: Registering the callback Functions with the CAS BACnet Stack
7182
Setting up client device. device.instance=[389002]

makefile

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,17 @@ NAME := BACnetClientExampleCPP_linux_x64_Release
66
# -m32 for 32bit, -m64 for 64bit
77
# -Wall turns on most, but not all, compiler warnings
88
#
9-
CFLAGS := -m64 -Wall
9+
CFLAGS := -m64 -Wall -std=c++11
1010

11-
DEBUGFLAGS = -O0 -g3 -DCAS_BACNET_STACK_LIB_TYPE_LIB
12-
RELEASEFLAGS = -O3 -DCAS_BACNET_STACK_LIB_TYPE_LIB
11+
DEBUGFLAGS = -O0 -g3
12+
RELEASEFLAGS = -O3
1313
OBJECTFLAGS = -c -fmessage-length=0 -fPIC -MMD -MP
1414
LDFLAGS = -static
1515

16-
SOURCES = $(wildcard BACnetClientExample/*.cpp) $(wildcard submodules/cas-bacnet-stack/adapters/cpp/*.cpp) $(wildcard submodules/cas-bacnet-stack/submodules/cas-common/source/*.cpp)
16+
SOURCES = $(wildcard BACnetClientExample/*.cpp) $(wildcard submodules/cas-bacnet-stack/adapters/cpp/*.cpp) $(wildcard submodules/cas-bacnet-stack/source/*.cpp)
1717
OBJECTS = $(addprefix obj/,$(notdir $(SOURCES:.cpp=.o)))
18-
INCLUDES = -IBACnetClientExample -Isubmodules/cas-bacnet-stack/adapters/cpp -Isubmodules/cas-bacnet-stack/source -Isubmodules/cas-bacnet-stack/submodules/cas-common/source
19-
LIBPATH = -Lbin
20-
LIB = -ldl -lCASBACnetStack_x64_Release
18+
INCLUDES = -IBACnetClientExample -Isubmodules/cas-bacnet-stack/adapters/cpp -Isubmodules/cas-bacnet-stack/source -Isubmodules/cas-bacnet-stack/submodules/xml2json/include
19+
LIB = -ldl
2120

2221
# Build Target
2322
TARGET = $(NAME)
@@ -46,7 +45,7 @@ obj/%.o: submodules/cas-bacnet-stack/adapters/cpp/%.cpp
4645
@echo 'Finished building: $<'
4746
@echo ' '
4847

49-
obj/%.o: submodules/cas-bacnet-stack/submodules/cas-common/source/%.cpp
48+
obj/%.o: submodules/cas-bacnet-stack/source/%.cpp
5049
@mkdir -p obj
5150
@echo 'Building file: $<'
5251
@echo 'Invoking: GCC C++ Compiler'

0 commit comments

Comments
 (0)