Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/smhe 1845 object config activity calendar #1121

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ Feature: SmartMetering Bundle - SetActivityCalendar
As a grid operator
I want to be able to set activity calendar on a meter via a bundle request

Background:
Scenario Outline: Set activity calendar on a device in a bundle request
Given a dlms device
| DeviceIdentification | TEST1024000000001 |
| DeviceType | SMART_METER_E |

Scenario: Set activity calendar on a device in a bundle request
Given a bundle request
| DeviceIdentification | TEST1024000000001 |
| DeviceIdentification | <deviceIdentification> |
| DeviceType | SMART_METER_E |
| Protocol | <protocol> |
| ProtocolVersion | <version> |
And a bundle request
| DeviceIdentification | <deviceIdentification> |
And an activity calendar
| ActivityCalendarName | CALENDAR |
| ActivatePassiveCalendarTime | FFFFFFFEFFFFFFFFFF000000 |
Expand Down Expand Up @@ -71,3 +71,13 @@ Feature: SmartMetering Bundle - SetActivityCalendar
When the bundle request is received
Then the bundle response should contain a set special days response with values
| Result | OK |

Examples:
| deviceIdentification | protocol | version |
| TEST1024000000002 | DSMR | 2.2 |
| TEST1024000000002 | DSMR | 4.2.2 |
| TEST1031000000002 | SMR | 4.3 |
| TEST1027000000002 | SMR | 5.0.0 |
| TEST1028000000002 | SMR | 5.1 |
| TEST1028000000002 | SMR | 5.2 |
| TEST1028000000002 | SMR | 5.5 |
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,23 @@ Feature: SmartMetering Configuration - Set Activity Calendar
I want to be able to set the activity calendar on a device
In order to ensure proper tarriffication on the device

Scenario: Use wildcards for set activity calendar
Scenario Outline: Use wildcards for set activity calendar
Given a dlms device
| DeviceIdentification | TEST1024000000001 |
| DeviceType | SMART_METER_E |
| DeviceIdentification | <deviceIdentification> |
| DeviceType | SMART_METER_E |
| Protocol | <protocol> |
| ProtocolVersion | <version> |
When the set activity calendar request is received
| DeviceIdentification | TEST1024000000001 |
| DeviceIdentification | <deviceIdentification> |
Then the activity calendar profiles are set on the device
| DeviceIdentification | TEST1024000000001 |
| DeviceIdentification | <deviceIdentification> |

Examples:
| deviceIdentification | protocol | version |
| TEST1024000000002 | DSMR | 2.2 |
| TEST1024000000002 | DSMR | 4.2.2 |
| TEST1031000000002 | SMR | 4.3 |
| TEST1027000000002 | SMR | 5.0.0 |
| TEST1028000000002 | SMR | 5.1 |
| TEST1028000000002 | SMR | 5.2 |
| TEST1028000000002 | SMR | 5.5 |
7 changes: 7 additions & 0 deletions osgp/protocol-adapter-dlms/osgp-dlms/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ SPDX-License-Identifier: Apache-2.0
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${maven.jar.plugin.version}</version>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,12 @@

