Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
ckienle committed Aug 11, 2023
2 parents 83be02a + e373de7 commit d6552c9
Show file tree
Hide file tree
Showing 23 changed files with 42 additions and 18 deletions.
2 changes: 1 addition & 1 deletion java/compat_impl/edge/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>org.eclipse.tahu</groupId>
<artifactId>tahu</artifactId>
<version>1.0.5-SNAPSHOT</version>
<version>1.0.5</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion java/compat_impl/host/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>org.eclipse.tahu</groupId>
<artifactId>tahu</artifactId>
<version>1.0.5-SNAPSHOT</version>
<version>1.0.5</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,16 @@ public void shutdown() {
hostApplication.shutdown();
}

@Override
public void onConnect() {
logger.info("onConnect...");
}

@Override
public void onDisconnect() {
logger.info("onDisconnect...");
}

@Override
public void onNodeBirthArrived(EdgeNodeDescriptor edgeNodeDescriptor, Message message) {
logger.info("onNodeBirthArrived from {}...", edgeNodeDescriptor);
Expand Down
2 changes: 1 addition & 1 deletion java/examples/device_timestamp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>org.eclipse.tahu</groupId>
<artifactId>tahu-examples</artifactId>
<version>1.0.5-SNAPSHOT</version>
<version>1.0.5</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion java/examples/edge_node_control/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>org.eclipse.tahu</groupId>
<artifactId>tahu-examples</artifactId>
<version>1.0.5-SNAPSHOT</version>
<version>1.0.5</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion java/examples/host_file/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>org.eclipse.tahu</groupId>
<artifactId>tahu-examples</artifactId>
<version>1.0.5-SNAPSHOT</version>
<version>1.0.5</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion java/examples/listener/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>org.eclipse.tahu</groupId>
<artifactId>tahu-examples</artifactId>
<version>1.0.5-SNAPSHOT</version>
<version>1.0.5</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion java/examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

<groupId>org.eclipse.tahu</groupId>
<artifactId>tahu-examples</artifactId>
<version>1.0.5-SNAPSHOT</version>
<version>1.0.5</version>
<packaging>pom</packaging>

<name>Eclipse Tahu</name>
Expand Down
2 changes: 1 addition & 1 deletion java/examples/raspberry_pi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>org.eclipse.tahu</groupId>
<artifactId>tahu-examples</artifactId>
<version>1.0.5-SNAPSHOT</version>
<version>1.0.5</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion java/examples/records/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>org.eclipse.tahu</groupId>
<artifactId>tahu-examples</artifactId>
<version>1.0.5-SNAPSHOT</version>
<version>1.0.5</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion java/examples/simple/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>org.eclipse.tahu</groupId>
<artifactId>tahu-examples</artifactId>
<version>1.0.5-SNAPSHOT</version>
<version>1.0.5</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion java/examples/udt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>org.eclipse.tahu</groupId>
<artifactId>tahu-examples</artifactId>
<version>1.0.5-SNAPSHOT</version>
<version>1.0.5</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion java/lib/core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>org.eclipse.tahu</groupId>
<artifactId>tahu</artifactId>
<version>1.0.5-SNAPSHOT</version>
<version>1.0.5</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ public class Metric {
private PropertySet properties;

@JsonProperty("value")
@JsonInclude(Include.NON_EMPTY)
private Object value;

private Boolean isNull = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,15 @@
import org.eclipse.tahu.SparkplugInvalidTypeException;

import com.fasterxml.jackson.annotation.JsonGetter;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonSetter;
import com.fasterxml.jackson.annotation.JsonInclude.Include;

/**
* A class to represent a parameter associated with a template.
*/
@JsonInclude(Include.NON_NULL)
public class Parameter {

/**
Expand All @@ -42,6 +45,7 @@ public class Parameter {
* The value of the parameter
*/
@JsonProperty("value")
@JsonInclude(Include.NON_EMPTY)
private Object value;

public Parameter() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -939,6 +939,7 @@ public void run() {
synchronized (clientLock) {
if (!attemptConnects) {
logger.info("{}: No longer attempting to connect", getClientId());
state.setInProgress(false);
return;
}

Expand Down Expand Up @@ -1004,6 +1005,7 @@ public void run() {
synchronized (clientLock) {
if (!attemptConnects) {
logger.info("{}: No longer attempting to connect", getClientId());
state.setInProgress(false);
return;
}

Expand Down
2 changes: 1 addition & 1 deletion java/lib/edge/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>org.eclipse.tahu</groupId>
<artifactId>tahu</artifactId>
<version>1.0.5-SNAPSHOT</version>
<version>1.0.5</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion java/lib/host/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>org.eclipse.tahu</groupId>
<artifactId>tahu</artifactId>
<version>1.0.5-SNAPSHOT</version>
<version>1.0.5</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ private int getThreadPoolExecutorIndex(String key, int numOfThreadPoolExecutors)
public void connectionLost(MqttServerName mqttServerName, MqttServerUrl url, MqttClientId clientId,
Throwable cause) {
logger.warn("Connection Lost to - {} :: {} :: {}", mqttServerName, url, clientId);
eventHandler.onDisconnect();

if (cause != null) {
// We don't need to see all of the connection lost callbacks for clients
Expand Down Expand Up @@ -234,6 +235,7 @@ public void connectionLost(MqttServerName mqttServerName, MqttServerUrl url, Mqt
public void connectComplete(boolean reconnect, MqttServerName server, MqttServerUrl url, MqttClientId clientId) {
// // Update the ONLINE Engine Info tag for the client
// updateEngineInfoDateTag(server, DATE_ONLINE);
eventHandler.onConnect();
}

private void updateEngineInfoDateTag(MqttServerName server, String tagName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,8 @@ protected void handleNodeDeath(MessageContext messageContext) {
incomingBdSeqNum = SparkplugUtil.getBdSequenceNumber(messageContext.getPayload());
if (sparkplugEdgeNode != null && incomingBdSeqNum != null) {
if (sparkplugEdgeNode.isOnline()) {
if (sparkplugEdgeNode.getBirthBdSeqNum() == incomingBdSeqNum) {
long birthBdSeqNum = sparkplugEdgeNode.getBirthBdSeqNum();
if (birthBdSeqNum == incomingBdSeqNum) {
eventHandler.onNodeDeath(edgeNodeDescriptor, messageContext.getMessage());
eventHandler.onMessage(edgeNodeDescriptor, messageContext.getMessage());
staleTags(edgeNodeDescriptor, sparkplugEdgeNode);
Expand All @@ -345,7 +346,7 @@ protected void handleNodeDeath(MessageContext messageContext) {
} else {
logger.error(
"Edge Node bdSeq number mismatch on incoming NDEATH from {} - received {}, expected {} - ignoring NDEATH",
edgeNodeDescriptor, incomingBdSeqNum, sparkplugEdgeNode.getBirthBdSeqNum());
edgeNodeDescriptor, incomingBdSeqNum, birthBdSeqNum);
}
} else {
logger.error("Edge Node '{}' is not online - ignoring NDEATH", edgeNodeDescriptor);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@

public interface HostApplicationEventHandler {

public void onConnect();

public void onDisconnect();

public void onMessage(SparkplugDescriptor sparkplugDescriptor, Message message);

public void onNodeBirthArrived(EdgeNodeDescriptor edgeNodeDescriptor, Message message);
Expand Down
2 changes: 1 addition & 1 deletion java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

<groupId>org.eclipse.tahu</groupId>
<artifactId>tahu</artifactId>
<version>1.0.5-SNAPSHOT</version>
<version>1.0.5</version>
<packaging>pom</packaging>

<name>Eclipse Tahu</name>
Expand Down
2 changes: 1 addition & 1 deletion javascript/core/sparkplug-payload/lib/sparkplugbpayload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ function setValue (type: number, value: UserValue, object: IMetric | IPropertyVa
case 3: // Int32
case 5: // UInt8
case 6: // UInt16
case 7: // UInt32
object.intValue = value as number;
break;
case 4: // Int64
case 7: // UInt32
case 8: // UInt64
case 13: // DateTime
object.longValue = value as number | Long;
Expand Down

0 comments on commit d6552c9

Please sign in to comment.