aboutsummaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2019-09-06 00:08:17 +0200
committerfixeria <axilirator@gmail.com>2019-09-27 03:17:50 +0000
commitf7d9c0f22ba8d88171a242fcbe21187c3da5d76b (patch)
treec51184a1c569284c9682a01eff42cbcf0c00b5b2 /library
parent02acf82e94c3138be29c06e088ea892fbcca6d8d (diff)
Introduce PCUIF, BTS and ClckGen components for RAW PCU test cases
The problem of existing test cases is that they mix IUT (i.e. OsmoPCU) with OsmoBTS (osmo-bts-virtual) and OsmocomBB (virt_phy). This approach allows to avoid dealing with TDMA clock indications and RTS requests on the PCU interface - this is done by OsmoBTS. On the other hand, our test scenarios may be potentially affected by undiscovered bugs in OsmoBTS and the virt_phy. In order to solve that problem, this change introduces a set of new components and the corresponding handler functions: - RAW_PCUIF_CT / f_PCUIF_CT_handler() - PCU interface (UNIX domain socket) handler. Creates a server listening for incoming connections on a given 'pcu_sock_path', handles connection establishment and message forwarding between connected BTS components (see below) and OsmoPCU. - RAW_PCU_BTS_CT / f_BTS_CT_handler() - represents a single BTS entity, connected to OsmoPCU through the RAW_PCUIF_CT. Takes care about sending System Information 13 to OsmoPCU, forwarding TDMA clock indications from a dedicated ClckGen component (see below), and filtering the received messages by the BTS number. Implements minimalistic scheduler for both DATA.ind and RTS.req messages, so they are send in accordance with the current TDMA frame number. - RAW_PCU_ClckGen_CT / f_ClckGen_CT_handler() - TDMA frame clock counter built on top of a timer. Sends clock indications to the BTS component. All components communicate using TTCN-3 ports and explicitly defined sets of messages (see RAW_PCU_MSG_PT). One noticeable kind of such messages is events (see RAW_PCU_Event and RAW_PCU_EventType). That's how e.g. the PCUIF component can notify the BTS component that OsmoPCU has just connected, or the BTS component can notify the MTC that SI13 negotiation is completed. Events may optionally have parameters (e.g. frame-number for TDMA_EV_*). Furthermore, the proposed set of components allows to have more than one BTS entity, so we can also test multi-BTS operation in the future. +-----+ +----------+ +---------+ | MTC +---------------+ PCUIF_CT +------+ OsmoPCU | +--+--+ +----+-----+ +---------+ | | | | | | | +-----------+ | +---------------+ +----+ BTS_CT #1 +------+ | ClckGen_CT #1 | | +-----+-----+ | +-------+-------+ | | | | | +---------------------------+ | | | +-----------+ | +---------------+ +----+ BTS_CT #2 +------+ | ClckGen_CT #2 | | +-----+-----+ | +-------+-------+ | | | | | +---------------------------+ | | | +-----------+ | +---------------+ +----+ BTS_CT #N +------+ | ClckGen_CT #N | +-----+-----+ +-------+-------+ | | +---------------------------+ Change-Id: I63a23abebab88fd5318eb4d907d6028e7c38e9a3
Diffstat (limited to 'library')
-rw-r--r--library/PCUIF_Types.ttcn9
1 files changed, 9 insertions, 0 deletions
diff --git a/library/PCUIF_Types.ttcn b/library/PCUIF_Types.ttcn
index f13a7645..bcd90666 100644
--- a/library/PCUIF_Types.ttcn
+++ b/library/PCUIF_Types.ttcn
@@ -260,6 +260,15 @@ external function dec_PCUIF_Message(in octetstring stream) return PCUIF_Message
with { extension "prototype(convert) decode(RAW)" };
+/* Generic template for matching messages by type and/or the BTS number */
+template PCUIF_Message tr_PCUIF_MSG(template PCUIF_MsgType msg_type := ?,
+ template uint8_t bts_nr := ?) := {
+ msg_type := msg_type,
+ bts_nr := bts_nr,
+ spare := ?,
+ u := ?
+}
+
template (value) PCUIF_Message ts_PCUIF_RTS_REQ(template (value) uint8_t bts_nr,
template (value) uint8_t trx_nr,
template (value) uint8_t ts_nr,