Introduce NM RadioCarrier FSM

Change-Id: Ieed61d1fb1e896db42545c2c3421b20cb41ad549
diff --git a/tests/abis/Makefile.am b/tests/abis/Makefile.am
index cee3d6f..756d9f5 100644
--- a/tests/abis/Makefile.am
+++ b/tests/abis/Makefile.am
@@ -36,6 +36,7 @@
 	$(top_builddir)/src/osmo-bsc/nm_bts_sm_fsm.o \
 	$(top_builddir)/src/osmo-bsc/nm_bts_fsm.o \
 	$(top_builddir)/src/osmo-bsc/nm_bb_transc_fsm.o \
+	$(top_builddir)/src/osmo-bsc/nm_rcarrier_fsm.o \
 	$(LIBOSMOCORE_LIBS) \
 	$(LIBOSMOABIS_LIBS) \
 	$(LIBOSMOGSM_LIBS) \
diff --git a/tests/acc/Makefile.am b/tests/acc/Makefile.am
index d8ce5ea..1b3b095 100644
--- a/tests/acc/Makefile.am
+++ b/tests/acc/Makefile.am
@@ -36,6 +36,7 @@
 	$(top_builddir)/src/osmo-bsc/nm_bts_sm_fsm.o \
 	$(top_builddir)/src/osmo-bsc/nm_bts_fsm.o \
 	$(top_builddir)/src/osmo-bsc/nm_bb_transc_fsm.o \
+	$(top_builddir)/src/osmo-bsc/nm_rcarrier_fsm.o \
 	$(LIBOSMOCORE_LIBS) \
 	$(LIBOSMOABIS_LIBS) \
 	$(LIBOSMOGSM_LIBS) \