@Getter
@NoArgsConstructor
@JsonTypeInfo(use = Id.NAME, property = "class-id", visible = true)
@JsonTypeInfo(use = Id.NAME, property = "class-id", visible = true, defaultImpl = CosemObject.class)
abolder marked this conversation as resolved.
Show resolved Hide resolved
@JsonSubTypes({
@JsonSubTypes.Type(value = Data.class, name = "1"),
@JsonSubTypes.Type(value = Register.class, name = "3"),
@JsonSubTypes.Type(value = ExtendedRegister.class, name = "4"),
@JsonSubTypes.Type(value = ProfileGeneric.class, name = "7"),
@JsonSubTypes.Type(value = CosemObject.class, name = "8"),
@JsonSubTypes.Type(value = CosemObject.class, name = "22"),
@JsonSubTypes.Type(value = CosemObject.class, name = "40"),
@JsonSubTypes.Type(value = CosemObject.class, name = "47"),
@JsonSubTypes.Type(value = CosemObject.class, name = "72"),
@JsonSubTypes.Type(value = CosemObject.class, name = "77")
})
public class CosemObject {
protected String tag;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ public enum DlmsObjectType {
READ_MBUS_STATUS,
CLEAR_MBUS_STATUS,
PHASE_OUTAGE_TEST,
LAST_GASP_TEST;
LAST_GASP_TEST,
ACTIVITY_CALENDAR;

public String value() {
return this.name();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -989,6 +989,81 @@
"access": "R"
}
]
},
{
"tag": "ACTIVITY_CALENDAR",
"description": "Activity calendar",
"note": null,
"class-id": 20,
"version": 0,
"obis": "0.0.13.0.0.255",
"group": "ABSTRACT",
"meterTypes": ["SP","PP"],
"attributes": [
{
"id": 2,
"description": "calendar_name_active",
"datatype": "octet-string",
"valuetype": "DYNAMIC",
kroesctrl marked this conversation as resolved.
Show resolved Hide resolved
"access": "R"
},
{
"id": 3,
"description": "season_profile_active",
"datatype": "array",
"valuetype": "DYNAMIC",
"access": "R"
},
{
"id": 4,
"description": "week_profile_table_active",
"datatype": "array",
"valuetype": "DYNAMIC",
"access": "R"
},
{
"id": 5,
"description": "day_profile_table_active",
"datatype": "array",
"valuetype": "DYNAMIC",
"access": "R"
},
{
"id": 6,
"description": "calendar_name_passive",
"datatype": "octet-string",
"valuetype": "SET_BY_CLIENT",
"access": "RW"
},
{
"id": 7,
"description": "season_profile_passive",
"datatype": "array",
"valuetype": "SET_BY_CLIENT",
"access": "RW"
},
{
"id": 8,
"description": "week_profile_table_passive",
"datatype": "array",
"valuetype": "SET_BY_CLIENT",
"access": "RW"
},
{
"id": 9,
"description": "day_profile_table_passive",
"datatype": "array",
"valuetype": "SET_BY_CLIENT",
"access": "RW"
},
{
"id": 10,
"description": "activate_passive_calendar_time",
"datatype": "octet-string",
"valuetype": "SET_BY_CLIENT",
"access": "RW"
}
]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -2036,6 +2036,81 @@
"access": "R"
}
]
},
{
"tag": "ACTIVITY_CALENDAR",
"description": "Activity calendar",
"note": null,
"class-id": 20,
"version": 0,
"obis": "0.0.13.0.0.255",
"group": "ABSTRACT",
"meterTypes": ["SP","PP"],
"attributes": [
{
"id": 2,
"description": "calendar_name_active",
"datatype": "octet-string",
"valuetype": "DYNAMIC",
"access": "R"
},
{
"id": 3,
"description": "season_profile_active",
"datatype": "array",
"valuetype": "DYNAMIC",
"access": "R"
},
{
"id": 4,
"description": "week_profile_table_active",
"datatype": "array",
"valuetype": "DYNAMIC",
"access": "R"
},
{
"id": 5,
"description": "day_profile_table_active",
"datatype": "array",
"valuetype": "DYNAMIC",
"access": "R"
},
{
"id": 6,
"description": "calendar_name_passive",
"datatype": "octet-string",
"valuetype": "SET_BY_CLIENT",
"access": "RW"
},
{
"id": 7,
"description": "season_profile_passive",
"datatype": "array",
"valuetype": "SET_BY_CLIENT",
"access": "RW"
},
{
"id": 8,
"description": "week_profile_table_passive",
"datatype": "array",
"valuetype": "SET_BY_CLIENT",
"access": "RW"
},
{
"id": 9,
"description": "day_profile_table_passive",
"datatype": "array",
"valuetype": "SET_BY_CLIENT",
"access": "RW"
},
{
"id": 10,
"description": "activate_passive_calendar_time",
"datatype": "octet-string",
"valuetype": "SET_BY_CLIENT",
"access": "RW"
}
]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -2216,6 +2216,81 @@
"access": "R"
}
]
},
{
"tag": "ACTIVITY_CALENDAR",
"description": "Activity calendar",
"note": null,
"class-id": 20,
"version": 0,
"obis": "0.0.13.0.0.255",
"group": "ABSTRACT",
"meterTypes": ["SP","PP"],
"attributes": [
{
"id": 2,
"description": "calendar_name_active",
"datatype": "octet-string",
"valuetype": "DYNAMIC",
"access": "R"
},
{
"id": 3,
"description": "season_profile_active",
"datatype": "array",
"valuetype": "DYNAMIC",
"access": "R"
},
{
"id": 4,
"description": "week_profile_table_active",
"datatype": "array",
"valuetype": "DYNAMIC",
"access": "R"
},
{
"id": 5,
"description": "day_profile_table_active",
"datatype": "array",
"valuetype": "DYNAMIC",
"access": "R"
},
{
"id": 6,
"description": "calendar_name_passive",
"datatype": "octet-string",
"valuetype": "SET_BY_CLIENT",
"access": "RW"
},
{
"id": 7,
"description": "season_profile_passive",
"datatype": "array",
"valuetype": "SET_BY_CLIENT",
"access": "RW"
},
{
"id": 8,
"description": "week_profile_table_passive",
"datatype": "array",
"valuetype": "SET_BY_CLIENT",
"access": "RW"
},
{
"id": 9,
"description": "day_profile_table_passive",
"datatype": "array",
"valuetype": "SET_BY_CLIENT",
"access": "RW"
},
{
"id": 10,
"description": "activate_passive_calendar_time",
"datatype": "octet-string",
"valuetype": "SET_BY_CLIENT",
"access": "RW"
}
]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@

@Getter
public enum Protocol {
DSMR_2_2("DSMR", "2.2", 31, 2, 4, 6, 14, 0, 0, 0, 0, false, false),
DSMR_4_2_2("DSMR", "4.2.2", 55, 11, 27, 6, 14, 6, 13, 5, 6, true, false),
SMR_4_3("SMR", "4.3", 56, 11, 27, 6, 14, 6, 13, 6, 7, true, false),
SMR_5_0_0("SMR", "5.0.0", 59, 11, 27, 6, 14, 6, 15, 9, 14, true, true),
SMR_5_1("SMR", "5.1", 61, 11, 27, 6, 14, 6, 15, 9, 14, true, true),
SMR_5_2("SMR", "5.2", 64, 11, 27, 6, 14, 6, 15, 10, 15, true, true),
SMR_5_5("SMR", "5.5", 68, 11, 27, 6, 14, 6, 15, 10, 15, true, true);
DSMR_2_2("DSMR", "2.2", 32, 2, 4, 6, 14, 0, 0, 0, 0, false, false),
DSMR_4_2_2("DSMR", "4.2.2", 56, 11, 27, 6, 14, 6, 13, 5, 6, true, false),
SMR_4_3("SMR", "4.3", 57, 11, 27, 6, 14, 6, 13, 6, 7, true, false),
SMR_5_0_0("SMR", "5.0.0", 60, 11, 27, 6, 14, 6, 15, 9, 14, true, true),
SMR_5_1("SMR", "5.1", 62, 11, 27, 6, 14, 6, 15, 9, 14, true, true),
SMR_5_2("SMR", "5.2", 65, 11, 27, 6, 14, 6, 15, 10, 15, true, true),
SMR_5_5("SMR", "5.5", 69, 11, 27, 6, 14, 6, 15, 10, 15, true, true);

private final String name;
private final String version;
Expand Down
8 changes: 8 additions & 0 deletions osgp/protocol-adapter-dlms/osgp-protocol-adapter-dlms/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,14 @@ SPDX-License-Identifier: Apache-2.0
</dependency>

<!-- Testing dependencies -->
<dependency>
<groupId>org.opensmartgridplatform</groupId>
<artifactId>osgp-dlms</artifactId>
<version>${osgp.dlms.version}</version>
<classifier>tests</classifier>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
Expand Down
Loading