Skip to content

Commit 0a733d8

Browse files
committed
Only set DATA_NOT_VALID for first value in profile
Signed-off-by: stefanermens <stefan.ermens@alliander.com>
1 parent 895f4a9 commit 0a733d8

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

osgp/protocol-adapter-dlms/osgp-protocol-simulator-dlms/simulator/dlms-device-simulator/src/main/java/org/opensmartgridplatform/simulator/protocol/dlms/cosem/LoadProfileWithPeriod1.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,9 @@ private void initBufferData() {
143143

144144
for (int i = 0; i < PROFILE_ENTRIES; i++) {
145145
if (i == 0) {
146-
amrProfileStatusCode = 4;
146+
amrProfileStatusCode = 4; // DATA_NOT_VALID
147+
} else {
148+
amrProfileStatusCode = 0;
147149
}
148150
final Calendar cal = this.getNextDateTime();
149151
importValue += 1;

osgp/protocol-adapter-dlms/osgp-protocol-simulator-dlms/simulator/dlms-device-simulator/src/main/java/org/opensmartgridplatform/simulator/protocol/dlms/cosem/LoadProfileWithPeriod2.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,9 @@ private void initBufferData() {
190190

191191
for (int i = 0; i < PROFILE_ENTRIES; i++) {
192192
if (i == 0) {
193-
amrProfileStatusCode = 4;
193+
amrProfileStatusCode = 4; // DATA_NOT_VALID
194+
} else {
195+
amrProfileStatusCode = 0;
194196
}
195197
importRate1 += 1;
196198
importRate2 += 2;

0 commit comments

Comments
 (0)