9b6173995c
* Fixed compiler warning format '%u' expects argument of type 'unsigned int', but argument 4 has type 'uint32_t' {aka 'long unsigned int'} [-Werror=format=] by casting or increasing format specifier size and casting. Increased the size of the name string to handle larger possible integers.
* Fixed copied code that no longer needs static function scope variables for text names.
BACnet GTK Discovery Application
A GTK-based graphical application for discovering BACnet devices, objects, and properties on a network.
Features
- Device Discovery: Browse and discover BACnet devices on the network
- Object Discovery: View all objects within a selected BACnet device
- Property Inspection: Examine properties of individual BACnet objects
- Three-Pane Interface:
- Left pane: Device list with device ID, name, model, and address
- Top-right pane: Object list for selected device
- Bottom-right pane: Property list for selected object
Prerequisites
GTK+ 3.0 Development Libraries
The application requires GTK+ 3.0 development libraries to be installed:
Ubuntu/Debian:
sudo apt-get update
sudo apt-get install libgtk-3-dev pkg-config
Fedora/RHEL/CentOS:
sudo yum install gtk3-devel pkgconfig
# or for newer versions:
sudo dnf install gtk3-devel pkgconfig
openSUSE:
sudo zypper install gtk3-devel pkg-config
Arch Linux:
sudo pacman -S gtk3 pkgconfig
Building
The BACnet stack library must be built first. The apps/Makefile helps with the various options. From the project root folder:
make gtk-discover
Running
Execute the built application:
./bin/bacdiscover-gtk
Usage
-
Device View: The left pane shows discovered BACnet devices.
-
Object View: Click on a device in the left pane to view its objects in the top-right pane. Objects show:
- Object type (Analog Input, Binary Output, etc.)
- Object instance number
- Object name
-
Property View: Click on an object to view its properties in the bottom-right pane, including:
- Property name
- Property value
-
Toolbar Functions:
- Discover Devices: network device discovery using Who-Is requests
- Refresh: refreshing current device data
Architecture
The application is structured with:
- GTK Components: ListStore models for each tree view
- BACnet Integration: Uses the BACnet Stack library
- Three-Pane Layout: Resizable paned windows for optimal viewing
Troubleshooting
Build Issues:
- GTK not found: Ensure GTK+ 3.0 development packages are installed
- BACnet library missing: Build the BACnet library first:
make -C apps/lib all - pkg-config issues: Install pkg-config package for your distribution
Runtime Issues:
- Application won't start: Check that all required libraries are installed
- Segmentation faults: Build with debug symbols:
make debug
Files
main.c- Main application source codeMakefile- Build configurationREADME.md- This documentation
Future Enhancements
- Property editing capabilities
- Device configuration management
- Trending and logging
- Alarm and event handling
- Export/import functionality
- Multiple datalink support configuration
- Network diagnostics and monitoring