Skip to content

Commit

Permalink
Deserialize KNX extension in status properly
Browse files Browse the repository at this point in the history
  • Loading branch information
jimirocks committed Sep 16, 2023
1 parent 55478cc commit bdbdbee
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public Extension unmarshal(final Extension v) {
case "AO Extension":
case "AI Extension":
case "RS232 Extension":
case "KNX Extension":
return new BasicExtension(v);
case "Dali Extension":
return new DaliExtension(v);
Expand Down
3 changes: 2 additions & 1 deletion src/test/kotlin/system/status/MiniserverStatusTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,15 @@ class MiniserverStatusTest {
val ms = readResourceXml<MiniserverStatus>("system/status/status_13_1_Gen2.xml")

expectThat(ms) {
get { extensions }.hasSize(3)
get { extensions }.hasSize(5)
get { getExtensions(TreeExtension::class.java) }.hasSize(2).and {
get { firstOrNull { it.type == "BuiltIn Tree" } }.isNotNull().and {
get { serialNumber }.isEqualTo("13000001")
get { version }.isEqualTo("13.1.9.19")
get { rightBranch?.devices }.isNotNull().hasSize(1)
}
}
get { getExtensions(BasicExtension::class.java).filter { it.type == "KNX Extension" } }.hasSize(2)
}
}
}
2 changes: 2 additions & 0 deletions src/test/resources/system/status/status_13_1_Gen2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
<TreeDevice Code="-2147155787" Name="TL110.1 u vchodu" Place="110 Living room" Inst="" Serial="B02E0D29" Version="12.4.6.8" Online="true" LastReceived="2022-12-07 07:20:38" TimeDiff="1" DummyDev="false"/>
</TreeBranch>
</Extension>
<Extension Type="KNX Extension" Code="197" Name="KNX_2" Serial="15d81c94" Version="10.5.2.17" Online="true" IntDev="false" DummyDev="false"/>
<Extension Type="KNX Extension" Code="197" Name="KNX_3" Serial="15d81fa8" Version="10.5.2.17" Online="true" IntDev="false" DummyDev="false"/>
</Link>
</Miniserver>
<NetworkDevices Name="Audio" Type="NetworkDevices" Branch="14" Icon="225">
Expand Down

0 comments on commit bdbdbee

Please sign in to comment.