bts: Test if BTS forwards ETWS Primary Notification to PCU

All MS/UE must be notified of ETWS Primary Notifiations.

Depending on their state, the notification goes different paths:
* CS dedicated mode: BSC sends it as L3 message over LAPDm / DCCH
* CS/PS idle mode: BTS sends paging messages on PCH
* PS TBF active: PCU send Packet Application Info

This tests the last of the three methods by checking that a  ETWS Primary
Notification sent on RSL to the BTS is received by the PCU socket.

Change-Id: I2661df7f7d870a0ac1c89bb8a85df81644b00b0a
Related: OS#4047, OS#4048
Depends: osmo-bts Ic0b3f38b400a0ca7e4089061ceb6548b0695faa6
diff --git a/library/PCUIF_Types.ttcn b/library/PCUIF_Types.ttcn
index 551081b..721eb64 100644
--- a/library/PCUIF_Types.ttcn
+++ b/library/PCUIF_Types.ttcn
@@ -22,6 +22,7 @@
 	PCU_IF_MSG_DATA_CNF		('01'O),
 	PCU_IF_MSG_DATA_IND		('02'O),
 	PCU_IF_MSG_SUSP_REQ		('03'O),
+	PCU_IF_MSG_APP_INFO_REQ		('04'O),
 	PCU_IF_MSG_RTS_REQ		('10'O),
 	PCU_IF_MSG_DATA_CNF_DT		('11'O),
 	PCU_IF_MSG_RACH_IND		('22'O),
@@ -203,6 +204,14 @@
 	OCT9		identity_lv
 } with { variant "" };
 
+type record PCUIF_app_info_req {
+	uint8_t		application_type,
+	uint8_t		len,
+	octetstring	data
+} with {
+	variant (len) "LENGTHTO(data)"
+}
+
 type record PCUIF_susp_req {
 	OCT4		tlli,
 	OCT6		ra_id,
@@ -224,7 +233,8 @@
 	PCUIF_info_ind		info_ind,
 	PCUIF_act_req		act_req,
 	PCUIF_time_ind		time_ind,
-	PCUIF_pag_req		pag_req
+	PCUIF_pag_req		pag_req,
+	PCUIF_app_info_req	app_info_req
 } with { variant "" };
 
 type record PCUIF_Message {
@@ -244,7 +254,8 @@
 				info_ind,	msg_type = PCU_IF_MSG_INFO_IND;
 				act_req,	msg_type = PCU_IF_MSG_ACT_REQ;
 				time_ind,	msg_type = PCU_IF_MSG_TIME_IND;
-				pag_req,	msg_type = PCU_IF_MSG_PAG_REQ)"
+				pag_req,	msg_type = PCU_IF_MSG_PAG_REQ;
+				app_info_req,	msg_type = PCU_IF_MSG_APP_INFO_REQ)"
 	 variant "PADDING(1696)" /* 212 * 8 */
 };
 
@@ -817,5 +828,34 @@
 	}
 }
 
+template (value) PCUIF_Message ts_PCUIF_APP_INFO_REQ(template (value) uint8_t bts_nr,
+						     template (value) uint8_t app_type,
+						     template (value) octetstring app_data) := {
+	msg_type := PCU_IF_MSG_APP_INFO_REQ,
+	bts_nr := bts_nr,
+	spare := '0000'O,
+	u := {
+		app_info_req := {
+			application_type := app_type,
+			len := 0, /* overwritten */
+			data := app_data
+		}
+	}
+}
+template (present) PCUIF_Message tr_PCUIF_APP_INFO_REQ(template (present) uint8_t bts_nr,
+						       template (present) uint8_t app_type,
+						       template (present) octetstring app_data) := {
+	msg_type := PCU_IF_MSG_APP_INFO_REQ,
+	bts_nr := bts_nr,
+	spare := '0000'O,
+	u := {
+		app_info_req := {
+			application_type := app_type,
+			len := ?,
+			data := app_data
+		}
+	}
+}
+
 
 } with { encode "RAW" variant "BYTEORDER(first)" };