Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/sc code master #14

Closed
wants to merge 393 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
393 commits
Select commit Hold shift + click to select a range
38a4d3a
100% code coverage for hub connector
Nov 21, 2022
0bbf7c0
port websocket fixes from bsd to linux
Nov 23, 2022
6b7750b
fix compilation
Nov 23, 2022
3f25002
remove check of libwebsocket version
Nov 23, 2022
d25ff21
fix compilation under linux
Nov 23, 2022
943e574
add updates from bsd port to linux port
Nov 23, 2022
8d64771
extend test
Nov 23, 2022
7b7ac32
fix deadlock
Nov 23, 2022
2b76351
turn off invalid interface test case
Nov 23, 2022
96b1e71
Merge branch 'feature/OSCBS-1-bacnet-sc-implementation' of https://gi…
Nov 23, 2022
42e6f81
fix deadlock under macosx, added comments for tricky code
Nov 24, 2022
29e527b
extend bsc-node test, bugfixing
Nov 24, 2022
1957b86
extend bsc-node test, bugfixing
Nov 24, 2022
59894a4
extend bsc-node test, added BSC_NODE_EVENT_RECEIVED_ADVERTISIMENT eve…
Nov 24, 2022
5de15f5
extend bsc-node test
Nov 24, 2022
d4bedd2
added timestamp into debug_printf, extend bsc-node test, bugfixing
Nov 25, 2022
b78665e
bugfixing, extend bsc-node test
Nov 27, 2022
88e59dd
extend test for node switch module, debugging
Nov 28, 2022
ae84cd7
extend bsc-node test, bugfixing
Nov 29, 2022
baf2b7d
added ability to enable/disable acceptance direct connections for nod…
Nov 29, 2022
746139a
enlarge code coverage for bsc-node test, bugfixing
Nov 30, 2022
050b6a3
extend bsc-node test, refactoring node switch module (make code simpl…
Dec 1, 2022
3c8ae5c
fix segmentation fault
Dec 1, 2022
4169761
extend bsc-node test
Dec 1, 2022
86f72c5
improve code coverage
Dec 1, 2022
4d15edb
Using netport object in datalink/bsc
Michail-Antropov Nov 18, 2022
d20b145
Fix PR
Michail-Antropov Dec 1, 2022
759799d
Revert node-conf struct
Michail-Antropov Dec 2, 2022
0bcae33
Merge pull request #363 from bacnet-stack/feature/OSCBS-1-bacnet-sc-i…
cybermag Dec 2, 2022
9c0ac67
fix compilation errors and warnings
Dec 2, 2022
0822d62
include bsc-datalink test into tests list
Dec 2, 2022
c4d128c
extend bsc-datalink test, bugfixing
Dec 5, 2022
fe06dd6
implement bsc_event_timedwait()
Dec 5, 2022
6e8de6b
refactoring of bsc-datalink interface, extend test, bugfixing
Dec 5, 2022
48e6216
fix bug in bsc_receive()
Dec 5, 2022
11eaa47
Fix problem with SC netport
Michail-Antropov Dec 2, 2022
fb98de1
Add setter for empty certs into netport
Michail-Antropov Dec 5, 2022
dc9cd59
Merge pull request #364 from bacnet-stack/feature/OSCBS-1-bacnet-sc-i…
cybermag Dec 6, 2022
43d8517
fixed periodic hanging during execution of bsc-datalink test
Dec 6, 2022
f1a7e6b
protect lws_set_log_level() call by global mutex
Dec 6, 2022
e1340c8
added more debugging abilities
Dec 6, 2022
fec71af
fix deadlock
Dec 6, 2022
8a9a500
add more debugging information
Dec 6, 2022
c703a2c
remove warnings
Dec 6, 2022
942a067
fix deadlock
Dec 6, 2022
8fbead0
fix deadlock and leaks on bsd
Dec 7, 2022
a4f46a3
fix deadlock and leaks on linux
Dec 7, 2022
507f3bd
fix compilation errors
Dec 7, 2022
0a4916e
remove BACNET_STACK_EXPORT from .c file in datalink/bsc
Dec 7, 2022
7ad6d95
added comments + implementation of bsc_get_broadcast_address() and bs…
Dec 7, 2022
624dd14
implemented bsc_direct_connection_established()
Dec 7, 2022
f14d893
fix bug: incorrect return value in bsc_send_pdu() function
Dec 7, 2022
ed794e2
implement bsc_hub_connector_status() function, bugfixing, correct com…
Dec 8, 2022
c009639
fix compilation errors
Dec 8, 2022
e86bf9c
fix test failing on computers with slow CPU
Dec 8, 2022
2bf08fc
implement bsc_connect_direct() and bsc_disconnect_direct() functions
Dec 8, 2022
0294a41
Add BSC into apps/readprop
Michail-Antropov Dec 7, 2022
52360e3
Add PEM files for app samples
Michail-Antropov Dec 8, 2022
ea2641f
Debug SC sample
Michail-Antropov Dec 8, 2022
ca7f2d0
fix missing emit of start event in node switch
Dec 8, 2022
d860d60
Add SC hub
Michail-Antropov Dec 9, 2022
2900ec8
fix generation fo random vmac, bugfixing
Dec 9, 2022
04ee7ee
remove printing of debug information
Dec 9, 2022
062e683
fix warnings
Dec 9, 2022
a3535fb
fix bug: bsc_get_broadcast_address() returns incorrect broadcast address
Dec 9, 2022
99df232
Code style of SC sample
Michail-Antropov Dec 9, 2022
092937c
merge with master
Dec 12, 2022
bd9497a
Merge branch 'feature/OSCBS-1-bacnet-sc-implementation' of https://gi…
Dec 12, 2022
213ff5c
Add mutex to netport
Michail-Antropov Dec 12, 2022
71b62ec
Fix build errors and warnings
Michail-Antropov Dec 13, 2022
795fd60
Move internal netport API to special header file
Michail-Antropov Dec 13, 2022
ccb721e
Spellchecker
Michail-Antropov Dec 13, 2022
8b7e392
Fix building from bacnet-stack
Michail-Antropov Dec 14, 2022
479cde6
fix potential crash
Dec 14, 2022
60aa54c
fix lint warnings
Dec 14, 2022
cb6aaac
fix cplint warnings
Dec 14, 2022
8ae18b8
fix splint and codespell warnings
Dec 14, 2022
205f909
fix scan-build job
Dec 14, 2022
669f928
debug pipeline
Dec 14, 2022
6871974
building libwebsockets from repo in pipeline build
Dec 14, 2022
6273cd5
fixing building of libwebsockets from repo in pipeline build
Dec 14, 2022
01f206a
debugging building of libwebsockets from repo in pipeline build
Dec 14, 2022
16f0919
debugging building of libwebsockets from repo in pipeline build
Dec 14, 2022
93bb068
fix building of libwebsockets from repo in pipeline build
Dec 14, 2022
1077740
fix building of libwebsockets from repo in pipeline build
Dec 14, 2022
6a1e01d
fix building of libwebsockets from repo in pipeline build
Dec 14, 2022
e90fed8
fix pipeline
Dec 14, 2022
800098b
fix building of pipeline artifacts
Dec 14, 2022
2196b47
fix linker errors in pipeline
Dec 14, 2022
130527e
Update lint.yml
skarg Dec 14, 2022
bfd61e1
Update lint.yml
skarg Dec 14, 2022
9cf3852
fix unittest and scan-build steps in pipeline
Dec 15, 2022
53969d5
fix failed pipeline steps
Dec 15, 2022
8588205
fix failed CodeQL step
Dec 15, 2022
1d4f7a1
remove unused code
Dec 15, 2022
007951f
fix CodeQL warnings
Dec 15, 2022
530bc4c
fix cppcheck step on github pipeline
Dec 15, 2022
36a414e
fix pipeline build
Dec 15, 2022
a9103a0
fix router-ipv6 action on github pipeline
Dec 15, 2022
7c86dad
fix router-mstp action on github pipeline
Dec 15, 2022
fd6691b
fix compiler warnings
Dec 15, 2022
e1525de
only build BACnet/SC explicitly with Makefile builds
skarg Dec 15, 2022
757db88
Add BACnet/SC specific Makefile build and add to GCC workflow.
skarg Dec 15, 2022
d3dae9f
improve code coverage
Dec 20, 2022
fb55ce6
bugixing, improve tests code coverage
Dec 20, 2022
20c4c91
merge origin/master
Dec 21, 2022
6d7aac1
fix static objects initialization
Dec 22, 2022
4a0e4c4
Fix Network_Port_MAC_Address() error
Michail-Antropov Dec 23, 2022
f604ab2
revert codeQL workflow changes
skarg Jan 3, 2023
4a68b9d
revert codeQL workflow changes
skarg Jan 3, 2023
16c64b3
Merge remote-tracking branch 'origin/master' into feature/OSCBS-1-bac…
skarg Jan 3, 2023
b673784
fix Makefile typo
skarg Jan 3, 2023
c5f4fe0
Move BACnet/SC from RP to datalink environment vars
skarg Jan 3, 2023
d546bf4
Fix C++ comments. Fix C90 warnings.
skarg Jan 3, 2023
407d2ad
Fix dlenv errors
skarg Jan 3, 2023
5fef2cf
Merge remote-tracking branch 'origin/master' into feature/OSCBS-1-bac…
skarg Jan 4, 2023
9edd26a
BACnet/SC cleanup after bacfile changes
skarg Jan 5, 2023
1728ab0
Unit test cleanup.
skarg Jan 5, 2023
a937086
remove bsc thread and utils unit testing
skarg Jan 5, 2023
add50a3
Cleanup compile warnings
skarg Jan 6, 2023
e5bbc4f
Cleanup Makefile build. Fix Gateway build.
skarg Jan 6, 2023
89bff54
Include bacfile & netport into library for BACDL_BSC
skarg Jan 6, 2023
1056dd2
cleanup compile warnings
skarg Jan 6, 2023
9df6a61
Fix device object unit test.
skarg Jan 6, 2023
19495a5
Cleanup gateway example
skarg Jan 6, 2023
c415c29
Fix BACnet/SC hub demo app build
skarg Jan 6, 2023
b6b14ea
Fix BACnet/SC tests
Michail-Antropov Jan 9, 2023
631484a
Merge pull request #379 from bacnet-stack/feature/OSCBS-1-bacnet-sc-i…
Michail-Antropov Jan 10, 2023
0f2612c
remove runloop abstraction from bsc-socket module
Jan 11, 2023
d6d8ce6
delete runloop test
Jan 11, 2023
2b68dc8
remove runloop abstraction from hub connector module, update hub-sc test
Jan 11, 2023
5c40bf5
remove runloop abstraction from bsc-node, update node test
Jan 11, 2023
dda0482
remove runloop abstraction from bsc-datalink module
Jan 11, 2023
2eb2afe
Merge remote-tracking branch 'origin/feature/OSCBS-1-bacnet-sc-implem…
Jan 11, 2023
b69e460
remove runloop test from the list
Jan 12, 2023
0a6b079
remove mutex abstraction from netport, delete unused code
Jan 12, 2023
f3b6b2c
Merge pull request #381 from bacnet-stack/feature/OSCBS-1-bacnet-sc-i…
cybermag Jan 12, 2023
5c259b1
Merge remote-tracking branch 'origin/master' into feature/OSCBS-1-bac…
Jan 12, 2023
0e3c124
remove mutex from netport, fix build of tests
Jan 12, 2023
9ea657a
remove bsc-mutes and bsc-runloop modules
Jan 12, 2023
25a3e14
fix linux build
Jan 12, 2023
a6a0992
fix warnings
Jan 12, 2023
eb2740c
turn off bacnet/sc by default
Jan 12, 2023
95668a1
disable tests related to bacnet/sc
Jan 12, 2023
ff9fa49
skip websocket test on zephyr because that functionality is not ready…
Jan 12, 2023
27c5fc7
fix code to run bacnet/sc demo
Jan 12, 2023
1a4868c
use bacfile object in client apps only if support of bacnet/sc datali…
Jan 12, 2023
9e7cfd3
do not start hub connector if user does not set primary and failover …
Jan 13, 2023
9992ae0
Fix unit test for zephyr platform
Michail-Antropov Jan 13, 2023
d90e63e
remove header bsc-mutex.h
Jan 16, 2023
6a3af3f
Merge remote-tracking branch 'origin/feature/OSCBS-1-bacnet-sc-implem…
Jan 16, 2023
c02a510
add ability to bind hub function and node switch to different interfaces
Jan 18, 2023
8568117
Remove certificates
Michail-Antropov Dec 20, 2022
6b21695
Add bsc_event and bsc_mutex test
Michail-Antropov Dec 21, 2022
30702bf
Add zephyr/samples/sc-node
Michail-Antropov Dec 24, 2022
25da5db
Fix the netport and the runloop tests and the sc-node sample after re…
Michail-Antropov Jan 10, 2023
16d8e02
Fix after rebase on removing bsc-mutex and bsc-runloop
Michail-Antropov Jan 16, 2023
039715e
Implement SC binding parameters as string like: "[ifname:]port"
Michail-Antropov Jan 20, 2023
2d78b4c
Merge remote-tracking branch 'origin/master' into feature/OSCBS-1-bac…
Jan 23, 2023
8e48cfc
fix tons of warnings on MacOSX
Jan 23, 2023
1f8191b
fix pipeline build after merge
Jan 23, 2023
022d91a
Add test certs to apps/certs
Michail-Antropov Jan 23, 2023
b4100ab
Move certs to bin
Michail-Antropov Jan 23, 2023
3cb8aa1
fix tests pipeline build
Jan 23, 2023
b4983a4
merge with origin/feature/OSCBS-1-bacnet-sc-implementation
Jan 23, 2023
bf7c782
Add error message if env parameters are absent
Michail-Antropov Jan 23, 2023
177f631
fix BACNet/SC demo scenario
Jan 23, 2023
69777cf
Merge remote-tracking branch 'origin/feature/OSCBS-1-bacnet-sc-implem…
Jan 23, 2023
5ee02e0
fix missprints
Jan 23, 2023
ff5ba37
fix bug: there are no re-connect attempts to BACnet/SC hub if first c…
cybermag Jan 25, 2023
54a0265
Remove extra objects from example apps
skarg Jan 25, 2023
e918294
Remove BACDL_BSC ifdefs where not required
skarg Jan 25, 2023
cf530e6
fix standalone bsc-hub build
skarg Jan 25, 2023
ffe6ea9
cleanup compile warnings
skarg Jan 25, 2023
5fd6071
remove sys/bsc_event tests for non-existant module
skarg Jan 25, 2023
5c971a0
remove duplicate enums. Fix BACnet/SC port type.
skarg Jan 26, 2023
943dc11
remove BACDL_BSC ifdefs as much as possible
skarg Jan 26, 2023
f19d654
Fix network port for BSC tests
skarg Jan 26, 2023
91d8181
accomodate protocol-revision 17-23 BSC devices
skarg Jan 26, 2023
aed04ed
fix BSC datalink unit test usage of netport
skarg Jan 26, 2023
1b0c45b
change bsc_node_conf_fill_from_netport() to return bool value, fix me…
cybermag Jan 27, 2023
15c2163
re-organize bsc_event test (#387)
cybermag Jan 27, 2023
f79ec43
fix bsc-event test on Linux
skarg Jan 27, 2023
b12354f
Cleanup spelling and copyright
skarg Jan 30, 2023
fd79ee7
add printf disabled to work with no-debug builds
skarg Jan 30, 2023
fe75f8f
Revise C code for GNU89/C89 compile
skarg Feb 1, 2023
0dcac54
Merge remote-tracking branch 'origin/master' into feature/OSCBS-1-bac…
skarg Feb 4, 2023
3f78b94
OSCBS-1 Update the zephyr SC sample (#385)
Michail-Antropov Feb 6, 2023
172b6de
Add the Apply changes logic on all SC netport writtable parameters (#…
Michail-Antropov Feb 6, 2023
d37b278
Merge branch 'feature/OSCBS-1-bacnet-sc-implementation' of github.com…
skarg Feb 6, 2023
e1ba23e
Merge remote-tracking branch 'origin/master' into feature/OSCBS-1-bac…
skarg Feb 6, 2023
c00c81f
Update lint.yml
skarg Feb 6, 2023
1523a8e
Feature/oscbs 1 schub fix (#397)
cybermag Feb 10, 2023
6e736ff
Feature/oscbs 1 netport integration (#405)
cybermag Mar 6, 2023
5341b11
Forbidden read SC BacList properties by index
Michail-Antropov Mar 7, 2023
462394f
set size of receive buffer of websocket in accordance with max NPDU l…
Mar 9, 2023
2bf935d
remove unused variable err_desc
Mar 9, 2023
410004b
Polish BSC datalink defines, fix compilation errors if some function/…
Mar 13, 2023
3bb630d
synchronize code of bsd and linux websocket clients
Mar 13, 2023
999b97b
fix memory leak
Mar 13, 2023
c9b5944
correct calculation of BSC socket RX buffer size
Mar 13, 2023
fcbe16b
code refactoring: bugfixing, reduce number of copying, remove dynamic…
Mar 16, 2023
9d44f11
synchronize code for linux ports
Mar 16, 2023
c7ea6a9
add additional comments related to BSC_CONF_TX_PRE
Mar 16, 2023
7bf252c
temporary enable bsc datalink tests
Mar 16, 2023
dab2b31
remove warnings
Mar 16, 2023
c90f323
remove unused bsc_runloop() function
Mar 16, 2023
bc6697c
fix bugs inn connection status properties for hub and node switch
Mar 16, 2023
f785fc6
move bsc connection status funcs from hub function and node switch to…
Mar 19, 2023
77bf430
fix memory leak
Mar 19, 2023
b32a0bd
fix test after code refactoring
Mar 19, 2023
5e61718
improve code coverage
Mar 19, 2023
d2c6cb4
prevent potential loss of data if bws_srv_disconnect() was called jus…
Mar 22, 2023
a4ba92d
update condition for inclusion of libwebsocket header
Mar 23, 2023
e9f726e
fixed memory corruption, fixed processing of invalid packets, update …
Mar 24, 2023
74a8e36
refactoring bsc event: remove bsc_event_reset(), update related code …
Mar 26, 2023
c2d2b47
fix rare fails of test
Mar 26, 2023
567f319
synchronize ports source code
Mar 26, 2023
9068a64
porting bsc event abstraction test for win32
cybermag Mar 27, 2023
1a64e41
fix formatting
Mar 27, 2023
40844c7
websocket interface refactoring: remove reservation of BSC_PRE bytes …
Mar 30, 2023
fcbff2c
fix memory leak related to pthread_create() call
Mar 30, 2023
639b3cf
Moved west manifest, zephyr folder, and ports/zephyr folders to anoth…
stargieg Oct 15, 2024
882b9b9
Merge branch 'master' into feature/sc-code-master
stargieg Oct 15, 2024
94e96ab
Merge branch 'master' into feature/sc-code-master
stargieg Oct 15, 2024
376684c
Merge branch 'master' into feature/sc-code-master cleanup
stargieg Oct 15, 2024
65ae3bc
Merge branch 'master' into feature/sc-code-master install libwebsocke…
stargieg Oct 16, 2024
7ba834c
Merge branch 'master' into feature/sc-code-master cleanup
stargieg Oct 16, 2024
e1b6cb1
Merge branch 'master' into feature/sc-code-master restore README
stargieg Oct 16, 2024
88aa085
Merge branch 'master' into feature/sc-code-master fix compiler err an…
stargieg Oct 16, 2024
c8e8c0e
Merge branch 'master' into feature/sc-code-master install libwebsocke…
stargieg Oct 16, 2024
544345e
Merge branch 'master' into feature/sc-code-master install libwebsocke…
stargieg Oct 16, 2024
7fff29a
Merge branch 'master' into feature/sc-code-master restore testcode
stargieg Oct 16, 2024
ce8e865
Merge branch 'master' into feature/sc-code-master restore testcode
stargieg Oct 16, 2024
bc9957b
Merge branch 'master' into feature/sc-code-master fix cmdline define …
stargieg Oct 16, 2024
a18a31d
Merge branch 'master' into feature/sc-code-master fix mock location
stargieg Oct 16, 2024
75d2b29
Merge branch 'master' into feature/sc-code-master fix #ifdef
stargieg Oct 16, 2024
a86dc12
Merge branch 'master' into feature/sc-code-master rm unused
stargieg Oct 16, 2024
1307e46
Merge branch 'master' into feature/sc-code-master fix cmake test
stargieg Oct 16, 2024
c929e7f
Merge branch 'master' into feature/sc-code-master fix missing braces
stargieg Oct 16, 2024
c7e0e68
Merge branch 'master' into feature/sc-code-master fix ubuntu libwebso…
stargieg Oct 16, 2024
b87936d
Merge branch 'master' into feature/sc-code-master fix ubuntu libwebso…
stargieg Oct 16, 2024
3afc525
Merge branch 'master' into feature/sc-code-master fix ubuntu libwebso…
stargieg Oct 16, 2024
2aa4d59
Merge branch 'master' into feature/sc-code-master pre-commit
stargieg Oct 16, 2024
5e38a28
Merge branch 'master' into feature/sc-code-master spell check
stargieg Oct 16, 2024
4017fb9
Merge branch 'master' into feature/sc-code-master switch of tests wit…
stargieg Oct 17, 2024
d6efd1b
Merge branch 'master' into feature/sc-code-master pre-commit
stargieg Oct 18, 2024
00ff251
Merge branch 'master' into feature/sc-code-master fix ubuntu libwebso…
stargieg Oct 18, 2024
9f2ac26
Merge branch 'master' into feature/sc-code-master
stargieg Oct 18, 2024
11d44f1
Merge branch 'master' into feature/sc-code-master
stargieg Oct 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions .github/workflows/gcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ jobs:
run: |
sudo apt-get update -qq
sudo apt-get install -qq libconfig-dev
sudo apt-get install -qq libcap-dev
sudo apt-get install -qq libssl-dev
#sudo apt-get install -qq libwebsockets-dev
git clone https://libwebsockets.org/repo/libwebsockets
bash -c 'cd libwebsockets;git checkout v4.3-stable;mkdir build;cd build;cmake ..;make'
sudo bash -c 'cd libwebsockets;cd build;make install'
- name: Build Demo Apps GNU89
run: |
gcc --version
Expand All @@ -43,6 +49,12 @@ jobs:
run: |
sudo apt-get update -qq
sudo apt-get install -qq libconfig-dev
sudo apt-get install -qq libcap-dev
sudo apt-get install -qq libssl-dev
#sudo apt-get install -qq libwebsockets-dev
git clone https://libwebsockets.org/repo/libwebsockets
bash -c 'cd libwebsockets;git checkout v4.3-stable;mkdir build;cd build;cmake ..;make'
sudo bash -c 'cd libwebsockets;cd build;make install'
- name: Build Demo Apps BBMD=none
run: |
gcc --version
Expand All @@ -57,6 +69,12 @@ jobs:
run: |
sudo apt-get update -qq
sudo apt-get install -qq libconfig-dev
sudo apt-get install -qq libcap-dev
sudo apt-get install -qq libssl-dev
#sudo apt-get install -qq libwebsockets-dev
git clone https://libwebsockets.org/repo/libwebsockets
bash -c 'cd libwebsockets;git checkout v4.3-stable;mkdir build;cd build;cmake ..;make'
sudo bash -c 'cd libwebsockets;cd build;make install'
- name: Build Demo Apps BBMD=client
run: |
gcc --version
Expand All @@ -71,12 +89,38 @@ jobs:
run: |
sudo apt-get update -qq
sudo apt-get install -qq libconfig-dev
sudo apt-get install -qq libcap-dev
sudo apt-get install -qq libssl-dev
#sudo apt-get install -qq libwebsockets-dev
git clone https://libwebsockets.org/repo/libwebsockets
bash -c 'cd libwebsockets;git checkout v4.3-stable;mkdir build;cd build;cmake ..;make'
sudo bash -c 'cd libwebsockets;cd build;make install'
- name: Build Gateway Demo
run: |
gcc --version
make clean
make LEGACY=true gateway

bacnet-sc-hub:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Create BACnet/SC Build Environment
run: |
sudo apt-get update -qq
sudo apt-get install -qq libconfig-dev
sudo apt-get install -qq libcap-dev
sudo apt-get install -qq libssl-dev
#sudo apt-get install -qq libwebsockets-dev
git clone https://libwebsockets.org/repo/libwebsockets
bash -c 'cd libwebsockets;git checkout v4.3-stable;mkdir build;cd build;cmake ..;make'
sudo bash -c 'cd libwebsockets;cd build;make install'
- name: Build BACnet/SC Hub Demo
run: |
gcc --version
make clean
make sc-hub

router:
runs-on: ubuntu-latest
steps:
Expand All @@ -85,6 +129,12 @@ jobs:
run: |
sudo apt-get update -qq
sudo apt-get install -qq libconfig-dev
sudo apt-get install -qq libcap-dev
sudo apt-get install -qq libssl-dev
#sudo apt-get install -qq libwebsockets-dev #Ubuntu 24
git clone https://libwebsockets.org/repo/libwebsockets
bash -c 'cd libwebsockets;git checkout v4.3-stable;mkdir build;cd build;cmake ..;make'
sudo bash -c 'cd libwebsockets;cd build;make install'
- name: Build Router Demo
run: |
gcc --version
Expand All @@ -99,6 +149,12 @@ jobs:
run: |
sudo apt-get update -qq
sudo apt-get install -qq libconfig-dev
sudo apt-get install -qq libcap-dev
sudo apt-get install -qq libssl-dev
#sudo apt-get install -qq libwebsockets-dev
git clone https://libwebsockets.org/repo/libwebsockets
bash -c 'cd libwebsockets;git checkout v4.3-stable;mkdir build;cd build;cmake ..;make'
sudo bash -c 'cd libwebsockets;cd build;make install'
- name: Build Router IPv6 Demo
run: |
gcc --version
Expand All @@ -113,6 +169,12 @@ jobs:
run: |
sudo apt-get update -qq
sudo apt-get install -qq libconfig-dev
sudo apt-get install -qq libcap-dev
sudo apt-get install -qq libssl-dev
#sudo apt-get install -qq libwebsockets-dev
git clone https://libwebsockets.org/repo/libwebsockets
bash -c 'cd libwebsockets;git checkout v4.3-stable;mkdir build;cd build;cmake ..;make'
sudo bash -c 'cd libwebsockets;cd build;make install'
- name: Build Router MSTP Demo
run: |
gcc --version
Expand All @@ -127,6 +189,12 @@ jobs:
run: |
sudo apt-get update -qq
sudo apt-get install -qq libconfig-dev
sudo apt-get install -qq libcap-dev
sudo apt-get install -qq libssl-dev
#sudo apt-get install -qq libwebsockets-dev
git clone https://libwebsockets.org/repo/libwebsockets
bash -c 'cd libwebsockets;git checkout v4.3-stable;mkdir build;cd build;cmake ..;make'
sudo bash -c 'cd libwebsockets;cd build;make install'
- name: Build BACnet/IPv6 Demo Apps
run: |
gcc --version
Expand All @@ -141,6 +209,12 @@ jobs:
run: |
sudo apt-get update -qq
sudo apt-get install -qq libconfig-dev
sudo apt-get install -qq libcap-dev
sudo apt-get install -qq libssl-dev
#sudo apt-get install -qq libwebsockets-dev
git clone https://libwebsockets.org/repo/libwebsockets
bash -c 'cd libwebsockets;git checkout v4.3-stable;mkdir build;cd build;cmake ..;make'
sudo bash -c 'cd libwebsockets;cd build;make install'
- name: Build MSTP Demo Apps
run: |
gcc --version
Expand All @@ -156,6 +230,11 @@ jobs:
sudo apt-get update -qq
sudo apt-get install -qq libconfig-dev
sudo apt-get install -qq libcap-dev
sudo apt-get install -qq libssl-dev
#sudo apt-get install -qq libwebsockets-dev
git clone https://libwebsockets.org/repo/libwebsockets
bash -c 'cd libwebsockets;git checkout v4.3-stable;mkdir build;cd build;cmake ..;make'
sudo bash -c 'cd libwebsockets;cd build;make install'
- name: Build Ethernet Demo Apps
run: |
gcc --version
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,11 @@ jobs:
run: |
sudo apt-get update -qq
sudo apt-get install -qq lcov
sudo apt-get install -qq libconfig-dev
sudo apt-get install -qq libcap-dev
sudo apt-get install -qq libssl-dev
git clone https://libwebsockets.org/repo/libwebsockets
bash -c 'cd libwebsockets;git checkout v4.3-stable;mkdir build;cd build;cmake ..;make'
sudo bash -c 'cd libwebsockets;cd build;make install'
- name: Run Unit Test with Code Coverage
run: make test
13 changes: 12 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,22 @@ jobs:
- uses: actions/checkout@v4

- name: Install Dependencies (Ubuntu)
if: matrix.os == 'ubuntu-latest' && matrix.project == 'root'
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
# apps/router needs libconfig-dev.
sudo apt-get install -y libconfig-dev
sudo apt-get install -y libcap-dev
sudo apt-get install -y libssl-dev
#sudo apt-get install -qq libwebsockets-dev
git clone https://libwebsockets.org/repo/libwebsockets
bash -c 'cd libwebsockets;git checkout v4.3-stable;mkdir build;cd build;cmake ..;make'
sudo bash -c 'cd libwebsockets;cd build;make install'

- name: Install Dependencies (macOS)
if: matrix.os == 'macOS-latest'
run: |
brew install libwebsockets

- name: Create Build Environment
# Some projects don't allow in-source building, so create a separate build directory
Expand Down
65 changes: 62 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,17 @@ option(
"compile with ipv6 datalink support"
ON)

option(
BACDL_BSC
"compile with secure-connect support"
OFF)

if(NOT (BACDL_ETHERNET OR
BACDL_MSTP OR
BACDL_ARCNET OR
BACDL_BIP OR
BACDL_BIP6 OR
BACDL_BSC OR
BACDL_CUSTOM))
add_definitions(-DBACDL_NONE)
endif()
Expand Down Expand Up @@ -206,6 +212,15 @@ if(UCI)
endif()
endif()

if(BACDL_BSC)
find_package(libwebsockets CONFIG REQUIRED)
find_package(PkgConfig)
pkg_check_modules(LIB_WEBSOCKETS REQUIRED libwebsockets)
#libwebsocket need C99 with variadic-macros
add_compile_options(-Wno-variadic-macros)
find_package(OpenSSL)
endif()

add_library(${PROJECT_NAME}
src/bacnet/abort.c
src/bacnet/abort.h
Expand Down Expand Up @@ -266,6 +281,22 @@ add_library(${PROJECT_NAME}
$<$<BOOL:${BACDL_BIP6}>:src/bacnet/basic/bbmd6/h_bbmd6.h>
$<$<BOOL:${BACDL_BIP6}>:src/bacnet/basic/bbmd6/vmac.c>
$<$<BOOL:${BACDL_BIP6}>:src/bacnet/basic/bbmd6/vmac.h>
$<$<BOOL:${BACDL_BSC}>:src/bacnet/datalink/bsc/bvlc-sc.c>
$<$<BOOL:${BACDL_BSC}>:src/bacnet/datalink/bsc/bvlc-sc.h>
$<$<BOOL:${BACDL_BSC}>:src/bacnet/datalink/bsc/bsc-socket.c>
$<$<BOOL:${BACDL_BSC}>:src/bacnet/datalink/bsc/bsc-socket.h>
$<$<BOOL:${BACDL_BSC}>:src/bacnet/datalink/bsc/bsc-util.h>
$<$<BOOL:${BACDL_BSC}>:src/bacnet/datalink/bsc/bsc-util.c>
$<$<BOOL:${BACDL_BSC}>:src/bacnet/datalink/bsc/bsc-hub-connector.h>
$<$<BOOL:${BACDL_BSC}>:src/bacnet/datalink/bsc/bsc-hub-connector.c>
$<$<BOOL:${BACDL_BSC}>:src/bacnet/datalink/bsc/bsc-hub-function.h>
$<$<BOOL:${BACDL_BSC}>:src/bacnet/datalink/bsc/bsc-hub-function.c>
$<$<BOOL:${BACDL_BSC}>:src/bacnet/datalink/bsc/bsc-node-switch.h>
$<$<BOOL:${BACDL_BSC}>:src/bacnet/datalink/bsc/bsc-node-switch.c>
$<$<BOOL:${BACDL_BSC}>:src/bacnet/datalink/bsc/bsc-node.h>
$<$<BOOL:${BACDL_BSC}>:src/bacnet/datalink/bsc/bsc-node.c>
$<$<BOOL:${BACDL_BSC}>:src/bacnet/datalink/bsc/bsc-datalink.h>
$<$<BOOL:${BACDL_BSC}>:src/bacnet/datalink/bsc/bsc-datalink.c>
src/bacnet/basic/binding/address.c
src/bacnet/basic/binding/address.h
src/bacnet/basic/npdu/h_npdu.c
Expand Down Expand Up @@ -343,6 +374,8 @@ add_library(${PROJECT_NAME}
src/bacnet/basic/object/nc.h
src/bacnet/basic/object/netport.c
src/bacnet/basic/object/netport.h
$<$<BOOL:${BACDL_BSC}>:src/bacnet/basic/object/sc_netport.c>
$<$<BOOL:${BACDL_BSC}>:src/bacnet/basic/object/sc_netport.h>
src/bacnet/basic/object/objects.c
src/bacnet/basic/object/objects.h
src/bacnet/basic/object/osv.c
Expand Down Expand Up @@ -620,6 +653,7 @@ target_compile_definitions(
PUBLIC
BACNET_PROTOCOL_REVISION=${BACNET_PROTOCOL_REVISION}
$<$<BOOL:${BACDL_BIP}>:BACDL_BIP>
$<$<BOOL:${BACDL_BSC}>:BACDL_BSC>
$<$<BOOL:${BACDL_BIP6}>:BACDL_BIP6>
$<$<BOOL:${BACDL_ARCNET}>:BACDL_ARCNET>
$<$<BOOL:${BACDL_MSTP}>:BACDL_MSTP>
Expand All @@ -631,7 +665,12 @@ target_compile_definitions(
$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:BACNET_STACK_STATIC_DEFINE>
PRIVATE
PRINT_ENABLED=1)
target_link_libraries(${PROJECT_NAME} PUBLIC Threads::Threads)

if(BACDL_BSC)
target_link_libraries(${PROJECT_NAME} PUBLIC Threads::Threads ${LIB_WEBSOCKETS_LIBRARIES} )
else()
target_link_libraries(${PROJECT_NAME} PUBLIC Threads::Threads)
endif()

add_library(
${PROJECT_NAME}::${PROJECT_NAME}
Expand Down Expand Up @@ -662,6 +701,10 @@ elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
$<$<BOOL:${BACDL_MSTP}>:ports/linux/dlmstp.c>
$<$<BOOL:${BACDL_MSTP}>:ports/linux/dlmstp_linux.c>
$<$<BOOL:${BACDL_MSTP}>:ports/linux/dlmstp_linux.h>
$<$<BOOL:${BACDL_BSC}>:ports/linux/bsc-event.c>
$<$<BOOL:${BACDL_BSC}>:ports/linux/websocket-cli.c>
$<$<BOOL:${BACDL_BSC}>:ports/linux/websocket-srv.c>
$<$<BOOL:${BACDL_BSC}>:ports/linux/websocket-mutex.c>
$<$<BOOL:${BACDL_ETHERNET}>:ports/linux/ethernet.c>
ports/linux/mstimer-init.c)

Expand Down Expand Up @@ -727,6 +770,10 @@ elseif(APPLE)
$<$<BOOL:${BACDL_MSTP}>:ports/bsd/rs485.c>
$<$<BOOL:${BACDL_MSTP}>:ports/bsd/rs485.h>
$<$<BOOL:${BACDL_MSTP}>:ports/bsd/dlmstp.c>
$<$<BOOL:${BACDL_BSC}>:ports/bsd/bsc-event.c>
$<$<BOOL:${BACDL_BSC}>:ports/bsd/websocket-cli.c>
$<$<BOOL:${BACDL_BSC}>:ports/bsd/websocket-srv.c>
$<$<BOOL:${BACDL_BSC}>:ports/bsd/websocket-mutex.c>
ports/bsd/datetime-init.c
ports/bsd/mstimer-init.c
ports/bsd/stdbool.h)
Expand Down Expand Up @@ -758,7 +805,11 @@ elseif(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")

target_sources(${PROJECT_NAME} PRIVATE
ports/bsd/bacport.h
ports/bsd/bip-init.c
$<$<BOOL:${BACDL_BIP}>:ports/bsd/bip-init.c>
$<$<BOOL:${BACDL_BSC}>:ports/bsd/bsc-event.c>
$<$<BOOL:${BACDL_BSC}>:ports/bsd/websocket-cli.c>
$<$<BOOL:${BACDL_BSC}>:ports/bsd/websocket-srv.c>
$<$<BOOL:${BACDL_BSC}>:ports/bsd/websocket-mutex.c>
ports/bsd/datetime-init.c
ports/bsd/mstimer-init.c
ports/bsd/stdbool.h)
Expand Down Expand Up @@ -874,7 +925,7 @@ if(BACNET_STACK_BUILD_APPS)
)
endif(BACNET_BUILD_BACDISCOVER_APP)

if(BACDL_BIP)
if(BACDL_BIP AND (NOT BACDL_BSC))
add_executable(readbdt apps/readbdt/main.c)
target_link_libraries(readbdt PRIVATE ${PROJECT_NAME})

Expand Down Expand Up @@ -998,6 +1049,13 @@ if(BACNET_STACK_BUILD_APPS)

add_executable(writepropm apps/writepropm/main.c)
target_link_libraries(writepropm PRIVATE ${PROJECT_NAME})
if(BACDL_BSC)
#add_executable(sc-node apps/sc-node/main.c)
#target_link_libraries(sc-node PRIVATE ${PROJECT_NAME})

add_executable(sc-hub apps/sc-hub/main.c)
target_link_libraries(sc-hub PRIVATE ${PROJECT_NAME})
endif()
endif()

#
Expand Down Expand Up @@ -1058,6 +1116,7 @@ message(STATUS "BACNET: BACNET_PROTOCOL_REVISION:.......\"${BACNET_PROTOCOL_REVI
message(STATUS "BACNET: Selected datalinks:")
message(STATUS "BACNET: BACDL_BIP6:.....................\"${BACDL_BIP6}\"")
message(STATUS "BACNET: BACDL_BIP:......................\"${BACDL_BIP}\"")
message(STATUS "BACNET: BACDL_BSC:......................\"${BACDL_BSC}\"")
message(STATUS "BACNET: BACDL_ARCNET:...................\"${BACDL_ARCNET}\"")
message(STATUS "BACNET: BACDL_MSTP:.....................\"${BACDL_MSTP}\"")
message(STATUS "BACNET: BACDL_ETHERNET:.................\"${BACDL_ETHERNET}\"")
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ bip:
bip-client:
$(MAKE) BACDL=bip BBMD=client -s -C apps all

.PHONY: bsc
bsc:
$(MAKE) BACDL=bsc -s -C apps all

.PHONY: ethernet
ethernet:
$(MAKE) BACDL=ethernet -s -C apps all
Expand Down Expand Up @@ -184,6 +188,10 @@ server-client:
server-discover:
$(MAKE) LEGACY=true -s -C apps $@

.PHONY: sc-hub
sc-hub:
$(MAKE) BACDL=bsc -s -C apps $@

.PHONY: mstpcap
mstpcap:
$(MAKE) -s -C apps $@
Expand Down Expand Up @@ -438,6 +446,7 @@ clean: ports-clean
$(MAKE) -s -C apps/gateway clean
$(MAKE) -s -C apps/fuzz-afl clean
$(MAKE) -s -C apps/fuzz-libfuzzer clean
$(MAKE) -s -C apps/sc-hub clean
$(MAKE) -s -C ports/lwip clean
$(MAKE) -s -C test clean
rm -rf ./build
Expand Down
Loading
Loading