From 3df809125c0dbcf4c040dba7a40ec9be26318e09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Dywicki?= Date: Wed, 26 Feb 2020 20:26:17 +0100 Subject: [PATCH] Update readme. --- README.md | 57 +++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 49 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 65ab696..2f6fa32 100644 --- a/README.md +++ b/README.md @@ -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/) @@ -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("", "", ); client.start(); -Set devices = client.discoverDevices(500); // given number is timeout in millis +Set devices = client.discoverDevices(5000); // given number is timeout in millis for (Device device : devices) { System.out.println(device); @@ -30,23 +31,63 @@ for (Device device : devices) { client.stop(); ``` +MSTP variant: +```java +BacNetClient client = new BacNetMstpClient("", , ); +client.start(); +Set 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