Strip tabs and trailing white spaces, and fix end of files (#748)
* format: Strip trailing whitespaces
We want to get rid of trailing whitespaces completly as they make just git
noice. Much better to start using automated tools to get rid of them once and
not getting them back again. This way git history will be cleaner and review
easier.
Commit was generated with:
pre-commit run --all-files trailing-whitespace
* format: Files should have exactly one new line end of them
It is good practice that every file has one new line. It is not now days so
mandatory but it also is not nice if file has lot of newlines end of it. We will
use pre-commit which takes automatically care about this so let's fix all.
Commit was generated with:
pre-commit run --all-files end-of-file-fixer
* format: Convert tabs to spaces
Project mostly use spaces over tabs. When mixing tabs and spaces this usually
makes formatting issues and also when changing those in commits it will make lot
of git noise. We will force spaces most of the time and use pre-commit to fix.
Commit was generated with:
pre-commit run --all-files remove-tabs
---------
Co-authored-by: Kari Argillander <kari.argillander@fidelix.com>
This commit is contained in:
+559
-559
File diff suppressed because it is too large
Load Diff
+7
-7
@@ -58,7 +58,7 @@ The git repositories are hosted at the following sites:
|
||||
### Changed
|
||||
|
||||
* Changed MS/TP master node self destination checks to be
|
||||
located in receive FSM. Changed MSTP zero configuration: modified
|
||||
located in receive FSM. Changed MSTP zero configuration: modified
|
||||
comments for state transition names; modified next station increment;
|
||||
refactored the UUID rand() to not be required by common
|
||||
zero config implementation; added more unit tests. (#676)
|
||||
@@ -75,7 +75,7 @@ The git repositories are hosted at the following sites:
|
||||
Fixed Binary input/value set. (#672)
|
||||
* Fixed wildcard check in create object for Binary Input objects. (#663)
|
||||
* Fixed memory leaks in create object initialization if repeated. (#664)(#662)
|
||||
* Fixed the Zephyr-OS BIP6 datalink module. (#659)
|
||||
* Fixed the Zephyr-OS BIP6 datalink module. (#659)
|
||||
* Fixed redundant GCC compiler flags in ARM, OS, and test builds, and made them
|
||||
more consistent across various builds. (#658)
|
||||
* Fixed redundant redeclaration of various functions detected by change
|
||||
@@ -147,11 +147,11 @@ The git repositories are hosted at the following sites:
|
||||
which datatypes can be written. (#620)
|
||||
* Changed format in CMake to enable cleaner SC merge. (#620)
|
||||
* Changed the first instance of a basic integer value object from 1 to 0. (#619)
|
||||
* Changed basic time-value object present-value to be decoupled from
|
||||
* Changed basic time-value object present-value to be decoupled from
|
||||
current time, and changed out-of-service property to be writable.
|
||||
|
||||
### Fixed
|
||||
|
||||
|
||||
* Fixed nuisance print messages in ports/linux/dlmstp by changing
|
||||
to debug print only. (#633)
|
||||
* Fixed compile warnings in basic objects. (#630)
|
||||
@@ -196,7 +196,7 @@ current time, and changed out-of-service property to be writable.
|
||||
|
||||
* Changed property lists member function for WriteProperty default case
|
||||
by refactoring.(#609)
|
||||
* Changed time-value object unit testing by refactoring.(#609)
|
||||
* Changed time-value object unit testing by refactoring.(#609)
|
||||
* Changed ports/zephry for BACnet/IP and date-time with latest
|
||||
Zephyr OS.(#606)
|
||||
* Changed Zephyr OS west manifest to target zephyr v3.6.0.(#601)
|
||||
@@ -204,7 +204,7 @@ current time, and changed out-of-service property to be writable.
|
||||
* Changed position of bacnet/bacdef.h to be the first bacnet header
|
||||
to include. BACnet headers need to pull in optional configuration and
|
||||
optional ecosystem overrides to allow integrators to control
|
||||
builds. This change places bacnet/bacdef.h to the top of the BACnet
|
||||
builds. This change places bacnet/bacdef.h to the top of the BACnet
|
||||
Stack header files to consistently introduce integrator and ports
|
||||
header files.(#598)(#600)
|
||||
* Added dependent BACnet stack headers into bacdef.h file.(#602)
|
||||
@@ -267,7 +267,7 @@ current time, and changed out-of-service property to be writable.
|
||||
|
||||
* Changed BACnet R/W FSM module to remove dependency on
|
||||
rpm_ack_decode_service_request() which uses large calloc/free
|
||||
value lists. Created an alternate RPM-ACK to RP-ACK processing
|
||||
value lists. Created an alternate RPM-ACK to RP-ACK processing
|
||||
function. (#583)
|
||||
* Changed basic RPM handler to skip over unknown property values. (#583)
|
||||
* Changed the release script to use tag option and remove tag reminder.
|
||||
|
||||
+3
-3
@@ -741,13 +741,13 @@ if(BACNET_STACK_BUILD_APPS)
|
||||
target_compile_options(mstpcap PRIVATE
|
||||
# NOTE: Might be that this example currently doesn't work on Windows because
|
||||
# of the following warning:
|
||||
|
||||
|
||||
# 'strncasecmp': macro redefinition
|
||||
$<$<C_COMPILER_ID:MSVC>:/wd4005>
|
||||
# 'gettimeofday' undefined; assuming extern returning int
|
||||
$<$<C_COMPILER_ID:MSVC>:/wd4013>
|
||||
)
|
||||
|
||||
|
||||
add_executable(mstpcrc apps/mstpcrc/main.c)
|
||||
target_link_libraries(mstpcrc PRIVATE ${PROJECT_NAME})
|
||||
target_compile_options(mstpcrc PRIVATE
|
||||
@@ -842,7 +842,7 @@ if(BACNET_STACK_BUILD_APPS)
|
||||
|
||||
target_compile_options(router PRIVATE
|
||||
# These make this example not totally C90 compatible but it is ok.
|
||||
|
||||
|
||||
-Wno-declaration-after-statement
|
||||
-Wno-overlength-strings
|
||||
-Wno-variadic-macros
|
||||
|
||||
+2
-3
@@ -19,7 +19,7 @@ FROM ubuntu:focal as builder
|
||||
# /opt/bacnet/bin/bacrp 1234 device 1234 object-name
|
||||
## etc.
|
||||
|
||||
## Check bacnet-stack/bin/readme.txt for more docs related to the
|
||||
## Check bacnet-stack/bin/readme.txt for more docs related to the
|
||||
## example utilities and environment variables. Note that this docker
|
||||
## image does not add the shell scripts in that folder as many of them
|
||||
## are broken. Even so, reading them may be instructive.
|
||||
@@ -30,7 +30,7 @@ SHELL ["/bin/bash", "-c"]
|
||||
RUN set -xe; \
|
||||
apt-get update; apt-get upgrade -y; apt-get --purge autoremove -y; \
|
||||
apt-get install -y build-essential curl; \
|
||||
apt-get -y autoclean; apt-get -y clean
|
||||
apt-get -y autoclean; apt-get -y clean
|
||||
|
||||
RUN set -euxo pipefail; \
|
||||
mkdir -p /build/bin; \
|
||||
@@ -50,4 +50,3 @@ COPY --from=builder /build/bin/* /opt/bacnet/bin/
|
||||
EXPOSE 47808/udp
|
||||
ENTRYPOINT ["/opt/bacnet/bin/bacserv"]
|
||||
CMD ["1234", "test_server"]
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# BACnet Stack
|
||||
# BACnet Stack
|
||||
|
||||
BACnet open source protocol stack C library for embedded systems,
|
||||
Linux, MacOS, BSD, and Windows
|
||||
@@ -38,18 +38,18 @@ the standard (just like IEEE or ANSI or ISO).
|
||||
For software developers, the BACnet protocol is a standard way to send and
|
||||
receive messages containing data that are understood by other BACnet
|
||||
compliant devices. The BACnet standard defines a standard way to communicate
|
||||
over various wires or radios, known as Data Link/Physical Layers: Ethernet,
|
||||
EIA-485, EIA-232, ARCNET, and LonTalk. The BACnet standard also defines a
|
||||
over various wires or radios, known as Data Link/Physical Layers: Ethernet,
|
||||
EIA-485, EIA-232, ARCNET, and LonTalk. The BACnet standard also defines a
|
||||
standard way to communicate using UDP, IP, HTTP (Web Services), and Websockets.
|
||||
|
||||
This BACnet protocol stack implementation is specifically designed for the
|
||||
embedded BACnet appliance, using a GPL with exception license (like eCos),
|
||||
which means that any changes to the core code that are distributed are shared,
|
||||
but the BACnet library can be linked to proprietary code without the proprietary
|
||||
code becoming GPL. Note that some of the source files are designed as
|
||||
which means that any changes to the core code that are distributed are shared,
|
||||
but the BACnet library can be linked to proprietary code without the proprietary
|
||||
code becoming GPL. Note that some of the source files are designed as
|
||||
skeleton or example or template files, and are not copyrighted as GPL.
|
||||
|
||||
The text of the GPL exception included in each source file is as follows:
|
||||
The text of the GPL exception included in each source file is as follows:
|
||||
|
||||
* SPDX-License-Identifier: GPL-2.0-or-later WITH GCC-exception-2.0
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
@@ -70,8 +70,8 @@ https://sourceforge.net/p/bacnet/src/ci/master/tree/doc/README.developer
|
||||
|
||||
This stack includes unit tests that can be run using the Makefile in the
|
||||
project root directory "make test".
|
||||
The unit tests can also be run using individual make invocations.
|
||||
The unit tests run a PC and continue to do so with
|
||||
The unit tests can also be run using individual make invocations.
|
||||
The unit tests run a PC and continue to do so with
|
||||
every commit within the Continuous Integration environment.
|
||||
|
||||
The BACnet stack was functionally tested using a variety of tools
|
||||
@@ -80,7 +80,7 @@ in many products that successfully completed BTL testing.
|
||||
|
||||
Using the Makefile in the project root directory, a dozen sample applications
|
||||
are created that run under Windows or Linux. They use the BACnet/IPv4 datalink
|
||||
layer for communication by default, but could be compiled to use BACnet IPv6,
|
||||
layer for communication by default, but could be compiled to use BACnet IPv6,
|
||||
Ethernet, ARCNET, or MS/TP.
|
||||
|
||||
Linux/Unix/Cygwin
|
||||
@@ -106,7 +106,7 @@ to generate a Code::Blocks project:
|
||||
$ mkdir build
|
||||
$ cd build/
|
||||
$ cmake .. -G"CodeBlocks - Unix Makefiles"
|
||||
|
||||
|
||||
c:\> mkdir build
|
||||
c:\> cd build/
|
||||
c:\> cmake .. -G"CodeBlocks - MinGW Makefiles"
|
||||
@@ -114,22 +114,22 @@ to generate a Code::Blocks project:
|
||||
The unit tests also use CMake and may be run with the command sequence:
|
||||
|
||||
$ make test
|
||||
|
||||
|
||||
The unit test framework uses a slightly modified ztest, and the tests are located
|
||||
in the test/ folder. The unit test builder uses CMake, and the test coverage
|
||||
uses LCOV. The HTML results of the unit testing coverage are available starting
|
||||
in the test/ folder. The unit test builder uses CMake, and the test coverage
|
||||
uses LCOV. The HTML results of the unit testing coverage are available starting
|
||||
in the test/build/lcoverage/index.html file.
|
||||
|
||||
The demo applications are all client applications that provide one main BACnet
|
||||
service, except the one server application and one gateway application,
|
||||
service, except the one server application and one gateway application,
|
||||
a couple router applications, and a couple of MS/TP specific applications.
|
||||
Each application will accept command line parameters, and prints the output to
|
||||
stdout or stderr. The client applications are command line based and can
|
||||
be used in scripts or for troubleshooting.
|
||||
The demo applications make use of environment variables to
|
||||
Each application will accept command line parameters, and prints the output to
|
||||
stdout or stderr. The client applications are command line based and can
|
||||
be used in scripts or for troubleshooting.
|
||||
The demo applications make use of environment variables to
|
||||
setup the network options. See each individual demo for the options.
|
||||
|
||||
There are also projects in the ports/ directory for ARM7, AVR, RTOS-32, PIC,
|
||||
There are also projects in the ports/ directory for ARM7, AVR, RTOS-32, PIC,
|
||||
and others. Each of those projects has a demo application for specific hardware.
|
||||
In the case of the ARM7 and AVR, their makefile works with GCC compilers and
|
||||
there are project files for IAR Embedded Workbench and Rowley Crossworks for ARM.
|
||||
@@ -146,7 +146,7 @@ Project Mailing List and Help
|
||||
If you want to contribute to this project and have some C coding skills,
|
||||
join us via https://github.com/bacnet-stack/bacnet-stack/
|
||||
or via https://sourceforge.net/p/bacnet/src/ and create a
|
||||
fork or branch, and eventually a pull request to have
|
||||
fork or branch, and eventually a pull request to have
|
||||
your code considered for inclusion.
|
||||
|
||||
If you find a bug in this project, please tell us about it at
|
||||
@@ -154,7 +154,7 @@ https://sourceforge.net/p/bacnet/bugs/
|
||||
or
|
||||
https://github.com/bacnet-stack/bacnet-stack/issues
|
||||
|
||||
If you have a support request, you can post it at
|
||||
If you have a support request, you can post it at
|
||||
https://sourceforge.net/p/bacnet/support-requests/
|
||||
|
||||
If you have a feature request, you can post it at
|
||||
@@ -171,6 +171,6 @@ I hope that you get your BACnet Device working!
|
||||
Steve Karg, Birmingham, Alabama USA
|
||||
skarg@users.sourceforge.net
|
||||
|
||||
ASHRAE® and BACnet® are registered trademarks of the
|
||||
ASHRAE® and BACnet® are registered trademarks of the
|
||||
American Society of Heating, Refrigerating and Air-Conditioning Engineers, Inc.
|
||||
180 Technology Parkway NW, Peachtree Corners, Georgia 30092 US.
|
||||
|
||||
+1
-2
@@ -148,7 +148,7 @@ DEBUGGING ?=
|
||||
# enable all relevant warnings that find bugs
|
||||
WARNING_ALL := -Wall -Wextra -pedantic
|
||||
WARNING_ALL += -Wfloat-equal -Wconversion
|
||||
WARNING_ALL += -Wredundant-decls -Wswitch-default
|
||||
WARNING_ALL += -Wredundant-decls -Wswitch-default
|
||||
WARNING_ALL += -Wunused-variable
|
||||
# don't warn about conversion, sign, compares, long long and attributes
|
||||
# since they are common in embedded
|
||||
@@ -459,4 +459,3 @@ fuzz-afl: $(BACNET_LIB_TARGET)
|
||||
.PHONY: writepropm
|
||||
writepropm: $(BACNET_LIB_TARGET)
|
||||
$(MAKE) -B -C $@
|
||||
|
||||
|
||||
@@ -37,4 +37,3 @@ clean:
|
||||
|
||||
.PHONY: include
|
||||
include: .depend
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* @file
|
||||
* @brief command line tool that sends a BACnet service Abort message
|
||||
* @brief command line tool that sends a BACnet service Abort message
|
||||
* to the network
|
||||
* @author Steve Karg <skarg@users.sourceforge.net>
|
||||
* @date 2016
|
||||
|
||||
@@ -37,4 +37,3 @@ clean:
|
||||
|
||||
.PHONY: include
|
||||
include: .depend
|
||||
|
||||
|
||||
@@ -37,4 +37,3 @@ clean:
|
||||
|
||||
.PHONY: include
|
||||
include: .depend
|
||||
|
||||
|
||||
@@ -53,4 +53,3 @@ clean:
|
||||
|
||||
.PHONY: include
|
||||
include: .depend
|
||||
|
||||
|
||||
+9
-10
@@ -5,7 +5,7 @@ for the eight RGB (red-green-blue) LEDs attached to the Blinkt! card.
|
||||
|
||||
## Installation
|
||||
|
||||
The demo uses pigpiod (Pi GPIO Daemon) and developer library. To install
|
||||
The demo uses pigpiod (Pi GPIO Daemon) and developer library. To install
|
||||
and run the daemon at powerup (and immediately):
|
||||
|
||||
$ sudo apt install libpigpio-dev libpigpiod-if-dev pigpiod
|
||||
@@ -14,12 +14,12 @@ and run the daemon at powerup (and immediately):
|
||||
|
||||
## WiFi Power
|
||||
|
||||
If you are using a Raspberry Pi with WiFi, you will likely want
|
||||
If you are using a Raspberry Pi with WiFi, you will likely want
|
||||
to disable WiFi Power saving. Under Raspberry Pi OS, so the following.
|
||||
|
||||
### Startup service in systemd
|
||||
|
||||
To manage to start programs you should use systemd Unit files.
|
||||
To manage to start programs you should use systemd Unit files.
|
||||
|
||||
File name: /etc/systemd/system/wlan0pwr.service
|
||||
|
||||
@@ -44,9 +44,9 @@ In the empty editor insert these statements, save them and quit the editor:
|
||||
Enable the new service with:
|
||||
|
||||
rpi ~$ sudo systemctl enable wlan0pwr.service
|
||||
|
||||
|
||||
## Building the Blinkt! BACnet Application
|
||||
|
||||
|
||||
Build from the root folder:
|
||||
|
||||
$ make blinkt
|
||||
@@ -59,8 +59,8 @@ Run from the bin/ folder:
|
||||
|
||||
## Blinkt! as a Startup service with systemd
|
||||
|
||||
To manage to start programs you should use systemd Unit files.
|
||||
Here is a very simple template you can use to start to solve your problem.
|
||||
To manage to start programs you should use systemd Unit files.
|
||||
Here is a very simple template you can use to start to solve your problem.
|
||||
Create a new service with:
|
||||
|
||||
rpi ~$ sudo systemctl --full --force edit bacnet.service
|
||||
@@ -81,13 +81,12 @@ Enable the new service after the next reboot with:
|
||||
|
||||
rpi ~$ sudo systemctl enable bacnet.service
|
||||
|
||||
Create your bacnet.sh shell script in your home folder (change from pi if
|
||||
Create your bacnet.sh shell script in your home folder (change from pi if
|
||||
that is not your home folder). Use the shell script to set any environment
|
||||
variables that you want, or configuration settings for the bin/bacblinkt
|
||||
variables that you want, or configuration settings for the bin/bacblinkt
|
||||
application such as a specific device ID.
|
||||
|
||||
A simplistic bacnet.sh script will look like this (with stdout/stderr to /dev/null):
|
||||
|
||||
#!/bin/bash
|
||||
/home/pi/bacnet-stack/bin/bacblinkt 9009 > /dev/null 2>&1
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @file
|
||||
/**
|
||||
* @file
|
||||
* @brief Base "class" for handling all BACnet objects belonging
|
||||
* to a BACnet device, as well as Device-specific properties.
|
||||
* @author Steve Karg <skarg@users.sourceforge.net>
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* @file
|
||||
* @brief Example application using the BACnet Stack on a Raspberry Pi
|
||||
/**
|
||||
* @file
|
||||
* @brief Example application using the BACnet Stack on a Raspberry Pi
|
||||
* with Blinkt! LEDs.
|
||||
* @author Steve Karg <skarg@users.sourceforge.net>
|
||||
* @date 2023
|
||||
|
||||
@@ -37,4 +37,3 @@ clean:
|
||||
|
||||
.PHONY: include
|
||||
include: .depend
|
||||
|
||||
|
||||
@@ -37,4 +37,3 @@ clean:
|
||||
|
||||
.PHONY: include
|
||||
include: .depend
|
||||
|
||||
|
||||
@@ -27,13 +27,13 @@
|
||||
* Allows you to communicate with a localhost target.
|
||||
* -t: declare target's MAC instead of using Who-Is to bind to
|
||||
* device-instance. Format is "C0:A8:00:18:BA:C0" (as usual)
|
||||
*
|
||||
*
|
||||
* Examples:
|
||||
* ./bacepics -v 1234
|
||||
* ./bacepics -v 1234
|
||||
* where the device instance to be addressed is 1234
|
||||
* and the optional -v prints values out rather than the '?' that
|
||||
* the EPICS format for VTS3 wants.
|
||||
* ./bacepics -p 0xBAC1 -t "7F:0:0:1:BA:C0" 4194303
|
||||
* ./bacepics -p 0xBAC1 -t "7F:0:0:1:BA:C0" 4194303
|
||||
* communicates with the BACnet device on localhost (127.0.0.1), using
|
||||
* port 47809 as "my" source port so it doesn't conflict with
|
||||
* the device's port 47808.
|
||||
@@ -48,13 +48,13 @@
|
||||
* ALL again with array index of 0, which should result mostly in errors
|
||||
* but will provide the list of supported properties.
|
||||
* - If that succeeds, build the list of properties to be accessed. <br>
|
||||
* - If no RPM or failed to get ALL properties from the target device, then
|
||||
* fetch the coded Required and Optional properties from the demo/object
|
||||
* folder for this object type, and use this to build the list of
|
||||
* - If no RPM or failed to get ALL properties from the target device, then
|
||||
* fetch the coded Required and Optional properties from the demo/object
|
||||
* folder for this object type, and use this to build the list of
|
||||
* properties to be accessed.
|
||||
* - If the Fetch All succeeded, print the values for each property
|
||||
* - Otherwise, for each property in the list for this object,
|
||||
* - Request the single property value with ReadProperty (RP)
|
||||
* - Request the single property value with ReadProperty (RP)
|
||||
* - From the response, print the property's value
|
||||
* The Device Object will have fetched the Object List property and built a list
|
||||
* of objects from that; use it now to cycle through each other Object and
|
||||
|
||||
+2
-2
@@ -575,7 +575,7 @@ static void PrintReadPropertyData(BACNET_OBJECT_TYPE object_type,
|
||||
}
|
||||
} else if (rpm_property->propertyIdentifier ==
|
||||
PROP_SUBORDINATE_LIST) {
|
||||
if (value->tag !=
|
||||
if (value->tag !=
|
||||
BACNET_APPLICATION_TAG_DEVICE_OBJECT_REFERENCE) {
|
||||
break;
|
||||
}
|
||||
@@ -648,7 +648,7 @@ static void PrintReadPropertyData(BACNET_OBJECT_TYPE object_type,
|
||||
/* Closing brace for this multi-valued array */
|
||||
fprintf(stdout, " }");
|
||||
}
|
||||
if (property_list_writable_member(object_type,
|
||||
if (property_list_writable_member(object_type,
|
||||
rpm_property->propertyIdentifier)) {
|
||||
fprintf(stdout, " Writable");
|
||||
}
|
||||
|
||||
@@ -37,4 +37,3 @@ clean:
|
||||
|
||||
.PHONY: include
|
||||
include: .depend
|
||||
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @file
|
||||
* @brief command line tool that sends a BACnet service to the network:
|
||||
* BACnet Error message
|
||||
* BACnet Error message
|
||||
* @author Steve Karg <skarg@users.sourceforge.net>
|
||||
* @date 2016
|
||||
* @copyright SPDX-License-Identifier: MIT
|
||||
|
||||
@@ -37,4 +37,3 @@ clean:
|
||||
|
||||
.PHONY: include
|
||||
include: .depend
|
||||
|
||||
|
||||
@@ -15,10 +15,7 @@ afl-cc 2.57b by <lcamtuf@google.com>
|
||||
afl-fuzz -i </path/to/corpus/> -o </path/to/output_dir/> -m none ./apps/fuzz-afl/fuzz-afl
|
||||
```
|
||||
|
||||
Caveats:
|
||||
Caveats:
|
||||
|
||||
* This builds the target with ASAN (Address Sanitizer). This makes AFL require the `-m none` to not interpret ASAN's behavior as a crash
|
||||
* AFL uses a fork/exec model to launch the target. This is nice because each testcase is from a clean state. But this also brings in a lot of overhead. If you need something faster, check out ../fuzz-libfuzzer/
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include "bacnet/datalink/bvlc.h"
|
||||
#include "bacnet/basic/bbmd/h_bbmd.h"
|
||||
|
||||
// Pull in all of this...
|
||||
// Pull in all of this...
|
||||
#include "../router-mstp/main.c"
|
||||
|
||||
static void Init_Service_Handlers()
|
||||
@@ -86,7 +86,7 @@ extern int Device_Reinitialize(void) {
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
BACNET_ADDRESS src = { 0 };
|
||||
BACNET_ADDRESS src = { 0 };
|
||||
uint16_t pdu_len = 0;
|
||||
|
||||
Init_Service_Handlers();
|
||||
|
||||
@@ -17,12 +17,12 @@ INFO: seed corpus: files: 5790 min: 1b max: 483b total: 305068b rss: 40Mb
|
||||
NPDU: Decoding failed; Discarded!
|
||||
...
|
||||
NPDU: DNET=65280. Discarded!
|
||||
#5867 REDUCE cov: 208 ft: 249 corp: 66/1273b lim: 115 exec/s: 2933 rss: 106Mb L: 12/109 MS: 1 EraseBytes-
|
||||
#5867 REDUCE cov: 208 ft: 249 corp: 66/1273b lim: 115 exec/s: 2933 rss: 106Mb L: 12/109 MS: 1 EraseBytes-
|
||||
Received Reserved for Use by ASHRAE
|
||||
WP: Failed to send PDU (Success)!
|
||||
NEW_FUNC[1/3]: 0x55a0d533f98a in abort_encode_apdu /mnt/net/lab_share/Bacnet/bacnet-stack-fixes/src/bacnet/abort.c:149
|
||||
NEW_FUNC[2/3]: 0x55a0d538f29a in wp_decode_service_request /mnt/net/lab_share/Bacnet/bacnet-stack-fixes/src/bacnet/wp.c:113
|
||||
#5940 NEW cov: 216 ft: 257 corp: 68/1282b lim: 115 exec/s: 2970 rss: 106Mb L: 6/109 MS: 2 EraseBytes-ChangeBit-
|
||||
NEW_FUNC[1/3]: 0x55a0d533f98a in abort_encode_apdu /mnt/net/lab_share/Bacnet/bacnet-stack-fixes/src/bacnet/abort.c:149
|
||||
NEW_FUNC[2/3]: 0x55a0d538f29a in wp_decode_service_request /mnt/net/lab_share/Bacnet/bacnet-stack-fixes/src/bacnet/wp.c:113
|
||||
#5940 NEW cov: 216 ft: 257 corp: 68/1282b lim: 115 exec/s: 2970 rss: 106Mb L: 6/109 MS: 2 EraseBytes-ChangeBit-
|
||||
Received Reserved for Use by ASHRAE
|
||||
...
|
||||
=================================================================
|
||||
@@ -45,7 +45,6 @@ READ of size 1 at 0x60200003b656 thread T0
|
||||
...
|
||||
```
|
||||
|
||||
Caveat:
|
||||
Caveat:
|
||||
|
||||
* Libfuzzer does not reinitialize the target on each testcase. This means that it will be much quicker than ../fuzz-afl/, BUT it will also be a little less stable. It also will not continue to fuzz after a crash is found (since the libfuzzer runtime shares a process with the target that just crashed). There may be some command line options to adopt a fork model.
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "bacnet/datalink/bvlc.h"
|
||||
#include "bacnet/basic/bbmd/h_bbmd.h"
|
||||
|
||||
// Pull in all of this...
|
||||
// Pull in all of this...
|
||||
#include "../router-mstp/main.c"
|
||||
|
||||
static void Init_Service_Handlers(void) {
|
||||
@@ -83,7 +83,7 @@ extern int Device_Reinitialize(void) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern bool Device_COV(BACNET_OBJECT_TYPE object_type, uint32_t object_instance) {
|
||||
extern bool Device_COV(BACNET_OBJECT_TYPE object_type, uint32_t object_instance) {
|
||||
return false;
|
||||
}
|
||||
extern void Device_COV_Clear(BACNET_OBJECT_TYPE object_type, uint32_t object_instance) {
|
||||
@@ -98,11 +98,11 @@ extern bool Device_Encode_Value_List(BACNET_OBJECT_TYPE object_type,
|
||||
|
||||
}
|
||||
|
||||
extern int Device_Add_List_Element(BACNET_LIST_ELEMENT_DATA * list_element) {
|
||||
extern int Device_Add_List_Element(BACNET_LIST_ELEMENT_DATA * list_element) {
|
||||
return BACNET_STATUS_ERROR;
|
||||
}
|
||||
|
||||
extern int Device_Remove_List_Element(BACNET_LIST_ELEMENT_DATA * list_element) {
|
||||
extern int Device_Remove_List_Element(BACNET_LIST_ELEMENT_DATA * list_element) {
|
||||
return BACNET_STATUS_ERROR;
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ extern bool Device_Write_Property_Local(BACNET_WRITE_PROPERTY_DATA *wp_data) {
|
||||
}
|
||||
|
||||
int LLVMFuzzerTestOneInput(uint8_t *data, size_t size) {
|
||||
BACNET_ADDRESS src = { 0 };
|
||||
BACNET_ADDRESS src = { 0 };
|
||||
|
||||
Init_Service_Handlers();
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* @file
|
||||
* @brief Header for example gateway (ie, BACnet Router and Devices)
|
||||
* @brief Header for example gateway (ie, BACnet Router and Devices)
|
||||
* using the BACnet Stack.
|
||||
* @author Tom Brennan <tbrennan3@users.sourceforge.net>
|
||||
* @date 2010
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
/** @defgroup GatewayDemo Demo of a BACnet virtual gateway (multiple Device).
|
||||
* @ingroup Demos
|
||||
* This is a basic demonstration of a BACnet Router with child devices (ie,
|
||||
* This is a basic demonstration of a BACnet Router with child devices (ie,
|
||||
* gateway) appearing on a virtual BACnet network behind the Router.
|
||||
* This is an extension of the ServerDemo project.
|
||||
*/
|
||||
|
||||
@@ -37,4 +37,3 @@ clean:
|
||||
|
||||
.PHONY: include
|
||||
include: .depend
|
||||
|
||||
|
||||
@@ -37,4 +37,3 @@ clean:
|
||||
|
||||
.PHONY: include
|
||||
include: .depend
|
||||
|
||||
|
||||
@@ -37,4 +37,3 @@ clean:
|
||||
|
||||
.PHONY: include
|
||||
include: .depend
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* @file
|
||||
* @brief command line tool that sends a BACnet I-Am-Router-To-Network message
|
||||
* @brief command line tool that sends a BACnet I-Am-Router-To-Network message
|
||||
* for one or more networks.
|
||||
* @author Steve Karg <skarg@users.sourceforge.net>
|
||||
* @date 2008
|
||||
|
||||
@@ -37,4 +37,3 @@ clean:
|
||||
|
||||
.PHONY: include
|
||||
include: .depend
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @file
|
||||
* @brief command line tool that sends a BACnet Initialize-Routing-Table
|
||||
* message to a network and waits for responses. Displays their network
|
||||
* @brief command line tool that sends a BACnet Initialize-Routing-Table
|
||||
* message to a network and waits for responses. Displays their network
|
||||
* information from the response. This is a router-to-router message.
|
||||
* @author Steve Karg <skarg@users.sourceforge.net>
|
||||
* @date 2008
|
||||
|
||||
@@ -60,7 +60,7 @@ ${TARGET_BIN}: ${OBJS} Makefile
|
||||
${CC} ${PFLAGS} ${OBJS} ${LFLAGS} -o $@
|
||||
size $@
|
||||
cp $@ ../../bin
|
||||
|
||||
|
||||
.c.o:
|
||||
${CC} -c ${CFLAGS} $*.c -o $@
|
||||
|
||||
|
||||
@@ -37,4 +37,3 @@ clean:
|
||||
|
||||
.PHONY: include
|
||||
include: .depend
|
||||
|
||||
|
||||
@@ -16,68 +16,68 @@
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="#name">NAME</a></li>
|
||||
<li><a href="#description">DESCRIPTION</a></li>
|
||||
<li><a href="#options">OPTIONS</a></li>
|
||||
<li><a href="#this_tool_s_api">This tool's API</a></li>
|
||||
<ul>
|
||||
<li><a href="#name">NAME</a></li>
|
||||
<li><a href="#description">DESCRIPTION</a></li>
|
||||
<li><a href="#options">OPTIONS</a></li>
|
||||
<li><a href="#this_tool_s_api">This tool's API</a></li>
|
||||
<ul>
|
||||
|
||||
<li><a href="#readproperty">ReadProperty</a></li>
|
||||
<ul>
|
||||
<li><a href="#readproperty">ReadProperty</a></li>
|
||||
<ul>
|
||||
|
||||
<li><a href="#inputs_to_readproperty">Inputs to ReadProperty</a></li>
|
||||
<li><a href="#outputs_from_readproperty">Outputs from ReadProperty</a></li>
|
||||
<li><a href="#example_of_readproperty">Example of ReadProperty</a></li>
|
||||
</ul>
|
||||
<li><a href="#inputs_to_readproperty">Inputs to ReadProperty</a></li>
|
||||
<li><a href="#outputs_from_readproperty">Outputs from ReadProperty</a></li>
|
||||
<li><a href="#example_of_readproperty">Example of ReadProperty</a></li>
|
||||
</ul>
|
||||
|
||||
<li><a href="#readpropertymultiple">ReadPropertyMultiple</a></li>
|
||||
<ul>
|
||||
<li><a href="#readpropertymultiple">ReadPropertyMultiple</a></li>
|
||||
<ul>
|
||||
|
||||
<li><a href="#inputs_to_readpropertymultiple">Inputs to ReadPropertyMultiple</a></li>
|
||||
<li><a href="#outputs_from_readpropertymultiple">Outputs from ReadPropertyMultiple</a></li>
|
||||
<li><a href="#example_of_readpropertymultiple">Example of ReadPropertyMultiple</a></li>
|
||||
</ul>
|
||||
<li><a href="#inputs_to_readpropertymultiple">Inputs to ReadPropertyMultiple</a></li>
|
||||
<li><a href="#outputs_from_readpropertymultiple">Outputs from ReadPropertyMultiple</a></li>
|
||||
<li><a href="#example_of_readpropertymultiple">Example of ReadPropertyMultiple</a></li>
|
||||
</ul>
|
||||
|
||||
<li><a href="#writeproperty">WriteProperty</a></li>
|
||||
<ul>
|
||||
<li><a href="#writeproperty">WriteProperty</a></li>
|
||||
<ul>
|
||||
|
||||
<li><a href="#inputs_to_writeproperty">Inputs to WriteProperty</a></li>
|
||||
<li><a href="#outputs_from_writeproperty">Outputs from WriteProperty</a></li>
|
||||
<li><a href="#example_of_writeproperty">Example of WriteProperty</a></li>
|
||||
</ul>
|
||||
<li><a href="#inputs_to_writeproperty">Inputs to WriteProperty</a></li>
|
||||
<li><a href="#outputs_from_writeproperty">Outputs from WriteProperty</a></li>
|
||||
<li><a href="#example_of_writeproperty">Example of WriteProperty</a></li>
|
||||
</ul>
|
||||
|
||||
<li><a href="#timesync">TimeSync</a></li>
|
||||
<ul>
|
||||
<li><a href="#timesync">TimeSync</a></li>
|
||||
<ul>
|
||||
|
||||
<li><a href="#inputs_to_timesync">Inputs to TimeSync</a></li>
|
||||
<li><a href="#outputs_from_timesync">Outputs from TimeSync</a></li>
|
||||
<li><a href="#example_of_timesync">Example of TimeSync</a></li>
|
||||
</ul>
|
||||
<li><a href="#inputs_to_timesync">Inputs to TimeSync</a></li>
|
||||
<li><a href="#outputs_from_timesync">Outputs from TimeSync</a></li>
|
||||
<li><a href="#example_of_timesync">Example of TimeSync</a></li>
|
||||
</ul>
|
||||
|
||||
<li><a href="#log">Log</a></li>
|
||||
<ul>
|
||||
<li><a href="#log">Log</a></li>
|
||||
<ul>
|
||||
|
||||
<li><a href="#inputs_to_log">Inputs to Log</a></li>
|
||||
<li><a href="#example_of_log">Example of Log</a></li>
|
||||
</ul>
|
||||
<li><a href="#inputs_to_log">Inputs to Log</a></li>
|
||||
<li><a href="#example_of_log">Example of Log</a></li>
|
||||
</ul>
|
||||
|
||||
<li><a href="#silencelog">SilenceLog</a></li>
|
||||
<ul>
|
||||
<li><a href="#silencelog">SilenceLog</a></li>
|
||||
<ul>
|
||||
|
||||
<li><a href="#inputs_to_silencelog">Inputs to SilenceLog</a></li>
|
||||
<li><a href="#outputs_from_silencelog">Outputs from SilenceLog</a></li>
|
||||
<li><a href="#example_of_silencelog">Example of SilenceLog</a></li>
|
||||
</ul>
|
||||
<li><a href="#inputs_to_silencelog">Inputs to SilenceLog</a></li>
|
||||
<li><a href="#outputs_from_silencelog">Outputs from SilenceLog</a></li>
|
||||
<li><a href="#example_of_silencelog">Example of SilenceLog</a></li>
|
||||
</ul>
|
||||
|
||||
<li><a href="#retry">Retry</a></li>
|
||||
<ul>
|
||||
<li><a href="#retry">Retry</a></li>
|
||||
<ul>
|
||||
|
||||
<li><a href="#inputs_to_retry">Inputs to Retry</a></li>
|
||||
<li><a href="#outputs_from_retry">Outputs from Retry</a></li>
|
||||
<li><a href="#example_of_retry">Example of Retry</a></li>
|
||||
</ul>
|
||||
<li><a href="#inputs_to_retry">Inputs to Retry</a></li>
|
||||
<li><a href="#outputs_from_retry">Outputs from Retry</a></li>
|
||||
<li><a href="#example_of_retry">Example of Retry</a></li>
|
||||
</ul>
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
</ul>
|
||||
|
||||
@@ -257,7 +257,7 @@ mechanisms. NOTE: all enumerations are defined in <em class="file">bacenum.h</em
|
||||
<p>This function prints out to the desired method of logging (STDOUT or file).
|
||||
NewLine characters are not required when making calls to this function. If any
|
||||
NewLine characters are specified, they will be stripped out. To print an empty
|
||||
line, pass in a space as the message. NOTE: This function will honor previous
|
||||
line, pass in a space as the message. NOTE: This function will honor previous
|
||||
requests to silence the log (see SilcenseLog for details)</p>
|
||||
<p>
|
||||
</p>
|
||||
|
||||
@@ -39,37 +39,37 @@ ul {
|
||||
}
|
||||
.quotedString
|
||||
{
|
||||
color: #0000FF;
|
||||
color: #0000FF;
|
||||
}
|
||||
.comment
|
||||
{
|
||||
color: #999999;
|
||||
color: #999999;
|
||||
}
|
||||
.operator
|
||||
{
|
||||
color: #00CCCC;
|
||||
color: #00CCCC;
|
||||
}
|
||||
.builtinVariable
|
||||
{
|
||||
color: #CCCC00;
|
||||
color: #CCCC00;
|
||||
}
|
||||
.variableSpecifier
|
||||
{
|
||||
color: #FF0000;
|
||||
color: #FF0000;
|
||||
}
|
||||
.keyword
|
||||
{
|
||||
color: #AA0033;
|
||||
color: #AA0033;
|
||||
}
|
||||
.builtinFunction
|
||||
{
|
||||
color: #AA00AA;
|
||||
color: #AA00AA;
|
||||
}
|
||||
.identifier
|
||||
{
|
||||
color: #009900;
|
||||
color: #009900;
|
||||
}
|
||||
.number
|
||||
{
|
||||
color: #9999FF;
|
||||
color: #9999FF;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ function emulateHTMLModel()
|
||||
|
||||
// This function is used to generate a html string for the text properties/methods
|
||||
// It replaces '\n' with "<BR"> as well as fixes consecutive white spaces
|
||||
// It also repalaces some special characters
|
||||
// It also repalaces some special characters
|
||||
function convertTextToHTML(s) {
|
||||
s = s.replace(/\&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/\n/g, "<BR>").replace(/\t/g, " "); //tachyon
|
||||
while (/\s\s/.test(s))
|
||||
@@ -17,7 +17,7 @@ function convertTextToHTML(s) {
|
||||
|
||||
HTMLElement.prototype.__defineSetter__("innerText", function (sText) {
|
||||
this.innerHTML = convertTextToHTML(sText);
|
||||
return sText;
|
||||
return sText;
|
||||
});
|
||||
|
||||
var tmpGet;
|
||||
@@ -29,7 +29,7 @@ HTMLElement.prototype.__defineGetter__("innerText", tmpGet = function () {
|
||||
|
||||
}
|
||||
|
||||
if (moz)
|
||||
if (moz)
|
||||
emulateHTMLModel();
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ RE[0] = new RegExp(re);
|
||||
// comment
|
||||
re = /\#.*?([\r\n]+|$)/; //tachyon
|
||||
RE[1] = new RegExp(re);
|
||||
|
||||
|
||||
// operator
|
||||
re = /xor|\.\.\.|and|not|\|\|\=|cmp|\>\>\=|\<\<\=|\<\=\>|\&\&\=|or|\=\>|\!\~|\^\=|\&\=|\|\=|\.\=|x\=|\%\=|\/\=|\*\=|\-\=|\+\=|\=\~|\*\*|\-\-|\.\.|\|\||\&\&|\+\+|\-\>|ne|eq|\!\=|\=\=|ge|le|gt|lt|\>\=|\<\=|\>\>|\<\<|\,|\=|\:|\?|\^|\||x|\%|\/|\*|\<|\&|\\|\~|\!|\>|\.|\-|\+ /;
|
||||
RE[2] = new RegExp(re);
|
||||
@@ -86,46 +86,46 @@ var classes = new Array("quotedString", "comment", "operator", "builtinVariable
|
||||
*/
|
||||
function HighlightCode(object)
|
||||
{
|
||||
codeText = object.innerText; //HTML.replace(/<.*?>/g, "");
|
||||
object.innerHTML = '';
|
||||
var left;
|
||||
var match;
|
||||
var right;
|
||||
while (codeText.length > 0)
|
||||
{
|
||||
var mode = -1 ;
|
||||
var index = 999999999;
|
||||
for (var i = 0; i < RE.length; i++)
|
||||
{
|
||||
if ((codeText.match(RE[i])) && (RegExp.leftContext.length < index))
|
||||
{
|
||||
left = RegExp.leftContext;
|
||||
match = RegExp.lastMatch;
|
||||
right = RegExp.rightContext;
|
||||
index = RegExp.leftContext.length;
|
||||
mode = i;
|
||||
}
|
||||
}
|
||||
if (mode == -1)
|
||||
{
|
||||
object.appendChild(document.createTextNode(codeText)); //.replace(/\r\n/g, "\r")));
|
||||
codeText = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
// append the plain text to the <code> block
|
||||
object.appendChild(document.createTextNode(left)); //.replace(/\r\n/g, "\r")));
|
||||
codeText = object.innerText; //HTML.replace(/<.*?>/g, "");
|
||||
object.innerHTML = '';
|
||||
var left;
|
||||
var match;
|
||||
var right;
|
||||
while (codeText.length > 0)
|
||||
{
|
||||
var mode = -1 ;
|
||||
var index = 999999999;
|
||||
for (var i = 0; i < RE.length; i++)
|
||||
{
|
||||
if ((codeText.match(RE[i])) && (RegExp.leftContext.length < index))
|
||||
{
|
||||
left = RegExp.leftContext;
|
||||
match = RegExp.lastMatch;
|
||||
right = RegExp.rightContext;
|
||||
index = RegExp.leftContext.length;
|
||||
mode = i;
|
||||
}
|
||||
}
|
||||
if (mode == -1)
|
||||
{
|
||||
object.appendChild(document.createTextNode(codeText)); //.replace(/\r\n/g, "\r")));
|
||||
codeText = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
// append the plain text to the <code> block
|
||||
object.appendChild(document.createTextNode(left)); //.replace(/\r\n/g, "\r")));
|
||||
|
||||
// create a new <span> with the current code
|
||||
var span = document.createElement("span");
|
||||
span.setAttribute("className", classes[mode]); // ie
|
||||
span.setAttribute("class", classes[mode]); //mozilla
|
||||
span.appendChild(document.createTextNode(match));
|
||||
object.appendChild(span);
|
||||
// create a new <span> with the current code
|
||||
var span = document.createElement("span");
|
||||
span.setAttribute("className", classes[mode]); // ie
|
||||
span.setAttribute("class", classes[mode]); //mozilla
|
||||
span.appendChild(document.createTextNode(match));
|
||||
object.appendChild(span);
|
||||
|
||||
codeText = right;
|
||||
}
|
||||
}
|
||||
codeText = right;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// little bit of JQuery to highlight code in all pre elements
|
||||
@@ -134,4 +134,3 @@ $(document).ready(function(){
|
||||
HighlightCode(this);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
+15
-16
@@ -12,7 +12,7 @@ use Carp;
|
||||
|
||||
=head1 NAME
|
||||
|
||||
bacnet.pl - Scriptable BACnet communications
|
||||
bacnet.pl - Scriptable BACnet communications
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
@@ -33,7 +33,7 @@ Perl documentation, see http://perldoc.perl.org
|
||||
Usage: bacnet.pl [program_options] [-- script_args]
|
||||
|
||||
This program executes a script in perl syntax to perform BACnet/IP operations.
|
||||
|
||||
|
||||
Possible program options:
|
||||
--script=s The script to execute.
|
||||
--log=s The file to log all output.
|
||||
@@ -116,7 +116,7 @@ BEGIN {
|
||||
}
|
||||
|
||||
use Inline (
|
||||
C => Config =>
|
||||
C => Config =>
|
||||
LIBS => "-L$libDir -lbacnet -liphlpapi",
|
||||
INC => ["-I$incDir1", "-I$incDir2", "-I$incDir3"],
|
||||
DIRECTORY => $inlineBuildDir,
|
||||
@@ -141,7 +141,7 @@ my $answer = '';
|
||||
'help|?' => \$ask_help,
|
||||
'script=s' => \$script,
|
||||
'log=s' => \$log,
|
||||
);
|
||||
);
|
||||
|
||||
if (!defined($script) || !(-f $script))
|
||||
{
|
||||
@@ -150,7 +150,7 @@ if (!defined($script) || !(-f $script))
|
||||
}
|
||||
else
|
||||
{
|
||||
# Add the script's location to @INC so that they can include other scripts
|
||||
# Add the script's location to @INC so that they can include other scripts
|
||||
# using relative paths
|
||||
my $scriptdir = File::Spec->rel2abs(dirname($script));
|
||||
push @INC,$scriptdir;
|
||||
@@ -308,7 +308,7 @@ sub ReadProperty {
|
||||
=head2 ReadPropertyMultiple
|
||||
|
||||
This function implements the ReadPropertyMultiple service. There are no built in retry
|
||||
mechanisms. NOTE: all enumerations are defined in F<bacenum.h>
|
||||
mechanisms. NOTE: all enumerations are defined in F<bacenum.h>
|
||||
|
||||
=head3 Inputs to ReadPropertyMultiple
|
||||
|
||||
@@ -414,7 +414,7 @@ sub ReadPropertyMultiple
|
||||
=head2 WriteProperty
|
||||
|
||||
This function implements the WriteProperty service. There are no built in retry
|
||||
mechanisms. NOTE: all enumerations are defined in F<bacenum.h>
|
||||
mechanisms. NOTE: all enumerations are defined in F<bacenum.h>
|
||||
|
||||
=head3 Inputs to WriteProperty
|
||||
|
||||
@@ -494,7 +494,7 @@ sub WriteProperty {
|
||||
}
|
||||
else
|
||||
{
|
||||
# a priority of 0 means we are not writing to a priority array
|
||||
# a priority of 0 means we are not writing to a priority array
|
||||
$priority = 0;
|
||||
}
|
||||
$msg .= " in Device" . '[' . $deviceInstance . "] ==> ";
|
||||
@@ -553,7 +553,7 @@ This function implements the TimeSync and UTCTimeSync services
|
||||
|
||||
=cut
|
||||
|
||||
sub TimeSync
|
||||
sub TimeSync
|
||||
{
|
||||
my $deviceInstanceNumber = shift;
|
||||
my $year = shift;
|
||||
@@ -574,7 +574,7 @@ sub TimeSync
|
||||
|
||||
# be a pessimist. Assume things will fail
|
||||
$isFailure = 1;
|
||||
|
||||
|
||||
if (defined($utcOffset))
|
||||
{
|
||||
$isUTC = 1;
|
||||
@@ -586,7 +586,7 @@ sub TimeSync
|
||||
$utcOffset = 0;
|
||||
$isUTC = 0;
|
||||
}
|
||||
|
||||
|
||||
if ($year < 1900 || $year > 2099)
|
||||
{
|
||||
Log("Year '$year' is invalid.");
|
||||
@@ -610,7 +610,7 @@ sub TimeSync
|
||||
Log("Hour '$hour' is invalid.");
|
||||
last;
|
||||
}
|
||||
|
||||
|
||||
if ($minute < 0 || $minute > 59)
|
||||
{
|
||||
Log("Minute '$minute' is invalid.");
|
||||
@@ -629,7 +629,7 @@ sub TimeSync
|
||||
last;
|
||||
}
|
||||
|
||||
return $isFailure;
|
||||
return $isFailure;
|
||||
}
|
||||
|
||||
=head2 Log
|
||||
@@ -637,7 +637,7 @@ sub TimeSync
|
||||
This function prints out to the desired method of logging (STDOUT or file).
|
||||
NewLine characters are not required when making calls to this function. If any
|
||||
NewLine characters are specified, they will be stripped out. To print an empty
|
||||
line, pass in a space as the message. NOTE: This function will honor previous
|
||||
line, pass in a space as the message. NOTE: This function will honor previous
|
||||
requests to silence the log (see SilcenseLog for details)
|
||||
|
||||
=head3 Inputs to Log
|
||||
@@ -671,7 +671,7 @@ sub Log {
|
||||
|
||||
# if there is nothing to print, then don't do it
|
||||
return if (scalar(@last) == 0);
|
||||
|
||||
|
||||
# if there are newline-like characters, get rid of them.
|
||||
while ($msg =~/^(.*)[\r\n]+(.*)$/)
|
||||
{
|
||||
@@ -866,4 +866,3 @@ sub LogAnswer {
|
||||
$answer = '' unless $append;
|
||||
$answer .= $newAnswer;
|
||||
}
|
||||
|
||||
|
||||
@@ -884,7 +884,7 @@ int BacnetTimeSync(int deviceInstanceNumber,
|
||||
&Target_Address, &npdu_data, &Handler_Transmit_Buffer[0], pdu_len);
|
||||
if (bytes_sent <= 0) {
|
||||
char msg[64];
|
||||
snprintf(msg, sizeof(msg),
|
||||
snprintf(msg, sizeof(msg),
|
||||
"Failed to Send Time-Synchronization Request (%s)!",
|
||||
strerror(errno));
|
||||
LogError(msg);
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
The BACnet Scriptable (using Perl) Tool.
|
||||
|
||||
* Running this tool assumes that the library has been already built. The
|
||||
* Running this tool assumes that the library has been already built. The
|
||||
library should be built with a command similar to
|
||||
|
||||
|
||||
CC=/mingw/bin/gcc BACNET_DEFINES="-DPRINT_ENABLED -DBACAPP_ALL -DBACFILE
|
||||
-DINTRINSIC_REPORTING" BBMD_DEFINE=-DBBMD_ENABLED\=1 BACNET_PORT=win32 make
|
||||
clean library
|
||||
|
||||
* Currently, the tool assumes only win32 port, but should be easily modifiable
|
||||
for any port build.
|
||||
for any port build.
|
||||
* This tool has to be run from a path without any spaces. The presence of the
|
||||
.Inline directory is required.
|
||||
* Run the tool without any arguments to see usage instructions
|
||||
@@ -16,5 +16,3 @@ The BACnet Scriptable (using Perl) Tool.
|
||||
Value) for Device at instance 1234 run the following command
|
||||
|
||||
perl bacnet.pl --script example_readprop.pl -- 1234
|
||||
|
||||
|
||||
|
||||
@@ -56,4 +56,3 @@ clean:
|
||||
|
||||
.PHONY: include
|
||||
include: .depend
|
||||
|
||||
|
||||
@@ -17,4 +17,3 @@ fi
|
||||
|
||||
make -C libmcp23s17
|
||||
make -C libpifacedigital
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @file
|
||||
/**
|
||||
* @file
|
||||
* @brief Base "class" for handling all BACnet objects belonging
|
||||
* to a BACnet device, as well as Device-specific properties.
|
||||
* @author Steve Karg <skarg@users.sourceforge.net>
|
||||
|
||||
@@ -6,5 +6,3 @@ To build, start with the configure script:
|
||||
|
||||
$ ./configure.sh
|
||||
$ make clean all
|
||||
|
||||
|
||||
|
||||
@@ -37,4 +37,3 @@ clean:
|
||||
|
||||
.PHONY: include
|
||||
include: .depend
|
||||
|
||||
|
||||
@@ -37,4 +37,3 @@ clean:
|
||||
|
||||
.PHONY: include
|
||||
include: .depend
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* @file
|
||||
* @brief command line tool that sends a BACnet BVLC message, and displays
|
||||
* @brief command line tool that sends a BACnet BVLC message, and displays
|
||||
* the reply, for a Read-Broadcast-Distribution-Table message to a peer BBMD.
|
||||
* @author Steve Karg <skarg@users.sourceforge.net>
|
||||
* @date 2012
|
||||
|
||||
@@ -37,4 +37,3 @@ clean:
|
||||
|
||||
.PHONY: include
|
||||
include: .depend
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* @file
|
||||
* @brief command line tool that sends a BACnet BVLC message, and displays
|
||||
* @brief command line tool that sends a BACnet BVLC message, and displays
|
||||
* the reply, for a Read-Foreign-Device-Table message to a peer BBMD.
|
||||
* @author Steve Karg <skarg@users.sourceforge.net>
|
||||
* @date 2012
|
||||
|
||||
@@ -37,4 +37,3 @@ clean:
|
||||
|
||||
.PHONY: include
|
||||
include: .depend
|
||||
|
||||
|
||||
@@ -37,4 +37,3 @@ clean:
|
||||
|
||||
.PHONY: include
|
||||
include: .depend
|
||||
|
||||
|
||||
@@ -37,4 +37,3 @@ clean:
|
||||
|
||||
.PHONY: include
|
||||
include: .depend
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @file
|
||||
* @brief command line tool that uses BACnet ReadPropertyMultiple service
|
||||
* message to read object property values from another device on
|
||||
* @brief command line tool that uses BACnet ReadPropertyMultiple service
|
||||
* message to read object property values from another device on
|
||||
* the network and prints the values to the console.
|
||||
* @author Steve Karg <skarg@users.sourceforge.net>
|
||||
* @date 2008
|
||||
|
||||
@@ -37,4 +37,3 @@ clean:
|
||||
|
||||
.PHONY: include
|
||||
include: .depend
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @file
|
||||
* @brief command line tool that uses BACnet ReadRange service
|
||||
* message to read device object BACnetList or BACnetARRAY property values
|
||||
* @brief command line tool that uses BACnet ReadRange service
|
||||
* message to read device object BACnetList or BACnetARRAY property values
|
||||
* from another device on the network and prints the values to the console.
|
||||
* @author Steve Karg <skarg@users.sourceforge.net>
|
||||
* @date 2006
|
||||
|
||||
@@ -37,4 +37,3 @@ clean:
|
||||
|
||||
.PHONY: include
|
||||
include: .depend
|
||||
|
||||
|
||||
@@ -565,7 +565,7 @@ static void send_who_is_router_to_network(uint16_t snet, uint16_t dnet)
|
||||
* @param src [in] The routing source information, if any.
|
||||
* If src->net and src->len are 0, there is no routing source information.
|
||||
* @param npdu_data [in] Contains a filled-out structure with information
|
||||
* decoded from the NCPI and other NPDU bytes.
|
||||
* decoded from the NCPI and other NPDU bytes.
|
||||
* @param npdu [in] Buffer containing the rest of the NPDU, following the
|
||||
* bytes that have already been decoded.
|
||||
* @param npdu_len [in] The length of the remaining NPDU message in npdu[].
|
||||
@@ -618,7 +618,7 @@ static void who_is_router_to_network_handler(uint16_t snet,
|
||||
* @param src [in] The routing source information, if any.
|
||||
* If src->net and src->len are 0, there is no routing source information.
|
||||
* @param npdu_data [in] Contains a filled-out structure with information
|
||||
* decoded from the NCPI and other NPDU bytes.
|
||||
* decoded from the NCPI and other NPDU bytes.
|
||||
* @param npdu [in] Buffer containing the rest of the NPDU, following the
|
||||
* bytes that have already been decoded.
|
||||
* @param npdu_len [in] The length of the remaining NPDU message in npdu[].
|
||||
@@ -899,7 +899,7 @@ static void routed_apdu_handler(uint16_t snet,
|
||||
while (port != NULL) {
|
||||
if (port->net != snet) {
|
||||
datalink_send_pdu(port->net, dest, npdu, &Tx_Buffer[0],
|
||||
npdu_len + apdu_len);
|
||||
npdu_len + apdu_len);
|
||||
}
|
||||
port = port->next;
|
||||
}
|
||||
@@ -979,7 +979,7 @@ static void my_routing_npdu_handler(
|
||||
}
|
||||
} else {
|
||||
fprintf(
|
||||
stderr, "NPDU: unsupported protocol version %u. Discarded!\n",
|
||||
stderr, "NPDU: unsupported protocol version %u. Discarded!\n",
|
||||
protocol_version);
|
||||
}
|
||||
|
||||
@@ -1118,7 +1118,7 @@ static void control_c_hooks(void)
|
||||
* @note This is a proxy function to satisfy the BACnet Stack IPv6 port layer
|
||||
* requirements since this application omits a Device object.
|
||||
*/
|
||||
uint32_t Device_Object_Instance_Number(void)
|
||||
uint32_t Device_Object_Instance_Number(void)
|
||||
{
|
||||
return Device_Instance_Number;
|
||||
}
|
||||
|
||||
@@ -586,7 +586,7 @@ static void send_who_is_router_to_network(uint16_t snet, uint16_t dnet)
|
||||
* @param src [in] The routing source information, if any.
|
||||
* If src->net and src->len are 0, there is no routing source information.
|
||||
* @param npdu_data [in] Contains a filled-out structure with information
|
||||
* decoded from the NCPI and other NPDU bytes.
|
||||
* decoded from the NCPI and other NPDU bytes.
|
||||
* @param npdu [in] Buffer containing the rest of the NPDU, following the
|
||||
* bytes that have already been decoded.
|
||||
* @param npdu_len [in] The length of the remaining NPDU message in npdu[].
|
||||
@@ -639,7 +639,7 @@ static void who_is_router_to_network_handler(uint16_t snet,
|
||||
* @param src [in] The routing source information, if any.
|
||||
* If src->net and src->len are 0, there is no routing source information.
|
||||
* @param npdu_data [in] Contains a filled-out structure with information
|
||||
* decoded from the NCPI and other NPDU bytes.
|
||||
* decoded from the NCPI and other NPDU bytes.
|
||||
* @param npdu [in] Buffer containing the rest of the NPDU, following the
|
||||
* bytes that have already been decoded.
|
||||
* @param npdu_len [in] The length of the remaining NPDU message in npdu[].
|
||||
@@ -922,7 +922,7 @@ static void routed_apdu_handler(uint16_t snet,
|
||||
while (port != NULL) {
|
||||
if (port->net != snet) {
|
||||
datalink_send_pdu(port->net, dest, npdu, &Tx_Buffer[0],
|
||||
npdu_len + apdu_len);
|
||||
npdu_len + apdu_len);
|
||||
}
|
||||
port = port->next;
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ SRCS = main.c \
|
||||
msgqueue.c \
|
||||
network_layer.c
|
||||
|
||||
# note: router does not use common libbacnet.a library,
|
||||
# note: router does not use common libbacnet.a library,
|
||||
# so use CFLAGS without common app defines or includes
|
||||
CFLAGS = -I${SOURCE_DIR} -I${BACNET_PORT_DIR}
|
||||
CFLAGS += -DBACNET_STACK_DEPRECATED_DISABLE
|
||||
|
||||
+52
-52
@@ -2,67 +2,67 @@
|
||||
configuration file that stores values for router ports initialization
|
||||
|
||||
Common arguments:
|
||||
device_type - "bip" or "mstp" (with quotes)
|
||||
device - Connection device, for example "eth0" or "/dev/ttyS0"
|
||||
network - Network number [1..65534]. Do not use network number 65535, it is broadcast number
|
||||
device_type - "bip" or "mstp" (with quotes)
|
||||
device - Connection device, for example "eth0" or "/dev/ttyS0"
|
||||
network - Network number [1..65534]. Do not use network number 65535, it is broadcast number
|
||||
|
||||
bip arguments:
|
||||
port - bip UDP port, default 47808
|
||||
port - bip UDP port, default 47808
|
||||
|
||||
mstp arguments:
|
||||
mac - MSTP MAC
|
||||
max_master - MSTP max master
|
||||
max_frames - 1
|
||||
baud - one from the list: 0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400
|
||||
parity - one from the list (with quotes): "None", "Even", "Odd"
|
||||
databits - one from the list: 5, 6, 7, 8
|
||||
stopbits - 1 or 2
|
||||
mac - MSTP MAC
|
||||
max_master - MSTP max master
|
||||
max_frames - 1
|
||||
baud - one from the list: 0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400
|
||||
parity - one from the list (with quotes): "None", "Even", "Odd"
|
||||
databits - one from the list: 5, 6, 7, 8
|
||||
stopbits - 1 or 2
|
||||
|
||||
|
||||
Example:
|
||||
ports =
|
||||
(
|
||||
{
|
||||
device_type = "bip";
|
||||
device = "eth0";
|
||||
port = 47808;
|
||||
network = 1;
|
||||
},
|
||||
ports =
|
||||
(
|
||||
{
|
||||
device_type = "bip";
|
||||
device = "eth0";
|
||||
port = 47808;
|
||||
network = 1;
|
||||
},
|
||||
|
||||
{
|
||||
device_type = "mstp";
|
||||
device = "/dev/ttyS0";
|
||||
mac = 1;
|
||||
max_master = 127;
|
||||
max_frames = 1;
|
||||
baud = 38400;
|
||||
parity = "None";
|
||||
databits = 8;
|
||||
stopbits = 1;
|
||||
network = 2;
|
||||
}
|
||||
);
|
||||
{
|
||||
device_type = "mstp";
|
||||
device = "/dev/ttyS0";
|
||||
mac = 1;
|
||||
max_master = 127;
|
||||
max_frames = 1;
|
||||
baud = 38400;
|
||||
parity = "None";
|
||||
databits = 8;
|
||||
stopbits = 1;
|
||||
network = 2;
|
||||
}
|
||||
);
|
||||
*/
|
||||
|
||||
ports =
|
||||
(
|
||||
{
|
||||
device_type = "bip";
|
||||
device = "eth0";
|
||||
port = 47808;
|
||||
network = 1;
|
||||
},
|
||||
ports =
|
||||
(
|
||||
{
|
||||
device_type = "bip";
|
||||
device = "eth0";
|
||||
port = 47808;
|
||||
network = 1;
|
||||
},
|
||||
|
||||
{
|
||||
device_type = "mstp";
|
||||
device = "/dev/ttyS0";
|
||||
mac = 2;
|
||||
max_master = 127;
|
||||
max_frames = 1;
|
||||
baud = 38400;
|
||||
parity = "None";
|
||||
databits = 8;
|
||||
stopbits = 1;
|
||||
network = 2;
|
||||
}
|
||||
{
|
||||
device_type = "mstp";
|
||||
device = "/dev/ttyS0";
|
||||
mac = 2;
|
||||
max_master = 127;
|
||||
max_frames = 1;
|
||||
baud = 38400;
|
||||
parity = "None";
|
||||
databits = 8;
|
||||
stopbits = 1;
|
||||
network = 2;
|
||||
}
|
||||
);
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
#include "portthread.h"
|
||||
#include "bacnet/datalink/bip.h"
|
||||
|
||||
#define MAX_BIP_APDU 1476
|
||||
#define MAX_BIP_PDU (MAX_NPDU + MAX_BIP_APDU)
|
||||
#define MAX_BIP_MPDU (BIP_HEADER_MAX + MAX_BIP_PDU)
|
||||
#define MAX_BIP_APDU 1476
|
||||
#define MAX_BIP_PDU (MAX_NPDU + MAX_BIP_APDU)
|
||||
#define MAX_BIP_MPDU (BIP_HEADER_MAX + MAX_BIP_PDU)
|
||||
/* Yes, we know this is longer than an Ethernet Frame,
|
||||
a UDP payload and an IPv6 packet.
|
||||
Grandfathered in from BACnet Ethernet days,
|
||||
|
||||
+66
-69
@@ -17,7 +17,7 @@ SPDX-License-Identifier: MIT
|
||||
3. Build
|
||||
-----------------------
|
||||
|
||||
1. Download, build and install libconfig C/C++ Configuration File Library
|
||||
1. Download, build and install libconfig C/C++ Configuration File Library
|
||||
from http://www.hyperrealm.com/libconfig or use APT to install
|
||||
sudo apt-get install libconfig-dev
|
||||
2. Run "make clean all" from library root directory
|
||||
@@ -32,101 +32,98 @@ SPDX-License-Identifier: MIT
|
||||
//single line comment
|
||||
|
||||
/*
|
||||
multiline comment
|
||||
multiline comment
|
||||
*/
|
||||
|
||||
ports =
|
||||
(
|
||||
//route_1
|
||||
{
|
||||
device_type = "<value>";
|
||||
//route specific arguments, see below
|
||||
},
|
||||
//route_1
|
||||
{
|
||||
device_type = "<value>";
|
||||
//route specific arguments, see below
|
||||
},
|
||||
|
||||
//route_2
|
||||
{
|
||||
device_type = "<value>";
|
||||
//route specific arguments, see below
|
||||
},
|
||||
//route_2
|
||||
{
|
||||
device_type = "<value>";
|
||||
//route specific arguments, see below
|
||||
},
|
||||
|
||||
//.....
|
||||
//.....
|
||||
|
||||
//route_n
|
||||
{
|
||||
device_type = "<value>";
|
||||
//route specific arguments, see below
|
||||
}
|
||||
//route_n
|
||||
{
|
||||
device_type = "<value>";
|
||||
//route specific arguments, see below
|
||||
}
|
||||
);
|
||||
|
||||
Note: - arguments are separeted with ';'
|
||||
- routes are separeted with ','
|
||||
- no ',' after the last route
|
||||
Note: - arguments are separeted with ';'
|
||||
- routes are separeted with ','
|
||||
- no ',' after the last route
|
||||
|
||||
4.2. Configuration file arguments.
|
||||
|
||||
Common arguments:
|
||||
device_type - Describes a type of route, may be "bip" (Etherent) or "mstp" (Serial port). Use quotes.
|
||||
device - Connection device, for example "eth0" or "/dev/ttyS0"; default values: for BIP:"eth0", for MSTP: "/dev/ttyS0". Use quotes.
|
||||
network - Network number [1..65534]. Do not use network number 65535, it is broadcast number; default begins from 1 to routes count.
|
||||
device_type - Describes a type of route, may be "bip" (Etherent) or "mstp" (Serial port). Use quotes.
|
||||
device - Connection device, for example "eth0" or "/dev/ttyS0"; default values: for BIP:"eth0", for MSTP: "/dev/ttyS0". Use quotes.
|
||||
network - Network number [1..65534]. Do not use network number 65535, it is broadcast number; default begins from 1 to routes count.
|
||||
|
||||
bip arguments:
|
||||
port - bip UDP port; default port is 47808 (0xBAC0).
|
||||
port - bip UDP port; default port is 47808 (0xBAC0).
|
||||
|
||||
mstp arguments:
|
||||
mac - MSTP MAC; default value is 127.
|
||||
max_master - MSTP max master; default value is 127.
|
||||
max_frames - 1. Segmentation does not supported.
|
||||
baud - one from the list: 0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400; default baud is 9600
|
||||
parity - one from the list (with quotes): "None", "Even", "Odd"; default parity "None". Use quotes.
|
||||
databits - one from the list: 5, 6, 7, 8; default 8.
|
||||
stopbits - 1 or 2; default 1.
|
||||
mac - MSTP MAC; default value is 127.
|
||||
max_master - MSTP max master; default value is 127.
|
||||
max_frames - 1. Segmentation does not supported.
|
||||
baud - one from the list: 0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400; default baud is 9600
|
||||
parity - one from the list (with quotes): "None", "Even", "Odd"; default parity "None". Use quotes.
|
||||
databits - one from the list: 5, 6, 7, 8; default 8.
|
||||
stopbits - 1 or 2; default 1.
|
||||
|
||||
4.3. Example of configuration file.
|
||||
|
||||
ports =
|
||||
(
|
||||
{
|
||||
device_type = "bip";
|
||||
device = "eth0";
|
||||
port = 47808;
|
||||
network = 1;
|
||||
},
|
||||
{
|
||||
device_type = "bip";
|
||||
device = "eth1";
|
||||
port = 47808;
|
||||
network = 2;
|
||||
},
|
||||
{
|
||||
device_type = "bip";
|
||||
device = "eth1";
|
||||
port = 47809;
|
||||
network = 3;
|
||||
},
|
||||
{
|
||||
device_type = "mstp";
|
||||
device = "/dev/ttyS0";
|
||||
mac = 1;
|
||||
max_master = 127;
|
||||
max_frames = 1;
|
||||
baud = 38400;
|
||||
parity = "None";
|
||||
databits = 8;
|
||||
stopbits = 1;
|
||||
network = 4;
|
||||
}
|
||||
);
|
||||
ports =
|
||||
(
|
||||
{
|
||||
device_type = "bip";
|
||||
device = "eth0";
|
||||
port = 47808;
|
||||
network = 1;
|
||||
},
|
||||
{
|
||||
device_type = "bip";
|
||||
device = "eth1";
|
||||
port = 47808;
|
||||
network = 2;
|
||||
},
|
||||
{
|
||||
device_type = "bip";
|
||||
device = "eth1";
|
||||
port = 47809;
|
||||
network = 3;
|
||||
},
|
||||
{
|
||||
device_type = "mstp";
|
||||
device = "/dev/ttyS0";
|
||||
mac = 1;
|
||||
max_master = 127;
|
||||
max_frames = 1;
|
||||
baud = 38400;
|
||||
parity = "None";
|
||||
databits = 8;
|
||||
stopbits = 1;
|
||||
network = 4;
|
||||
}
|
||||
);
|
||||
|
||||
-----------------------
|
||||
5. Start
|
||||
-----------------------
|
||||
|
||||
5.1. With configuration file
|
||||
5.1. With configuration file
|
||||
1. Copy configuration file in the router executable directory
|
||||
2. Start the router with "sudo ./router -c init.cfg" command in terminal
|
||||
|
||||
5.2. Passing params in command line
|
||||
1. sudo ./router -D "mstp" "/dev/ttyS0" --mac 1 127 1 --baud 38400 --network 4 -D "bip" "eth0" --network 1
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -37,4 +37,3 @@ clean:
|
||||
|
||||
.PHONY: include
|
||||
include: .depend
|
||||
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* @file
|
||||
* @brief command line tool that uses BACnet SubscribeCOV service
|
||||
* @brief command line tool that uses BACnet SubscribeCOV service
|
||||
* message to subscribe to a BACnet object for Change-of-Value notifications
|
||||
* in a BACnet device and print the Change-of-Value notifications values
|
||||
* in a BACnet device and print the Change-of-Value notifications values
|
||||
* to the console.
|
||||
* @author Steve Karg <skarg@users.sourceforge.net>
|
||||
* @date 2006
|
||||
|
||||
@@ -42,4 +42,3 @@ clean:
|
||||
|
||||
.PHONY: include
|
||||
include: .depend
|
||||
|
||||
|
||||
@@ -42,4 +42,3 @@ clean:
|
||||
|
||||
.PHONY: include
|
||||
include: .depend
|
||||
|
||||
|
||||
@@ -75,4 +75,3 @@ clean:
|
||||
|
||||
.PHONY: include
|
||||
include: .depend
|
||||
|
||||
|
||||
@@ -36,19 +36,19 @@ BIBBs Supported:
|
||||
-- SCHED-A SCHED-I-B SCHED-E-B
|
||||
-- T-VMT-A T-VMT-I-B T-VMT-E-B
|
||||
-- T-ATR-A T-ATR-B
|
||||
-- DM-DDB-A
|
||||
-- DM-DDB-A
|
||||
DM-DDB-B
|
||||
-- DM-DOB-A
|
||||
-- DM-DOB-A
|
||||
DM-DOB-B
|
||||
-- DM-DCC-A
|
||||
-- DM-DCC-A
|
||||
DM-DCC-B
|
||||
-- DM-PT-A DM-PT-B
|
||||
-- DM-TM-A DM-TM-B
|
||||
-- DM-TS-A
|
||||
-- DM-TS-A
|
||||
DM-TS-B
|
||||
-- DM-UTC-A
|
||||
-- DM-UTC-A
|
||||
DM-UTC-B
|
||||
-- DM-RD-A
|
||||
-- DM-RD-A
|
||||
DM-RD-B
|
||||
-- DM-BR-A DM-BR-B
|
||||
-- DM-R-A DM-R-B
|
||||
@@ -140,7 +140,7 @@ Data Link Layer Option:
|
||||
-- ISO 8802-3, 10BASET
|
||||
-- ISO 8802-3, Fiber
|
||||
-- ARCNET, coax star
|
||||
-- ARCNET, coax bus
|
||||
-- ARCNET, coax bus
|
||||
-- ARCNET, twisted pair star
|
||||
-- ARCNET, twisted pair bus
|
||||
-- ARCNET, fiber star
|
||||
@@ -755,5 +755,3 @@ List of Objects in test device:
|
||||
}
|
||||
|
||||
End of BACnet Protocol Implementation Conformance Statement
|
||||
|
||||
|
||||
|
||||
+10
-10
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* @file
|
||||
* @brief command line tool that simulates a BACnet server device on the
|
||||
* @brief command line tool that simulates a BACnet server device on the
|
||||
* network using the BACnet Stack and all the example object types.
|
||||
* @author Steve Karg <skarg@users.sourceforge.net>
|
||||
* @date 2006
|
||||
@@ -179,15 +179,15 @@ static void Init_Service_Handlers(void)
|
||||
apdu_set_unconfirmed_handler(SERVICE_UNCONFIRMED_WHO_HAS, handler_who_has);
|
||||
|
||||
#if 0
|
||||
/* BACnet Testing Observed Incident oi00107
|
||||
Server only devices should not indicate that they EXECUTE I-Am
|
||||
Revealed by BACnet Test Client v1.8.16 ( www.bac-test.com/bacnet-test-client-download )
|
||||
BITS: BIT00040
|
||||
Any discussions can be directed to edward@bac-test.com
|
||||
Please feel free to remove this comment when my changes accepted after suitable time for
|
||||
review by all interested parties. Say 6 months -> September 2016 */
|
||||
/* In this demo, we are the server only ( BACnet "B" device ) so we do not indicate
|
||||
that we can execute the I-Am message */
|
||||
/* BACnet Testing Observed Incident oi00107
|
||||
Server only devices should not indicate that they EXECUTE I-Am
|
||||
Revealed by BACnet Test Client v1.8.16 ( www.bac-test.com/bacnet-test-client-download )
|
||||
BITS: BIT00040
|
||||
Any discussions can be directed to edward@bac-test.com
|
||||
Please feel free to remove this comment when my changes accepted after suitable time for
|
||||
review by all interested parties. Say 6 months -> September 2016 */
|
||||
/* In this demo, we are the server only ( BACnet "B" device ) so we do not indicate
|
||||
that we can execute the I-Am message */
|
||||
/* handle i-am to support binding to other devices */
|
||||
apdu_set_unconfirmed_handler(SERVICE_UNCONFIRMED_I_AM, handler_i_am_bind);
|
||||
#endif
|
||||
|
||||
@@ -37,4 +37,3 @@ clean:
|
||||
|
||||
.PHONY: include
|
||||
include: .depend
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @file
|
||||
* @brief command line tool that sends a BACnet TimeSynchronization service
|
||||
* message with the local or arbitrary time and date to sync another device
|
||||
* message with the local or arbitrary time and date to sync another device
|
||||
* on the network.
|
||||
* @author Steve Karg <skarg@users.sourceforge.net>
|
||||
* @date 2006
|
||||
|
||||
@@ -37,4 +37,3 @@ clean:
|
||||
|
||||
.PHONY: include
|
||||
include: .depend
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* @file
|
||||
* @brief command line tool that sends a BACnet Unconfirmed Change-of-Value
|
||||
* @brief command line tool that sends a BACnet Unconfirmed Change-of-Value
|
||||
* Notification to the network
|
||||
* @author Steve Karg <skarg@users.sourceforge.net>
|
||||
* @date 2006
|
||||
|
||||
@@ -37,4 +37,3 @@ clean:
|
||||
|
||||
.PHONY: include
|
||||
include: .depend
|
||||
|
||||
|
||||
@@ -37,4 +37,3 @@ clean:
|
||||
|
||||
.PHONY: include
|
||||
include: .depend
|
||||
|
||||
|
||||
@@ -37,4 +37,3 @@ clean:
|
||||
|
||||
.PHONY: include
|
||||
include: .depend
|
||||
|
||||
|
||||
@@ -37,4 +37,3 @@ clean:
|
||||
|
||||
.PHONY: include
|
||||
include: .depend
|
||||
|
||||
|
||||
@@ -37,4 +37,3 @@ clean:
|
||||
|
||||
.PHONY: include
|
||||
include: .depend
|
||||
|
||||
|
||||
@@ -37,4 +37,3 @@ clean:
|
||||
|
||||
.PHONY: include
|
||||
include: .depend
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* @file
|
||||
* @brief command line tool that sends a BACnet Who-Is-Router-To-Network
|
||||
* @brief command line tool that sends a BACnet Who-Is-Router-To-Network
|
||||
* message for one or more networks, and prints any I-Am-Router-To-Network
|
||||
* responses received. This is useful for finding routers on the network.
|
||||
* @author Steve Karg <skarg@users.sourceforge.net>
|
||||
|
||||
@@ -37,4 +37,3 @@ clean:
|
||||
|
||||
.PHONY: include
|
||||
include: .depend
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* @file
|
||||
* @brief command line tool that sends a BACnet BVLC message
|
||||
* @brief command line tool that sends a BACnet BVLC message
|
||||
* Write-Broadcast-Distribution-Table to a BBMD on the network,
|
||||
* and prints the result code received. This is useful for
|
||||
* configuring the BBMD on the network.
|
||||
|
||||
@@ -37,4 +37,3 @@ clean:
|
||||
|
||||
.PHONY: include
|
||||
include: .depend
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* @file
|
||||
* @brief command line tool that uses BACnet AtomicWriteFile service
|
||||
* @brief command line tool that uses BACnet AtomicWriteFile service
|
||||
* to send a local file to a another device on the network.
|
||||
* This tool sends the file in chunks to the target device.
|
||||
* @author Steve Karg <skarg@users.sourceforge.net>
|
||||
|
||||
@@ -40,4 +40,3 @@ clean:
|
||||
|
||||
.PHONY: include
|
||||
include: .depend
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @file
|
||||
* @brief command line tool that uses BACnet WriteProperty service
|
||||
* message to write object property values to another device on
|
||||
* @brief command line tool that uses BACnet WriteProperty service
|
||||
* message to write object property values to another device on
|
||||
* the network and prints an acknowledgment or error response of
|
||||
* this confirmed service request. This is useful for testing
|
||||
* the WriteProperty service.
|
||||
|
||||
@@ -40,4 +40,3 @@ clean:
|
||||
|
||||
.PHONY: include
|
||||
include: .depend
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @file
|
||||
* @brief command line tool that uses BACnet WritePropertyMultiple service
|
||||
* message to write object property values to another device on
|
||||
* @brief command line tool that uses BACnet WritePropertyMultiple service
|
||||
* message to write object property values to another device on
|
||||
* the network and prints an acknowledgment or error response of
|
||||
* this confirmed service request. This is useful for testing
|
||||
* the WritePropertyMultiple service.
|
||||
|
||||
@@ -36,7 +36,7 @@ package "gdb-multiarch"
|
||||
# install AVR compiler and debugging tools
|
||||
package "gcc-avr"
|
||||
package "avarice"
|
||||
package "avr-libc"
|
||||
package "avr-libc"
|
||||
package "avrdude"
|
||||
package "gdb-avr"
|
||||
package "avrdude-doc"
|
||||
@@ -51,4 +51,3 @@ package "codespell"
|
||||
|
||||
# you can also execute arbitrary bash
|
||||
echo "🚀 ALL GOOD TO GO"
|
||||
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ bacrp.exe %1 8 %1 139
|
||||
bacrp.exe %1 8 %1 97
|
||||
bacrp.exe %1 8 %1 96
|
||||
bacrp.exe %1 8 %1 76 0
|
||||
bacrp.exe %1 8 %1 76
|
||||
bacrp.exe %1 8 %1 76
|
||||
bacrp.exe %1 8 %1 62
|
||||
bacrp.exe %1 8 %1 107
|
||||
bacrp.exe %1 8 %1 11
|
||||
|
||||
+104
-106
@@ -6,7 +6,7 @@ OPTIONAL=0
|
||||
usage()
|
||||
{
|
||||
echo "usage: $PROG [OPTIONS] <<BACnetID>> [ <<BACnetID>> ... ]
|
||||
|
||||
|
||||
Will return Required and Optional property values
|
||||
from the requested device.
|
||||
|
||||
@@ -32,116 +32,114 @@ done
|
||||
shift $(($OPTIND -1))
|
||||
|
||||
if [ $# -eq 0 ] || [ "$1" = "" ] ; then
|
||||
usage
|
||||
exit
|
||||
usage
|
||||
exit
|
||||
fi
|
||||
|
||||
run_test()
|
||||
{
|
||||
echo -e -e "Test: Read Required Properties of Device Object $1\r"
|
||||
echo -n "OBJECT IDENTIFIER:"
|
||||
./bacrp $1 8 $1 75
|
||||
echo -n "OBJECT NAME:"
|
||||
./bacrp $1 8 $1 77
|
||||
echo -n "OBJECT TYPE:"
|
||||
./bacrp $1 8 $1 79
|
||||
echo -n "SYSTEM STATUS:"
|
||||
./bacrp $1 8 $1 112
|
||||
echo -n "VENDOR NAME:"
|
||||
./bacrp $1 8 $1 121
|
||||
echo -n "VENDOR IDENTIFIER:"
|
||||
./bacrp $1 8 $1 120
|
||||
echo -n "MODEL NAME:"
|
||||
./bacrp $1 8 $1 70
|
||||
echo -n "FIRMWARE REVISION:"
|
||||
./bacrp $1 8 $1 44
|
||||
echo -n "APPLICATION SOFTWARE VERSION:"
|
||||
./bacrp $1 8 $1 12
|
||||
echo -n "PROTOCOL VERSION:"
|
||||
./bacrp $1 8 $1 98
|
||||
echo -n "PROTOCOL REVISION:"
|
||||
./bacrp $1 8 $1 139
|
||||
echo -n "PROTOCOL SERVICES SUPPORTED:"
|
||||
./bacrp $1 8 $1 97
|
||||
echo -n "OBJECT TYPES SUPPORTED:"
|
||||
./bacrp $1 8 $1 96
|
||||
echo -n "OBJECT LIST LENGTH:"
|
||||
./bacrp $1 8 $1 76 0
|
||||
echo -n "OBJECT LIST:"
|
||||
./bacrp $1 8 $1 76
|
||||
echo -n "MAX APDU LENGTH ACCEPTED:"
|
||||
./bacrp $1 8 $1 62
|
||||
echo -n "SEGMENTATION SUPPORTED:"
|
||||
./bacrp $1 8 $1 107
|
||||
echo -n "APDU TIMEOUT:"
|
||||
./bacrp $1 8 $1 11
|
||||
echo -n "NUMGER OF APDU ENTRIES:"
|
||||
./bacrp $1 8 $1 73
|
||||
echo -n "DEVICE ADDRESS BINDING:"
|
||||
./bacrp $1 8 $1 30
|
||||
echo -n "DATABASE REVISION:"
|
||||
./bacrp $1 8 $1 155
|
||||
if [ $OPTIONAL -eq 1 ] ; then
|
||||
echo -e "Test: Read Optional Properties of Device Object $1\r"
|
||||
echo -n "LOCATION:"
|
||||
./bacrp $1 8 $1 58
|
||||
echo -n "DESCRIPTION:"
|
||||
./bacrp $1 8 $1 28
|
||||
echo -n "MAX SEGMENTS SUPPORTED:"
|
||||
./bacrp $1 8 $1 167
|
||||
echo -n "VT CLASSES SUPPORTED:"
|
||||
./bacrp $1 8 $1 122
|
||||
echo -n "ACTIVE VT SESSIONS:"
|
||||
./bacrp $1 8 $1 5
|
||||
echo -n "LOCAL TIME:"
|
||||
./bacrp $1 8 $1 57
|
||||
echo -n "LOCAL DATE:"
|
||||
./bacrp $1 8 $1 56
|
||||
echo -n "UTC OFFSET:"
|
||||
./bacrp $1 8 $1 119
|
||||
echo -n "DAYLIGHT SAVINGS STATUS:"
|
||||
./bacrp $1 8 $1 24
|
||||
echo -n "APDU SEGMENT TIMEOUT:"
|
||||
./bacrp $1 8 $1 10
|
||||
echo -n "LIST OF SESSION KEYS:"
|
||||
./bacrp $1 8 $1 55
|
||||
echo -n "TIME SYNCHRONIZATION RECIPIENTS:"
|
||||
./bacrp $1 8 $1 116
|
||||
echo -n "MAX MASTER:"
|
||||
./bacrp $1 8 $1 64
|
||||
echo -n "MAX INFO FRAMES:"
|
||||
./bacrp $1 8 $1 63
|
||||
echo -n "ACK REQUIRED:"
|
||||
./bacrp $1 8 $1 1
|
||||
echo -n "CONFIGURATION FILES:"
|
||||
./bacrp $1 8 $1 154
|
||||
echo -n "LAST RESTORE TIME:"
|
||||
./bacrp $1 8 $1 157
|
||||
echo -n "BACKUP FAILURE TIMEOUT:"
|
||||
./bacrp $1 8 $1 153
|
||||
echo -n "ACTIVE COV SUBSCRIPTIONS:"
|
||||
./bacrp $1 8 $1 152
|
||||
echo -n "SLAVE PROXY ENABLE:"
|
||||
./bacrp $1 8 $1 172
|
||||
echo -n "MANUAL SLAVE ADDRESS BINDING:"
|
||||
./bacrp $1 8 $1 170
|
||||
echo -n "AUTO SLAVE DISCOVERY:"
|
||||
./bacrp $1 8 $1 169
|
||||
echo -n "SLAVE ADDRESS BINDING:"
|
||||
./bacrp $1 8 $1 171
|
||||
echo -n "PROFILE NAME:"
|
||||
./bacrp $1 8 $1 168
|
||||
fi
|
||||
echo -e " \r"
|
||||
echo -e -e "Test: Read Required Properties of Device Object $1\r"
|
||||
echo -n "OBJECT IDENTIFIER:"
|
||||
./bacrp $1 8 $1 75
|
||||
echo -n "OBJECT NAME:"
|
||||
./bacrp $1 8 $1 77
|
||||
echo -n "OBJECT TYPE:"
|
||||
./bacrp $1 8 $1 79
|
||||
echo -n "SYSTEM STATUS:"
|
||||
./bacrp $1 8 $1 112
|
||||
echo -n "VENDOR NAME:"
|
||||
./bacrp $1 8 $1 121
|
||||
echo -n "VENDOR IDENTIFIER:"
|
||||
./bacrp $1 8 $1 120
|
||||
echo -n "MODEL NAME:"
|
||||
./bacrp $1 8 $1 70
|
||||
echo -n "FIRMWARE REVISION:"
|
||||
./bacrp $1 8 $1 44
|
||||
echo -n "APPLICATION SOFTWARE VERSION:"
|
||||
./bacrp $1 8 $1 12
|
||||
echo -n "PROTOCOL VERSION:"
|
||||
./bacrp $1 8 $1 98
|
||||
echo -n "PROTOCOL REVISION:"
|
||||
./bacrp $1 8 $1 139
|
||||
echo -n "PROTOCOL SERVICES SUPPORTED:"
|
||||
./bacrp $1 8 $1 97
|
||||
echo -n "OBJECT TYPES SUPPORTED:"
|
||||
./bacrp $1 8 $1 96
|
||||
echo -n "OBJECT LIST LENGTH:"
|
||||
./bacrp $1 8 $1 76 0
|
||||
echo -n "OBJECT LIST:"
|
||||
./bacrp $1 8 $1 76
|
||||
echo -n "MAX APDU LENGTH ACCEPTED:"
|
||||
./bacrp $1 8 $1 62
|
||||
echo -n "SEGMENTATION SUPPORTED:"
|
||||
./bacrp $1 8 $1 107
|
||||
echo -n "APDU TIMEOUT:"
|
||||
./bacrp $1 8 $1 11
|
||||
echo -n "NUMGER OF APDU ENTRIES:"
|
||||
./bacrp $1 8 $1 73
|
||||
echo -n "DEVICE ADDRESS BINDING:"
|
||||
./bacrp $1 8 $1 30
|
||||
echo -n "DATABASE REVISION:"
|
||||
./bacrp $1 8 $1 155
|
||||
if [ $OPTIONAL -eq 1 ] ; then
|
||||
echo -e "Test: Read Optional Properties of Device Object $1\r"
|
||||
echo -n "LOCATION:"
|
||||
./bacrp $1 8 $1 58
|
||||
echo -n "DESCRIPTION:"
|
||||
./bacrp $1 8 $1 28
|
||||
echo -n "MAX SEGMENTS SUPPORTED:"
|
||||
./bacrp $1 8 $1 167
|
||||
echo -n "VT CLASSES SUPPORTED:"
|
||||
./bacrp $1 8 $1 122
|
||||
echo -n "ACTIVE VT SESSIONS:"
|
||||
./bacrp $1 8 $1 5
|
||||
echo -n "LOCAL TIME:"
|
||||
./bacrp $1 8 $1 57
|
||||
echo -n "LOCAL DATE:"
|
||||
./bacrp $1 8 $1 56
|
||||
echo -n "UTC OFFSET:"
|
||||
./bacrp $1 8 $1 119
|
||||
echo -n "DAYLIGHT SAVINGS STATUS:"
|
||||
./bacrp $1 8 $1 24
|
||||
echo -n "APDU SEGMENT TIMEOUT:"
|
||||
./bacrp $1 8 $1 10
|
||||
echo -n "LIST OF SESSION KEYS:"
|
||||
./bacrp $1 8 $1 55
|
||||
echo -n "TIME SYNCHRONIZATION RECIPIENTS:"
|
||||
./bacrp $1 8 $1 116
|
||||
echo -n "MAX MASTER:"
|
||||
./bacrp $1 8 $1 64
|
||||
echo -n "MAX INFO FRAMES:"
|
||||
./bacrp $1 8 $1 63
|
||||
echo -n "ACK REQUIRED:"
|
||||
./bacrp $1 8 $1 1
|
||||
echo -n "CONFIGURATION FILES:"
|
||||
./bacrp $1 8 $1 154
|
||||
echo -n "LAST RESTORE TIME:"
|
||||
./bacrp $1 8 $1 157
|
||||
echo -n "BACKUP FAILURE TIMEOUT:"
|
||||
./bacrp $1 8 $1 153
|
||||
echo -n "ACTIVE COV SUBSCRIPTIONS:"
|
||||
./bacrp $1 8 $1 152
|
||||
echo -n "SLAVE PROXY ENABLE:"
|
||||
./bacrp $1 8 $1 172
|
||||
echo -n "MANUAL SLAVE ADDRESS BINDING:"
|
||||
./bacrp $1 8 $1 170
|
||||
echo -n "AUTO SLAVE DISCOVERY:"
|
||||
./bacrp $1 8 $1 169
|
||||
echo -n "SLAVE ADDRESS BINDING:"
|
||||
./bacrp $1 8 $1 171
|
||||
echo -n "PROFILE NAME:"
|
||||
./bacrp $1 8 $1 168
|
||||
fi
|
||||
echo -e " \r"
|
||||
}
|
||||
|
||||
while [ $# -gt 0 ] ; do
|
||||
ID=$(( $1 + 0 ))
|
||||
shift
|
||||
if [ $ID -eq 0 ] ; then
|
||||
echo "ERROR: Device ID must be an integer!! [ID=$ID]" >&2
|
||||
fi
|
||||
run_test $ID
|
||||
ID=$(( $1 + 0 ))
|
||||
shift
|
||||
if [ $ID -eq 0 ] ; then
|
||||
echo "ERROR: Device ID must be an integer!! [ID=$ID]" >&2
|
||||
fi
|
||||
run_test $ID
|
||||
done
|
||||
|
||||
|
||||
|
||||
+2
-3
@@ -18,8 +18,8 @@ declare -A device
|
||||
# capture the devices from the command line
|
||||
for d in "$@"
|
||||
do
|
||||
device[${port_key}]=${d}
|
||||
epics_port_max=$((port_key++))
|
||||
device[${port_key}]=${d}
|
||||
epics_port_max=$((port_key++))
|
||||
done
|
||||
|
||||
# spawn the epics clients
|
||||
@@ -42,4 +42,3 @@ for pid in ${pids[*]}; do
|
||||
done
|
||||
|
||||
killall bacserv
|
||||
|
||||
|
||||
@@ -11,4 +11,3 @@ echo they register as a Foreign Device to it.
|
||||
@echo on
|
||||
set BACNET_BBMD_PORT=47808
|
||||
set BACNET_BBMD_ADDRESS=%1
|
||||
|
||||
|
||||
+1
-1
@@ -50,4 +50,4 @@ export BACNET_ROUTER_DEBUG
|
||||
echo "BACNET_ROUTER_DEBUG=$BACNET_ROUTER_DEBUG"
|
||||
|
||||
echo Launching new shell using the BACnet Router environment...
|
||||
/bin/bash
|
||||
/bin/bash
|
||||
|
||||
+1
-1
@@ -19,4 +19,4 @@ max_subargs_per_line: 2
|
||||
|
||||
max_pargs_hwrap: 2
|
||||
|
||||
max_subgroups_hwrap: 2
|
||||
max_subgroups_hwrap: 2
|
||||
|
||||
@@ -23,4 +23,3 @@ do
|
||||
${CONVERTER} ${filename} > ${TEMPFILE}
|
||||
mv ${TEMPFILE} ${filename}
|
||||
done
|
||||
|
||||
|
||||
+17
-17
@@ -40,8 +40,8 @@ Adding additional services is a matter of adding the encoding and decoding for
|
||||
the service into/from meaningful data, and I like to add unit testing, a demo
|
||||
handler and send function, as well as a demo command line example.
|
||||
|
||||
For each service that you add to your project or makefile, you will need to
|
||||
add a handler and possibly a sending function. There are example handlers
|
||||
For each service that you add to your project or makefile, you will need to
|
||||
add a handler and possibly a sending function. There are example handlers
|
||||
and send functions for all the services that the stack supports:
|
||||
|
||||
* demo/handler/h_alarm_ack.c - Alarm ACK service handler example
|
||||
@@ -121,7 +121,7 @@ example object files in the BACnet stack include:
|
||||
* demo/object/lsp.c - life safety point object demo
|
||||
* demo/object/mso.c - multi-step output object demo
|
||||
|
||||
The BACnet stack includes a number of core files that handle the service
|
||||
The BACnet stack includes a number of core files that handle the service
|
||||
packets that come in from the datalink layer. The core files include:
|
||||
|
||||
* apdu.c - handles dispatching the services to the proper handlers
|
||||
@@ -134,11 +134,11 @@ packets that come in from the datalink layer. The core files include:
|
||||
* demo/handler/h_npdu.c - handles dispatching of the network message
|
||||
to the apdu dispatcher.
|
||||
|
||||
The DataLink Layer controls orderly access to the physical medium.
|
||||
The stack currently supports one datalink layer at a time, and uses a
|
||||
macro defined in config.h or your makefile/project to choose the macro
|
||||
functions defined in datalink.h. The following files are used for the
|
||||
datalink handling in this BACnet stack, and may have to be developed for
|
||||
The DataLink Layer controls orderly access to the physical medium.
|
||||
The stack currently supports one datalink layer at a time, and uses a
|
||||
macro defined in config.h or your makefile/project to choose the macro
|
||||
functions defined in datalink.h. The following files are used for the
|
||||
datalink handling in this BACnet stack, and may have to be developed for
|
||||
your particular hardware:
|
||||
|
||||
* bip.c - BACnet/IP functionality - depends on bip_init.c in port/xx
|
||||
@@ -149,15 +149,15 @@ your particular hardware:
|
||||
* arcnet.c - ARCNET datalink layer functionality, in port/xx
|
||||
* ethernet.c - BACnet Ethernet datalink layer functionality, in port/xx
|
||||
|
||||
There are a dozen demonstration applications in the demo directory,
|
||||
along with many demonstation objects and handlers. All the demos accept
|
||||
command line options and have been tested under Win32 and Linux.
|
||||
There is a makefile in the respective demo directory for Linux and
|
||||
for Borland C++ compilers, and a master makefile at the root level
|
||||
There are a dozen demonstration applications in the demo directory,
|
||||
along with many demonstation objects and handlers. All the demos accept
|
||||
command line options and have been tested under Win32 and Linux.
|
||||
There is a makefile in the respective demo directory for Linux and
|
||||
for Borland C++ compilers, and a master makefile at the root level
|
||||
(Makefile=Linux, makefile.b32=Borland).
|
||||
|
||||
The simplest demonstration is to run demo/server/bacserv on one PC (or
|
||||
virtual PC), and run the other client demonstration applications one
|
||||
at time on another PC (or virtual PC). Monitor the network communcations
|
||||
using Wireshark protocol analyzer, or test the BACnet server using
|
||||
The simplest demonstration is to run demo/server/bacserv on one PC (or
|
||||
virtual PC), and run the other client demonstration applications one
|
||||
at time on another PC (or virtual PC). Monitor the network communcations
|
||||
using Wireshark protocol analyzer, or test the BACnet server using
|
||||
BACnet Visual Test Shell VTS3.
|
||||
|
||||
+14
-14
@@ -1,38 +1,38 @@
|
||||
To build the Doxygen documentation for the BACnet Stack:
|
||||
- Install doxygen as described at
|
||||
- Install doxygen as described at
|
||||
http://www.stack.nl/~dimitri/doxygen/install.html
|
||||
- If you want to generate call graphs (recommended - very nice! - but takes
|
||||
signficantly longer to build the documents), you must also have
|
||||
- If you want to generate call graphs (recommended - very nice! - but takes
|
||||
signficantly longer to build the documents), you must also have
|
||||
graphviz installed.
|
||||
- To build from the command line, just enter
|
||||
doxygen BACnet-stack.doxyfile
|
||||
- Output is built in doc/output/html, and there is a convenient
|
||||
starting point at doc/output/BAC_stack.html.
|
||||
- If you use Eclipse,
|
||||
- If you use Eclipse,
|
||||
- install the eClox plugin to support doxygen within Eclipse
|
||||
- Build the documents by right clicking on BACnet-stack.doxyfile,
|
||||
and selecting "@ Build Documentation"
|
||||
- Feel free to tweak the doxygen output to your tastes, interests, and
|
||||
- Feel free to tweak the doxygen output to your tastes, interests, and
|
||||
choice of output formats.
|
||||
- The Latex output could be converted into a PDF (see doxygen manual,
|
||||
and google for your issues).
|
||||
- I have tried the PDF, man, and RTF outputs and not liked the results
|
||||
for any of them (500+ pages). I recommend the HTML output, as it is
|
||||
well organized and has an obvious flow, both of which the others lack.
|
||||
|
||||
|
||||
The doxygen output is not checked into this project because it consists of
|
||||
over 5,000 little files (for HTML with call graphs), and it is easily
|
||||
over 5,000 little files (for HTML with call graphs), and it is easily
|
||||
regenerated.
|
||||
|
||||
|
||||
For speed, the function call graphs are not enabled in the SVN version
|
||||
of the doxyfile. To enable them, edit BACnet-stack.doxyfile (with a
|
||||
text editor or with GUI-based editors in Eclipse or using the
|
||||
doxywizard application) and change
|
||||
text editor or with GUI-based editors in Eclipse or using the
|
||||
doxywizard application) and change
|
||||
HAVE_DOT = YES
|
||||
CALLER_GRAPH = YES
|
||||
|
||||
|
||||
Following the doxygen website's lead, I found the D-Bus project to be a good
|
||||
|
||||
|
||||
Following the doxygen website's lead, I found the D-Bus project to be a good
|
||||
example of the sort of documentation we needed to have here.
|
||||
http://dbus.freedesktop.org/doc/dbus/api/html/index.html
|
||||
|
||||
@@ -48,7 +48,7 @@ whitespace, like a function per page, ~600 pages, not usefully organized).
|
||||
Ditto for RTF and man output.
|
||||
|
||||
I could not find a linux-based compiled help compiler, so I resorted to using
|
||||
Microsoft's. They seem to be pushing some later generation tools, and
|
||||
Microsoft's. They seem to be pushing some later generation tools, and
|
||||
maybe someone knows if that's a good thing, but I opted for their now
|
||||
fairly old HTML Help Workshop, version 4.74.
|
||||
Doxygen nicely arranges the html input, so pretty much all you have to do
|
||||
|
||||
@@ -158,4 +158,3 @@ Q-18: I have downloaded the BACnet stack but can't get Who-Is or EPICS applicati
|
||||
A-18: Firewalls on modern OS block incoming and outgoing network traffic and require you to 'allow' the port that BACnet/IP uses. To allow the default BACnet/IP UDP port 47808 Linux with UFW:
|
||||
|
||||
$ sudo ufw allow 47808/udp
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user