From 737d5ac9b640d979a8c373b4b7015191a6ab55ea Mon Sep 17 00:00:00 2001 From: Manuel Krombholz <s3866577@msx.tu-dresden.de> Date: Tue, 17 Aug 2021 23:50:36 +0200 Subject: [PATCH] Add FrequencySetting for group in Marshalling test --- eraser-base/src/main/jastadd/Printing.jrag | 1 + eraser-base/src/test/resources/tests/ppc2/input.eraser | 2 +- eraser-base/src/test/resources/tests/ppc2/output.eraser | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/eraser-base/src/main/jastadd/Printing.jrag b/eraser-base/src/main/jastadd/Printing.jrag index b1761f17..65abe293 100644 --- a/eraser-base/src/main/jastadd/Printing.jrag +++ b/eraser-base/src/main/jastadd/Printing.jrag @@ -121,6 +121,7 @@ aspect Printing { .addIds("groups", getNumGroup(), getGroups()) .addIds("items", getNumItem(), getItems()) .addOptionalPrettyPrint(getAggregationFunction()) + .addOptional("performance", hasFrequencySetting(), () -> getFrequencySetting().getID()) .build(); } diff --git a/eraser-base/src/test/resources/tests/ppc2/input.eraser b/eraser-base/src/test/resources/tests/ppc2/input.eraser index a2793872..2eb128e3 100644 --- a/eraser-base/src/test/resources/tests/ppc2/input.eraser +++ b/eraser-base/src/test/resources/tests/ppc2/input.eraser @@ -1,6 +1,6 @@ Mqtt: incoming="ppc2/" outgoing="oh2/in" host="localhost" ; Item: id="iris1_item" label="Iris 1" state="121,88,68" topic="iris1_item/state" performance="ip1" ; -Group: id="my-group" items=["iris1_item"] ; +Group: id="my-group" items=["iris1_item"] performance="ip1" ; ThingType: id="skywriter-hat" label="SkyWriterHAT" description="SkyWriterHAT Gesture Recognition" parameters=["brokername"] channelTypes=["flick-type"] ; ChannelType: id="flick-type" itemType="String" label="Last Flick" description="Last Flick detected (and its direction)" category="Motion" readOnly ; Parameter: id="brokername" type="text" required label="Broker Name" description="Name of the broker as defined in the <broker>.url in services/mqtt.cfg. See the MQTT Binding for more information on how to configure MQTT broker connections." context="service" default="mosquitto" ; diff --git a/eraser-base/src/test/resources/tests/ppc2/output.eraser b/eraser-base/src/test/resources/tests/ppc2/output.eraser index 30855cfc..43800ce4 100644 --- a/eraser-base/src/test/resources/tests/ppc2/output.eraser +++ b/eraser-base/src/test/resources/tests/ppc2/output.eraser @@ -1,5 +1,5 @@ Item: id="iris1_item" label="Iris 1" state="121,88,68" topic="iris1_item/state" performance="ip1" ; -Group: id="my-group" items=["iris1_item"] ; +Group: id="my-group" items=["iris1_item"] performance="ip1" ; ThingType: id="skywriter-hat" label="SkyWriterHAT" description="SkyWriterHAT Gesture Recognition" parameters=["brokername"] channelTypes=["flick-type"] ; ChannelType: id="flick-type" label="Last Flick" description="Last Flick detected (and its direction)" itemType="String" category="Motion" readOnly ; Parameter: id="brokername" label="Broker Name" description="Name of the broker as defined in the <broker>.url in services/mqtt.cfg. See the MQTT Binding for more information on how to configure MQTT broker connections." type="Text" context="service" default="mosquitto" required ; -- GitLab