Skip to content

Commit e4f4ccf

Browse files
committed
Updated the readme with more notes.
1 parent 864efe7 commit e4f4ccf

File tree

4 files changed

+19
-8
lines changed

4 files changed

+19
-8
lines changed

.gitignore

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,5 +127,7 @@ dmypy.json
127127

128128
# Pyre type checker
129129
.pyre/
130-
131-
CASBACnetStack_x64_Debug.dll
130+
131+
CASBACnetStack_x64_Debug.dll
132+
133+
CASBACnetStack_x64_Release.dll

BACnetServerExample.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,7 @@ def CallbackLogDebugMessage(message, messageLength, messageType):
528528
# ---------------------------------------------------------------------------
529529
# Load the shared library into ctypes
530530
libpath = pathlib.Path().absolute() / libname
531+
print("FYI: Libary path: ", libpath)
531532
CASBACnetStack = ctypes.CDLL(str(libpath), mode=ctypes.RTLD_GLOBAL)
532533

533534
# Print the version information
@@ -603,10 +604,10 @@ def CallbackLogDebugMessage(message, messageLength, messageType):
603604
CASBACnetStack.BACnetStack_RegisterCallbackSetPropertyOctetString(pyCallbackSetPropertyOctetString)
604605
pyCallbackReinitializeDevice = fpCallbackReinitializeDevice(CallbackReinitializeDevice)
605606
CASBACnetStack.BACnetStack_RegisterCallbackReinitializeDevice(pyCallbackReinitializeDevice)
606-
pyCallbackDeviceCommunicationControl = fpCallbackDeviceCommunicationControl(CallbackDeviceCommunicationControl)
607-
CASBACnetStack.BACnetStack_RegisterCallbackDeviceCommunicationControl(pyCallbackDeviceCommunicationControl)
608-
pyCallbackLogDebugMessage = fpCallbackLogDebugMessage(CallbackLogDebugMessage)
609-
CASBACnetStack.BACnetStack_RegisterCallbackLogDebugMessage(pyCallbackLogDebugMessage)
607+
# pyCallbackDeviceCommunicationControl = fpCallbackDeviceCommunicationControl(CallbackDeviceCommunicationControl)
608+
# CASBACnetStack.BACnetStack_RegisterCallbackDeviceCommunicationControl(pyCallbackDeviceCommunicationControl)
609+
# pyCallbackLogDebugMessage = fpCallbackLogDebugMessage(CallbackLogDebugMessage)
610+
# CASBACnetStack.BACnetStack_RegisterCallbackLogDebugMessage(pyCallbackLogDebugMessage)
610611

611612
# 4. Setup the BACnet device
612613
# ---------------------------------------------------------------------------

CASBACnetStackAdapter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
print("Error: Could not detect the platform.architecture", platform.architecture())
3232
elif platform.system() == "Linux":
3333
if platform.architecture()[0] == "64bit":
34-
libname = "CASBACnetStack_x64_Debug.so"
34+
libname = "libCASBACnetStack_x64_Debug.so"
3535
elif platform.architecture()[0] == "32bit":
3636
if "armv7" in platform.machine():
3737
# Raspberry PI 3 or 4. Arm7

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,19 @@ FYI: Updating AnalogInput (0) PresentValue: 100.6
6161

6262
This python script requires the [CAS BACnet Stack](https://www.bacnetstack.com/) DLL that can be purchased from [Chipkin Automation Systems](https://store.chipkin.com).
6363

64-
Place the DLL in the root folder.
64+
Place the DLL in the root folder. Windows: CASBACnetStack_x64_Release.dll, Linux: libCASBACnetStack_x64_Release.so
6565

6666
```bash
6767
pip install pathlib
6868
pip install dnspython
69+
pip install netifaces
70+
```
71+
72+
## Running
73+
74+
```bash
75+
python BACnetServerExample.py
76+
6977
```
7078

7179
## Useful links

0 commit comments

Comments
 (0)