Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Commit

Permalink
#4 Restructured code to reflect "package by function"
Browse files Browse the repository at this point in the history
  • Loading branch information
baardl committed Apr 10, 2021
1 parent a763ce9 commit 1dc66a6
Show file tree
Hide file tree
Showing 14 changed files with 30 additions and 80 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,11 @@ Link will be the combination of sendTo Address, and InvokeId. The response will
sendTo Address, now as sender Address.

Step 1 will have to be more simple though.

## Parse Response

```
Read from Socket, convert byte to string.
String hexString = ..fromByte(..)
ParserResult<T> result = BvlcParser.parse(hexString)
```
29 changes: 0 additions & 29 deletions src/main/java/no/entra/bacnet/bvlc/BvlcResult.java

This file was deleted.

29 changes: 0 additions & 29 deletions src/main/java/no/entra/bacnet/npdu/NpduResult.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import static java.lang.Integer.parseInt;
import static org.slf4j.LoggerFactory.getLogger;

@Deprecated
public class ReadAccessResult {
private static final Logger log = getLogger(ReadAccessResult.class);
public static final String OBJECT_IDENTIFIER = "0c";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package no.entra.bacnet.services;
package no.entra.bacnet.properties;

import no.entra.bacnet.objects.ObjectId;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package no.entra.bacnet.services;
package no.entra.bacnet.properties;

import no.entra.bacnet.apdu.SDContextTag;
import no.entra.bacnet.objects.ObjectId;
import no.entra.bacnet.objects.ObjectIdMapper;
import no.entra.bacnet.octet.OctetReader;
import no.entra.bacnet.parseandmap.ParserResult;
import no.entra.bacnet.services.BacnetParserException;
import org.slf4j.Logger;

import static no.entra.bacnet.apdu.ArrayTag.ARRAY1_END;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package no.entra.bacnet.services;
package no.entra.bacnet.properties;

import org.slf4j.Logger;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package no.entra.bacnet.services;
package no.entra.bacnet.properties;

import no.entra.bacnet.apdu.*;
import no.entra.bacnet.bvlc.Bvlc;
Expand All @@ -12,8 +12,10 @@
import no.entra.bacnet.octet.Octet;
import no.entra.bacnet.octet.OctetReader;
import no.entra.bacnet.parseandmap.ParserResult;
import no.entra.bacnet.properties.PropertyIdentifier;
import no.entra.bacnet.properties.PropertyReference;
import no.entra.bacnet.services.BacnetRequest;
import no.entra.bacnet.services.BacnetResponse;
import no.entra.bacnet.services.ConfirmedServiceChoice;
import no.entra.bacnet.services.Service;
import org.slf4j.Logger;

import java.util.HashSet;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package no.entra.bacnet.services;
package no.entra.bacnet.properties;

import no.entra.bacnet.device.DeviceId;
import no.entra.bacnet.objects.ObjectId;
import no.entra.bacnet.objects.ObjectProperties;
import no.entra.bacnet.objects.ObjectType;
import no.entra.bacnet.properties.PropertyIdentifier;
import no.entra.bacnet.properties.PropertyReference;

import java.util.Arrays;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
package no.entra.bacnet.services;

import no.entra.bacnet.properties.PropertyIdentifier;
package no.entra.bacnet.properties;

import java.util.HashMap;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package no.entra.bacnet.services;
package no.entra.bacnet.properties;

import no.entra.bacnet.apdu.ApplicationTag;
import no.entra.bacnet.apdu.MeasurementUnit;
Expand All @@ -11,7 +11,7 @@
import no.entra.bacnet.octet.Octet;
import no.entra.bacnet.octet.OctetReader;
import no.entra.bacnet.parseandmap.ParserResult;
import no.entra.bacnet.properties.PropertyIdentifier;
import no.entra.bacnet.services.BacnetParserException;
import org.slf4j.Logger;

import java.util.HashMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import no.entra.bacnet.objects.ObjectProperties;
import no.entra.bacnet.properties.PropertyIdentifier;
import no.entra.bacnet.properties.PropertyReference;
import no.entra.bacnet.services.ReadPropertyMultipleService;
import no.entra.bacnet.services.ReadPropertyMultipleServiceBuilder;
import no.entra.bacnet.properties.ReadPropertyMultipleService;
import no.entra.bacnet.properties.ReadPropertyMultipleServiceBuilder;
import org.junit.jupiter.api.Test;

import java.util.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package no.entra.bacnet.services;
package no.entra.bacnet.properties;

import no.entra.bacnet.apdu.MeasurementUnit;
import no.entra.bacnet.objects.ObjectId;
import no.entra.bacnet.objects.ObjectType;
import no.entra.bacnet.parseandmap.ParserResult;
import no.entra.bacnet.properties.PropertyIdentifier;
import no.entra.bacnet.services.BacnetParserException;
import org.junit.jupiter.api.Test;

import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
package no.entra.bacnet.services;
package no.entra.bacnet.properties;

import no.entra.bacnet.apdu.MeasurementUnit;
import no.entra.bacnet.error.ErrorClassType;
import no.entra.bacnet.error.ErrorCodeType;
import no.entra.bacnet.objects.ObjectId;
import no.entra.bacnet.parseandmap.ParserResult;
import no.entra.bacnet.properties.PropertyIdentifier;
import no.entra.bacnet.services.BacnetParserException;
import org.junit.jupiter.api.Test;

import java.util.Map;

import static no.entra.bacnet.objects.ObjectType.AnalogValue;
import static no.entra.bacnet.services.ReadPropertyResultParser.ERROR_CLASS;
import static no.entra.bacnet.services.ReadPropertyResultParser.ERROR_CODE;
import static no.entra.bacnet.properties.ReadPropertyResultParser.ERROR_CLASS;
import static no.entra.bacnet.properties.ReadPropertyResultParser.ERROR_CODE;
import static org.junit.jupiter.api.Assertions.*;

/*
Expand Down

0 comments on commit 1dc66a6

Please sign in to comment.