lib/CTRL: Improve and add more helper templates and functions
Change-Id: Icc6ac860ebd6a719f9e0cb5c5345fb4d39a864ce
diff --git a/library/Osmocom_CTRL_Types.ttcn b/library/Osmocom_CTRL_Types.ttcn
index 5c4527e..52be956 100644
--- a/library/Osmocom_CTRL_Types.ttcn
+++ b/library/Osmocom_CTRL_Types.ttcn
@@ -94,6 +94,50 @@
}
}
+template CtrlMessage ts_CtrlMsgTrap(CtrlVariable variable, template (omit) CtrlValue val := omit) := {
+ trap := {
+ variable := variable,
+ val := val
+ }
+}
+
+template CtrlMessage ts_CtrlMsgGetRepl(CtrlId id, CtrlVariable variable, CtrlValue val) := {
+ resp := {
+ verb := "GET_REPLY",
+ id := id,
+ variable := variable,
+ val := val
+ }
+};
+
+template CtrlMessage ts_CtrlMsgSetRepl(CtrlId id, CtrlVariable variable, CtrlValue val) := {
+ resp := {
+ verb := "SET_REPLY",
+ id := id,
+ variable := variable,
+ val := val
+ }
+}
+
+template CtrlMessage tr_CtrlMsgGet(template CtrlId id, template CtrlVariable variable := ?) := {
+ cmd := {
+ verb := "GET",
+ id := id,
+ variable := variable,
+ val := ?
+ }
+}
+
+template CtrlMessage tr_CtrlMsgSet(template CtrlId id, template CtrlVariable variable := ?,
+ template CtrlValue val := ?) := {
+ cmd := {
+ verb := "SET",
+ id := id,
+ variable := variable,
+ val := val
+ }
+}
+
template CtrlMessage tr_CtrlMsgGetRepl(template CtrlId id, template CtrlVariable variable := ?) := {
resp := {
verb := "GET_REPLY",