pcu: Verify CodingScheme of received data blocks

Change-Id: I0a5247650548f8a03f7b025aae65652fb424c156
diff --git a/library/RLCMAC_Types.ttcn b/library/RLCMAC_Types.ttcn
index 8f9f2a5..dbcf4ae 100644
--- a/library/RLCMAC_Types.ttcn
+++ b/library/RLCMAC_Types.ttcn
@@ -41,6 +41,67 @@
 		return 0;
 	}
 
+	type enumerated CodingScheme {
+		CS_1,
+		CS_2,
+		CS_3,
+		CS_4,
+		MCS_1,
+		MCS_2,
+		MCS_3,
+		MCS_4,
+		MCS_5,
+		MCS_6,
+		MCS_7,
+		MCS_8,
+		MCS_9
+		//MCS5_7, ?
+		// MCS6_9 ?
+	};
+
+	function f_rlcmac_cs_mcs2block_len(CodingScheme cs_mcs) return uint32_t {
+		select (cs_mcs) {
+		case (CS_1) { return 23; }
+		case (CS_2) { return 34; }
+		case (CS_3) { return 40; }
+		case (CS_4) { return 54; }
+		case (MCS_1) { return 27; }
+		case (MCS_2) { return 33; }
+		case (MCS_3) { return 42; }
+		case (MCS_4) { return 49; }
+		case (MCS_5) { return 61; }
+		case (MCS_6) { return 79; }
+		case (MCS_7) { return 119; }
+		case (MCS_8) { return 143; }
+		case (MCS_9) { return 155; }
+		}
+		return 0;
+	}
+
+	function f_rlcmac_block_len2cs_mcs(uint32_t len) return CodingScheme {
+		select (len) {
+			case (23) { return CS_1; }
+			case (34) { return CS_2; }
+			case (40) { return CS_3; }
+			case (54) { return CS_4; }
+			case (27) { return MCS_1; }
+			case (33) { return MCS_2; }
+			case (42) { return MCS_3; }
+			case (49) { return MCS_4; }
+			case (60) { return MCS_5; }
+			case (61) { return MCS_5; }
+			case (78) { return MCS_6; }
+			case (79) { return MCS_6; }
+			case (118) { return MCS_7; }
+			case (119) { return MCS_7; }
+			case (142) { return MCS_8; }
+			case (143) { return MCS_8; }
+			case (154) { return MCS_9; }
+			case (155) { return MCS_9; }
+		}
+		return CS_1;
+	}
+
 	/* Partof DL RLC data block and DL RLC/MAC ctrl block */
 	type record DlMacHeader {
 		MacPayloadType	payload_type,