diff --git a/tests/acc/acc_test.ok b/tests/acc/acc_test.ok
index 7d79ee6..76b823b 100644
--- a/tests/acc/acc_test.ok
+++ b/tests/acc/acc_test.ok
@@ -1,6 +1,7 @@
 ===test_acc_mgr_no_ramp===
 NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
 (bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
 BTS allocation OK in test_acc_mgr_no_ramp()
@@ -111,10 +112,12 @@
 NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
 NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
 NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
 BTS deallocated OK in test_acc_mgr_no_ramp()
 ===test_acc_mgr_manual_ramp===
 NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
 (bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
 BTS allocation OK in test_acc_mgr_manual_ramp()
@@ -355,10 +358,12 @@
 NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
 NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
 NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
 BTS deallocated OK in test_acc_mgr_manual_ramp()
 ===test_acc_mgr_rotate(true, 1)===
 NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
 (bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
 BTS allocation OK in test_acc_mgr_rotate()
@@ -430,10 +435,12 @@
 NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
 NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
 NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
 BTS deallocated OK in test_acc_mgr_rotate()
 ===test_acc_mgr_rotate(false, 1)===
 NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
 (bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
 BTS allocation OK in test_acc_mgr_rotate()
@@ -502,10 +509,12 @@
 NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
 NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
 NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
 BTS deallocated OK in test_acc_mgr_rotate()
 ===test_acc_mgr_rotate(true, 2)===
 NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
 (bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
 BTS allocation OK in test_acc_mgr_rotate()
@@ -577,10 +586,12 @@
 NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
 NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
 NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
 BTS deallocated OK in test_acc_mgr_rotate()
 ===test_acc_mgr_rotate(false, 2)===
 NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
 (bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
 BTS allocation OK in test_acc_mgr_rotate()
@@ -649,10 +660,12 @@
 NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
 NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
 NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
 BTS deallocated OK in test_acc_mgr_rotate()
 ===test_acc_mgr_rotate(true, 3)===
 NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
 (bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
 BTS allocation OK in test_acc_mgr_rotate()
@@ -724,10 +737,12 @@
 NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
 NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
 NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
 BTS deallocated OK in test_acc_mgr_rotate()
 ===test_acc_mgr_rotate(false, 3)===
 NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
 (bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
 BTS allocation OK in test_acc_mgr_rotate()
@@ -796,10 +811,12 @@
 NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
 NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
 NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
 BTS deallocated OK in test_acc_mgr_rotate()
 ===test_acc_mgr_rotate(true, 4)===
 NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
 (bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
 BTS allocation OK in test_acc_mgr_rotate()
@@ -871,10 +888,12 @@
 NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
 NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
 NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
 BTS deallocated OK in test_acc_mgr_rotate()
 ===test_acc_mgr_rotate(false, 4)===
 NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
 (bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
 BTS allocation OK in test_acc_mgr_rotate()
@@ -943,10 +962,12 @@
 NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
 NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
 NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
 BTS deallocated OK in test_acc_mgr_rotate()
 ===test_acc_mgr_rotate(true, 5)===
 NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
 (bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
 BTS allocation OK in test_acc_mgr_rotate()
@@ -1018,10 +1039,12 @@
 NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
 NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
 NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
 BTS deallocated OK in test_acc_mgr_rotate()
 ===test_acc_mgr_rotate(false, 5)===
 NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
 (bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
 BTS allocation OK in test_acc_mgr_rotate()
@@ -1090,10 +1113,12 @@
 NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
 NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
 NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
 BTS deallocated OK in test_acc_mgr_rotate()
 ===test_acc_mgr_rotate(true, 6)===
 NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
 (bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
 BTS allocation OK in test_acc_mgr_rotate()
@@ -1165,10 +1190,12 @@
 NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
 NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
 NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
 BTS deallocated OK in test_acc_mgr_rotate()
 ===test_acc_mgr_rotate(false, 6)===
 NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
 (bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
 BTS allocation OK in test_acc_mgr_rotate()
@@ -1237,10 +1264,12 @@
 NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
 NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
 NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
 BTS deallocated OK in test_acc_mgr_rotate()
 ===test_acc_mgr_rotate(true, 7)===
 NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
 (bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
 BTS allocation OK in test_acc_mgr_rotate()
@@ -1312,10 +1341,12 @@
 NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
 NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
 NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
 BTS deallocated OK in test_acc_mgr_rotate()
 ===test_acc_mgr_rotate(false, 7)===
 NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
 (bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
 BTS allocation OK in test_acc_mgr_rotate()
@@ -1384,10 +1415,12 @@
 NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
 NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
 NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
 BTS deallocated OK in test_acc_mgr_rotate()
 ===test_acc_mgr_rotate(true, 8)===
 NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
 (bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
 BTS allocation OK in test_acc_mgr_rotate()
@@ -1459,10 +1492,12 @@
 NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
 NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
 NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
 BTS deallocated OK in test_acc_mgr_rotate()
 ===test_acc_mgr_rotate(false, 8)===
 NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
 (bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
 BTS allocation OK in test_acc_mgr_rotate()
@@ -1531,10 +1566,12 @@
 NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
 NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
 NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
 BTS deallocated OK in test_acc_mgr_rotate()
 ===test_acc_mgr_rotate(false, 9)===
 NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
 (bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
 BTS allocation OK in test_acc_mgr_rotate()
@@ -1603,10 +1640,12 @@
 NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
 NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
 NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
 BTS deallocated OK in test_acc_mgr_rotate()
 ===test_acc_ramp===
 NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
 (bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
 BTS allocation OK in test_acc_ramp()
@@ -1644,10 +1683,12 @@
 NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
 NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
 NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
 BTS deallocated OK in test_acc_ramp()
 ===test_acc_ramp2===
 NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
 (bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
 BTS allocation OK in test_acc_ramp2()
@@ -1667,10 +1708,12 @@
 NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
 NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
 NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
 BTS deallocated OK in test_acc_ramp2()
 ===test_acc_ramp3===
 NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
 (bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
 BTS allocation OK in test_acc_ramp3()
@@ -1706,10 +1749,12 @@
 NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
 NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
 NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
 BTS deallocated OK in test_acc_ramp3()
 ===test_acc_ramp_up_rotate(0, 100, 100)===
 NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
 (bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
 BTS allocation OK in test_acc_ramp_up_rotate()
@@ -1801,10 +1846,12 @@
 NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
 NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
 NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
 BTS deallocated OK in test_acc_ramp_up_rotate()
 ===test_acc_ramp_up_rotate(0, 20, 50)===
 NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
 (bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
 BTS allocation OK in test_acc_ramp_up_rotate()
@@ -1896,10 +1943,12 @@
 NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
 NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
 NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
 BTS deallocated OK in test_acc_ramp_up_rotate()
 ===test_acc_ramp_up_rotate(70, 80, 90)===
 NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
 (bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
 BTS allocation OK in test_acc_ramp_up_rotate()
@@ -1991,10 +2040,12 @@
 NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
 NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
 NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
 BTS deallocated OK in test_acc_ramp_up_rotate()
 ===test_acc_ramp_updown_rotate(80, 90, 0, 100, 15)===
 NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
 (bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
 BTS allocation OK in test_acc_ramp_updown_rotate()
@@ -2116,10 +2167,12 @@
 NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
 NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
 NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
 BTS deallocated OK in test_acc_ramp_updown_rotate()
 ===test_acc_ramp_updown_rotate(30, 50, 10, 100, 15)===
 NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
 (bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
 BTS allocation OK in test_acc_ramp_updown_rotate()
@@ -2265,10 +2318,12 @@
 NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
 NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
 NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
 BTS deallocated OK in test_acc_ramp_updown_rotate()
 ===test_acc_ramp_updown_rotate(50, 49, 0, 100, 10)===
 NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
 (bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
 BTS allocation OK in test_acc_ramp_updown_rotate()
@@ -2424,10 +2479,12 @@
 NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
 NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
 NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
 BTS deallocated OK in test_acc_ramp_updown_rotate()
 ===test_acc_ramp_updown_rotate(30, 80, 30, 80, 5)===
 NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_RCARRIER_OP{DISABLED_NOTINSTALLED}: Allocated
 NM_BB_TRANSC_OP{DISABLED_NOTINSTALLED}: Allocated
 (bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
 BTS allocation OK in test_acc_ramp_updown_rotate()
@@ -2489,4 +2546,5 @@
 NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
 NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
 NM_BB_TRANSC_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
+NM_RCARRIER_OP(bts0-trx0){DISABLED_NOTINSTALLED}: Deallocated
 BTS deallocated OK in test_acc_ramp_updown_rotate()
diff --git a/tests/bsc/Makefile.am b/tests/bsc/Makefile.am
index ff2d48f..ea7e916 100644
--- a/tests/bsc/Makefile.am
+++ b/tests/bsc/Makefile.am
@@ -50,6 +50,7 @@
 	$(top_builddir)/src/osmo-bsc/nm_bts_sm_fsm.o \
 	$(top_builddir)/src/osmo-bsc/nm_bts_fsm.o \
 	$(top_builddir)/src/osmo-bsc/nm_bb_transc_fsm.o \
+	$(top_builddir)/src/osmo-bsc/nm_rcarrier_fsm.o \
 	$(LIBOSMOCORE_LIBS) \
 	$(LIBOSMOGSM_LIBS) \
 	$(LIBOSMOVTY_LIBS) \
diff --git a/tests/ctrl_test_runner.py b/tests/ctrl_test_runner.py
index 55a4ca6..e1c11b9 100755
--- a/tests/ctrl_test_runner.py
+++ b/tests/ctrl_test_runner.py
@@ -321,7 +321,7 @@
         r = self.do_get('bts.0.rf_state')
         self.assertEqual(r['mtype'], 'GET_REPLY')
         self.assertEqual(r['var'], 'bts.0.rf_state')
-        self.assertEqual(r['value'], 'inoperational,unlocked,on')
+        self.assertEqual(r['value'], 'inoperational,locked,on')
 
         r = self.do_get('rf_locked')
         self.assertEqual(r['mtype'], 'GET_REPLY')
diff --git a/tests/gsm0408/Makefile.am b/tests/gsm0408/Makefile.am
index bc8e558..b7d7c4c 100644
--- a/tests/gsm0408/Makefile.am
+++ b/tests/gsm0408/Makefile.am
@@ -39,6 +39,7 @@
 	$(top_builddir)/src/osmo-bsc/nm_bts_sm_fsm.o \
 	$(top_builddir)/src/osmo-bsc/nm_bts_fsm.o \
 	$(top_builddir)/src/osmo-bsc/nm_bb_transc_fsm.o \
+	$(top_builddir)/src/osmo-bsc/nm_rcarrier_fsm.o \
 	$(LIBOSMOCORE_LIBS) \
 	$(LIBOSMOGSM_LIBS) \
 	$(LIBOSMOABIS_LIBS) \
diff --git a/tests/handover/Makefile.am b/tests/handover/Makefile.am
index 1309380..930a5bb 100644
--- a/tests/handover/Makefile.am
+++ b/tests/handover/Makefile.am
@@ -84,6 +84,7 @@
 	$(top_builddir)/src/osmo-bsc/nm_bts_sm_fsm.o \
 	$(top_builddir)/src/osmo-bsc/nm_bts_fsm.o \
 	$(top_builddir)/src/osmo-bsc/nm_bb_transc_fsm.o \
+	$(top_builddir)/src/osmo-bsc/nm_rcarrier_fsm.o \
 	$(top_builddir)/src/osmo-bsc/osmo_bsc_ctrl.o \
 	$(top_builddir)/src/osmo-bsc/osmo_bsc_lcls.o \
 	$(top_builddir)/src/osmo-bsc/osmo_bsc_mgcp.o \
diff --git a/tests/nanobts_omlattr/Makefile.am b/tests/nanobts_omlattr/Makefile.am
index d30be33..85d09c7 100644
--- a/tests/nanobts_omlattr/Makefile.am
+++ b/tests/nanobts_omlattr/Makefile.am
@@ -33,6 +33,7 @@
 	$(top_builddir)/src/osmo-bsc/nm_bts_sm_fsm.o \
 	$(top_builddir)/src/osmo-bsc/nm_bts_fsm.o \
 	$(top_builddir)/src/osmo-bsc/nm_bb_transc_fsm.o \
+	$(top_builddir)/src/osmo-bsc/nm_rcarrier_fsm.o \
 	$(LIBOSMOCORE_LIBS) \
 	$(LIBOSMOGSM_LIBS) \
 	$(LIBOSMOABIS_LIBS) \