Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ Rem: The folder [your-local-project-folder]/SampleCommunicator/src/main/resource
</tr>
<tr>
<td><b>Description:</b></td>
<td><p>The 'TransportService' is the link to the physical communication interface of the 'Product'. The SGr Core Team provides the EasyModbus Library for Modbus.</p></td>
<td><p>The 'TransportService' is the link to the physical communication interface of the 'Product'. The SGr Core Team provides the j2mod-based library for Modbus.</p></td>
</tr>
<tr>
<td valign="top"><b>Responsibilities:</b></td>
Expand All @@ -162,14 +162,14 @@ Rem: The folder [your-local-project-folder]/SampleCommunicator/src/main/resource
<tr>
<td><b>Library:</b></td>
<td><p>
easymodbus<br />
sgr-driver-j2mod<br />
sgr-driver-apachehttp<br />
sgr-driver-hivemq</p>
</td>
</tr>
<tr>
<td><b>SGrProject:</b></td>
<td><p>für Modbus: <a href="https://github.com/SmartgridReady/SGrJavaDrivers/tree/master/EasyModbus">SmartgridReady/SGrJavaDrivers/EasyModbus</a></p>
<td><p>für Modbus: <a href="https://github.com/SmartgridReady/SGrJavaDrivers/tree/master/j2mod">SmartgridReady/SGrJavaDrivers/j2mod</a></p>
<p>für REST: <a href="https://github.com/SmartGridready/SGrJavaDrivers/tree/master/ApacheHttp">SmartgridReady/SGrJavaDrivers/ApacheHttp</a></p>
<p>für MQTT: <a href="https://github.com/SmartGridready/SGrJavaDrivers/tree/master/HiveMq">SmartgridReady/SGrJavaDrivers/HiveMq</a></p>
</td>
Expand Down
8 changes: 4 additions & 4 deletions SampleCommunicator/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ java {
dependencies {

// SGr dependencies
implementation group: 'com.smartgridready', name: 'sgr-commhandler', version: '2.1.0'
runtimeOnly group: 'com.smartgridready', name: 'easymodbus', version: '2.1.0'
runtimeOnly group: 'com.smartgridready', name: 'sgr-driver-apachehttp', version: '2.0.0'
runtimeOnly group: 'com.smartgridready', name: 'sgr-driver-hivemq', version: '2.0.0'
implementation group: 'com.smartgridready', name: 'sgr-commhandler', version: '2.4.0'
runtimeOnly group: 'com.smartgridready', name: 'sgr-driver-j2mod', version: '1.0.0'
runtimeOnly group: 'com.smartgridready', name: 'sgr-driver-apachehttp', version: '2.1.0'
runtimeOnly group: 'com.smartgridready', name: 'sgr-driver-hivemq', version: '2.0.1'

// Logging
implementation group: 'org.slf4j', name: 'slf4j-api', version: '2.0.10'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,12 @@ class RestClientFactory implements GenHttpClientFactory

@Override
public GenHttpRequest createHttpRequest()
{
return createHttpRequest(true);
}

@Override
public GenHttpRequest createHttpRequest(boolean verifyCertificate)
{
return new RestHttpRequest();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

/**
* Mock for a {@code GenDriverAPI4Modbus}.
* Implements deprecated methods, which will be removed in next major version.
*/
public class GenDriverAPI4ModbusMock implements GenDriverAPI4Modbus
{
Expand All @@ -33,7 +34,7 @@ public class GenDriverAPI4ModbusMock implements GenDriverAPI4Modbus
private static final int[] REGISTER_FLOAT_VAL = new int[] { 0x0000435c, 0x000051ec };

private final boolean returnInteger;

private boolean isConnected = false;

/**
Expand All @@ -47,6 +48,11 @@ public GenDriverAPI4ModbusMock(boolean returnInteger)
this.returnInteger = returnInteger;
}

@Override
public void setUnitIdentifier(short unitId) {
// not used in this mock
}

@Override
public int[] ReadInputRegisters(int startingAddress, int quantity)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
<requestQuery>
<parameter>
<name>target_t</name>
<value>{{value}}</value>
<value>[[value]]</value>
</parameter>
</requestQuery>
<responseQuery>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@
</readCmdMessage>
<writeCmdMessage>
<topic>actuator/anaolgue/voltage_dc_out1</topic>
<template>{ "set": {{value}} }</template>
<template>{ "set": [[value]] }</template>
</writeCmdMessage>
<inMessage>
<topic>actuator/analogue/voltage_dc_out1</topic>
Expand Down Expand Up @@ -633,7 +633,7 @@
</readCmdMessage>
<writeCmdMessage>
<topic>actuators/voltage_dc_out1</topic>
<template>{{value}}</template>
<template>[[value]]</template>
</writeCmdMessage>
<inMessage>
<topic>actuators/voltage_dc_out1</topic>
Expand Down Expand Up @@ -678,7 +678,7 @@
</readCmdMessage>
<writeCmdMessage>
<topic>actuators/voltage_dc_out2</topic>
<template>{{value}}</template>
<template>[[value]]</template>
</writeCmdMessage>
<inMessage>
<topic>actuators/voltage_dc_out2</topic>
Expand Down Expand Up @@ -725,7 +725,7 @@
</readCmdMessage>
<writeCmdMessage>
<topic>actuators/voltage_dc_out3</topic>
<template>{{value}}</template>
<template>[[value]]</template>
</writeCmdMessage>
<inMessage>
<topic>actuators/voltage_dc_out3</topic>
Expand Down Expand Up @@ -772,7 +772,7 @@
</readCmdMessage>
<writeCmdMessage>
<topic>actuators/voltage_dc_out4</topic>
<template>{{value}}</template>
<template>[[value]]</template>
</writeCmdMessage>
<inMessage>
<topic>actuators/voltage_dc_out4</topic>
Expand Down Expand Up @@ -819,7 +819,7 @@
</readCmdMessage>
<writeCmdMessage>
<topic>actuators/voltage_dc_out5</topic>
<template>{{value}}</template>
<template>[[value]]</template>
</writeCmdMessage>
<inMessage>
<topic>actuators/voltage_dc_out5</topic>
Expand Down Expand Up @@ -866,7 +866,7 @@
</readCmdMessage>
<writeCmdMessage>
<topic>actuators/voltage_dc_out6</topic>
<template>{{value}}</template>
<template>[[value]]</template>
</writeCmdMessage>
<inMessage>
<topic>actuators/voltage_dc_out6</topic>
Expand Down Expand Up @@ -911,7 +911,7 @@
</readCmdMessage>
<writeCmdMessage>
<topic>actuators/voltage_dc_out7</topic>
<template>{{value}}</template>
<template>[[value]]</template>
</writeCmdMessage>
<inMessage>
<topic>actuators/voltage_dc_out7</topic>
Expand Down Expand Up @@ -958,7 +958,7 @@
</readCmdMessage>
<writeCmdMessage>
<topic>actuators/voltage_dc_out8</topic>
<template>{{value}}</template>
<template>[[value]]</template>
</writeCmdMessage>
<inMessage>
<topic>actuators/voltage_dc_out8</topic>
Expand Down Expand Up @@ -1181,7 +1181,7 @@
</readCmdMessage>
<writeCmdMessage>
<topic>actuator/register_m1_out1</topic>
<template>{{value}}</template>
<template>[[value]]</template>
</writeCmdMessage>
<inMessage>
<topic>actuator/register_m1_out1</topic>
Expand Down