Change in osmo-ttcn3-hacks[master]: StatsD_Types: Use 'present' qualifier; use template hierarchy

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Fri Aug 21 10:39:55 UTC 2020


laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/19753 )


Change subject: StatsD_Types: Use 'present' qualifier; use template hierarchy
......................................................................

StatsD_Types: Use 'present' qualifier; use template hierarchy

Change-Id: Ic9207e465bbee77d898d4d710a696656e43eac8d
---
M library/StatsD_Types.ttcn
1 file changed, 6 insertions(+), 13 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/53/19753/1

diff --git a/library/StatsD_Types.ttcn b/library/StatsD_Types.ttcn
index 546e469..861ae63 100644
--- a/library/StatsD_Types.ttcn
+++ b/library/StatsD_Types.ttcn
@@ -48,25 +48,18 @@
 	[0] := metric
 }
 
-template StatsDMetric tr_StatsDMetric(template MetricName name, template MetricValue val := ?, template MetricType mtype) := {
+template (present) StatsDMetric tr_StatsDMetric(template (present) MetricName name, template (present) MetricValue val := ?,
+						template (present) MetricType mtype) := {
 	name := name,
 	val := val,
 	mtype := mtype,
 	srate := *
 }
 
-template StatsDMetric tr_StatsDMetricCounter(template MetricName name, template MetricValue val := ?) := {
-	name := name,
-	val := val,
-	mtype := "c",
-	srate := *
-}
+template (present) StatsDMetric tr_StatsDMetricCounter(template (present) MetricName name, template (present) MetricValue val := ?) := 
+	tr_StatsDMetric(name, val, "c");
 
-template StatsDMetric tr_StatsDMetricGauge(template MetricName name, template MetricValue val := ?) := {
-	name := name,
-	val := val,
-	mtype := "g",
-	srate := *
-}
+template (present) StatsDMetric tr_StatsDMetricGauge(template (present) MetricName name, template (present) MetricValue val := ?) :=
+	tr_StatsDMetric(name, val, "g");
 
 } with { encode "TEXT" }

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/19753
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ic9207e465bbee77d898d4d710a696656e43eac8d
Gerrit-Change-Number: 19753
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200821/80a0d776/attachment.htm>


More information about the gerrit-log mailing list