Skip to content

Commit d163d93

Browse files
authored
0.57.0
- Requester now merges multiple list requests into one. - Requester list API changed. - ApiObject interface changed. - Fix chunked list responses. - Fix concurrency bug in SimpleTable. - DSLink.getUpstream() changed to DSLink.getConnection() - Fix list invalid cast. - New unit tests.
2 parents a8fbdfa + 06cb397 commit d163d93

35 files changed

+636
-349
lines changed

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
subprojects {
22

33
apply plugin: 'jacoco'
4-
apply plugin: 'java'
4+
apply plugin: 'java-library'
55
apply plugin: 'maven'
66

77
group 'org.iot-dsa'
8-
version '0.56.0'
8+
version '0.57.0'
99

1010
sourceCompatibility = 1.8
1111
targetCompatibility = 1.8

dslink-v2-poc/src/main/java/org/iot/dsa/dslink/poc/MainNode.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
import java.util.Collection;
44
import org.iot.dsa.DSRuntime;
55
import org.iot.dsa.dslink.DSMainNode;
6-
import org.iot.dsa.dslink.requester.ErrorType;
7-
import org.iot.dsa.dslink.requester.OutboundListHandler;
8-
import org.iot.dsa.dslink.requester.OutboundStream;
96
import org.iot.dsa.node.DSBool;
107
import org.iot.dsa.node.DSDouble;
118
import org.iot.dsa.node.DSElement;
@@ -56,7 +53,7 @@ public class MainNode extends DSMainNode implements Runnable {
5653
public DSInfo getVirtualAction(DSInfo target, String name) {
5754
if (target == incrementingInt) {
5855
if (name.equals("Reset")) {
59-
return actionInfo(name, new DSAction.Parameterless() {
56+
return virtualInfo(name, new DSAction.Parameterless() {
6057
@Override
6158
public ActionResult invoke(DSInfo target, ActionInvocation invocation) {
6259
put(incrementingInt, DSElement.make(0));
@@ -66,7 +63,7 @@ public ActionResult invoke(DSInfo target, ActionInvocation invocation) {
6663
}
6764
} else if (target.get() == this) {
6865
if (name.equals("Foobar")) {
69-
return actionInfo(name, new Parameterless() {
66+
return virtualInfo(name, new Parameterless() {
7067
@Override
7168
public ActionResult invoke(DSInfo target, ActionInvocation invocation) {
7269
System.out.println("Hi Mom");

dslink-v2-websocket/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ artifacts {
33
}
44

55
dependencies {
6-
implementation project(':dslink-v2')
6+
api project(':dslink-v2')
77
implementation 'org.glassfish.tyrus.bundles:tyrus-standalone-client:[1.13.1,)'
88
}

dslink-v2/src/main/java/com/acuity/iot/dsa/dslink/protocol/DSRootLink.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public DSSysNode getSys() {
4848
}
4949

5050
@Override
51-
public DSLinkConnection getUpstream() {
51+
public DSLinkConnection getConnection() {
5252
return (DSLinkConnection) upstream.get();
5353
}
5454

dslink-v2/src/main/java/com/acuity/iot/dsa/dslink/protocol/message/AbstractMessage.java

Lines changed: 0 additions & 128 deletions
This file was deleted.

dslink-v2/src/main/java/com/acuity/iot/dsa/dslink/protocol/message/DSTarget.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,11 @@
1515
*/
1616
public class DSTarget {
1717

18-
private String[] names;
19-
2018
///////////////////////////////////////////////////////////////////////////
2119
// Fields
2220
///////////////////////////////////////////////////////////////////////////
2321

22+
private String[] names;
2423
private DSNode node;
2524
private DSInfo parentInfo;
2625
private String path;

dslink-v2/src/main/java/com/acuity/iot/dsa/dslink/protocol/message/MessageReader.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
import org.iot.dsa.io.DSIReader;
44

55
/**
6+
* V2 needs more than just a DSIReader, so this provides the necessary abstraction.
7+
*
68
* @author Aaron Hansen
79
*/
810
public interface MessageReader {

dslink-v2/src/main/java/com/acuity/iot/dsa/dslink/protocol/message/MessageWriter.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
import org.iot.dsa.io.DSIWriter;
44

55
/**
6+
* V2 needs more than just a DSIWriter, so this provides the necessary abstraction.
7+
*
68
* @author Aaron Hansen
79
*/
810
public interface MessageWriter {

dslink-v2/src/main/java/com/acuity/iot/dsa/dslink/protocol/message/OutboundMessage.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
public interface OutboundMessage {
99

1010
/**
11-
* True if the message is ready to be written.
11+
* True if the message is ready to be written. A can be queued to write something, but may
12+
* not be able to such as waiting for an ack.
1213
*/
1314
public boolean canWrite(DSSession session);
1415

0 commit comments

Comments
 (0)