Skip to content

Commit

Permalink
Update readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
splatch committed Feb 26, 2020
1 parent d187012 commit 3df8091
Showing 1 changed file with 49 additions and 8 deletions.
57 changes: 49 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Code-House Bacnet4J wrapper

[![CircleCI build]( https://img.shields.io/circleci/project/github/Code-House/bacnet4j-wrapper.svg)](https://circleci.com/gh/Code-House/bacnet4j-wrapper/)
[![CircleCI build](https://circleci.com/gh/Code-House/bacnet4j-wrapper/tree/1.2.x.svg?style=svg)](https://circleci.com/gh/Code-House/bacnet4j-wrapper/tree/1.2.x)
[![GitHub license](https://img.shields.io/github/license/Code-House/bacnet4j-wrapper.svg)](https://github.com/Code-House/bacnet4j-wrapper/blob/master/LICENSE)
[![GitHub release](https://img.shields.io/github/release/Code-House/bacnet4j-wrapper.svg)](https://GitHub.com/Code-House/bacnet4j-wrapper/releases/)
[![Github all releases](https://img.shields.io/github/downloads/Code-House/bacnet4j-wrapper/total.svg)](https://GitHub.com/Code-House/bacnet4j-wrapper/releases/)
Expand All @@ -15,10 +15,11 @@ API of Bacnet4j remains a mystery if you do not follow spec.
For this reason our wrapper is still maintained. Even if its documentation is not any better than original library, it still
provides basic operations in less confusing way.

IP: variant
```java
BacNetClient client = new BacNetIpClient("<bind ip>", "<broadcast ip>", <client device id>);
client.start();
Set<Device> devices = client.discoverDevices(500); // given number is timeout in millis
Set<Device> devices = client.discoverDevices(5000); // given number is timeout in millis
for (Device device : devices) {
System.out.println(device);

Expand All @@ -30,23 +31,63 @@ for (Device device : devices) {
client.stop();
```

MSTP variant:
```java
BacNetClient client = new BacNetMstpClient("<serial port>", <serial node id>, <client device id>);
client.start();
Set<Device> devices = client.discoverDevices(5000); // given number is timeout in millis
for (Device device : devices) {
System.out.println(device);

for (Property property : client.getDeviceProperties(device)) {
System.out.println(property.getName() + " " + client.getPropertyValue(property));
}
}

client.stop();
```


## Supported features

This project is aimed to offer simple facade thus it is limited to following bacnet object types:
This project is aimed to offer simple facade thus it is limited to device and following bacnet object types:

* analogInput
* analogOutput
* analogValue
* binaryInput (not tested)
* binaryInput
* binaryOutput
* binaryValue
* multiStateInput (not tested)
* multiStateOutput (not tested)
* multiStateValue (not tested)
* multiStateInput
* multiStateOutput
* multiStateValue

As of 1.2.x there is support for additional object types, however they are considered experimental:

* calendar
* pulseConverter
* schedule
* characterstringValue
* dateTimeValue
* largeAnalogValue
* octetstringValue
* timeValue
* integerValue
* positiveIntegerValue
* datetimePatternValue
* timePatternValue
* datePatternValue
* accumulator

Most of them is still commendable and supports access through `present value` property, but some of them bring additional properties
which are not visible through wrapper APIs.

If you are interested in adding other types of objects to API feel free to submit PR.

Each property of type enlisted above can be read and attempted to set via `client.getPropertyValue` and `client.setPropertyValue` method calls. There are two variants of set/get property methods - with and without converter argument. If you know type of property then you can convert it upfront to bacnet4j structure. By default library will try to guess, however in most of cases it will fail.
Each property of type enlisted above can be read and attempted to set via `client.getPropertyValue` and `client.setPropertyValue` method calls.
There are two variants of set/get property methods - with and without converter argument.
If you know type of property then you can convert it upfront to bacnet4j structure.
By default library will try to guess, however in most of cases it will fail.

### How to build

Expand Down

0 comments on commit 3df8091

Please sign in to comment.