blob: b8b821f802dabf3a019d7f4fd73030ea53144d49 [file] [log] [blame]
Pau Espin Pedrol4338de52020-09-30 12:52:04 +02001/* Header for all NM FSM. Following 3GPP TS 12.21 Figure 2/GSM 12.21:
2 GSM 12.21 Objects' Operational state and availability status behaviour during initialization */
3
4/* (C) 2020 by sysmocom - s.m.f.c. GmbH <info@sysmocom.de>
5 * Author: Pau Espin Pedrol <pespin@sysmocom.de>
6 *
7 * All Rights Reserved
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU Affero General Public License as published by
11 * the Free Software Foundation; either version 3 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU Affero General Public License
20 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21 *
22 */
23
24#pragma once
25
26#include <osmocom/core/fsm.h>
27#include <osmocom/core/utils.h>
28
29/* Common */
30enum nm_fsm_events {
31 NM_EV_SW_ACT_REP,
32 NM_EV_STATE_CHG_REP,
Pau Espin Pedrol6adeb602020-09-30 12:52:53 +020033 NM_EV_SET_ATTR_ACK,
Pau Espin Pedrol4338de52020-09-30 12:52:04 +020034 NM_EV_OPSTART_ACK,
35 NM_EV_OPSTART_NACK,
36 NM_EV_OML_DOWN,
Pau Espin Pedrold9d105c2020-09-30 14:43:09 +020037 NM_EV_FORCE_LOCK, /* Only supported by RadioCarrier so far */
Pau Espin Pedrol4338de52020-09-30 12:52:04 +020038};
39extern const struct value_string nm_fsm_event_names[];
40
41/* BTS SiteManager */
42enum nm_bts_sm_op_fsm_states {
43 NM_BTS_SM_ST_OP_DISABLED_NOTINSTALLED,
44 NM_BTS_SM_ST_OP_DISABLED_DEPENDENCY,
45 NM_BTS_SM_ST_OP_DISABLED_OFFLINE,
46 NM_BTS_SM_ST_OP_ENABLED,
47};
48extern struct osmo_fsm nm_bts_sm_fsm;
Pau Espin Pedrol6adeb602020-09-30 12:52:53 +020049
50/* BTS */
51enum nm_bts_op_fsm_states {
52 NM_BTS_ST_OP_DISABLED_NOTINSTALLED,
53 NM_BTS_ST_OP_DISABLED_DEPENDENCY,
54 NM_BTS_ST_OP_DISABLED_OFFLINE,
55 NM_BTS_ST_OP_ENABLED,
56};
57extern struct osmo_fsm nm_bts_fsm;
Pau Espin Pedrol95486f22020-09-30 13:42:04 +020058
59/* BaseBand Transceiver */
60enum nm_bb_transc_op_fsm_states {
61 NM_BB_TRANSC_ST_OP_DISABLED_NOTINSTALLED,
62 NM_BB_TRANSC_ST_OP_DISABLED_DEPENDENCY,
63 NM_BB_TRANSC_ST_OP_DISABLED_OFFLINE,
64 NM_BB_TRANSC_ST_OP_ENABLED,
65};
66extern struct osmo_fsm nm_bb_transc_fsm;
Pau Espin Pedrold9d105c2020-09-30 14:43:09 +020067
68/* Radio Carrier */
69enum nm_rcarrier_op_fsm_states {
70 NM_RCARRIER_ST_OP_DISABLED_NOTINSTALLED,
71 NM_RCARRIER_ST_OP_DISABLED_DEPENDENCY,
72 NM_RCARRIER_ST_OP_DISABLED_OFFLINE,
73 NM_RCARRIER_ST_OP_ENABLED,
74};
75extern struct osmo_fsm nm_rcarrier_fsm;
Pau Espin Pedrol09544ab2020-09-30 16:36:30 +020076
77/* Radio Channel */
78enum nm_chan_op_fsm_states {
79 NM_CHAN_ST_OP_DISABLED_NOTINSTALLED,
80 NM_CHAN_ST_OP_DISABLED_DEPENDENCY,
81 NM_CHAN_ST_OP_DISABLED_OFFLINE,
82 NM_CHAN_ST_OP_ENABLED,
83};
84extern struct osmo_fsm nm_chan_fsm;
Pau Espin Pedrolee9f02f2020-12-01 19:59:15 +010085
86/* GPRS NSE */
87enum nm_gprs_op_nse_states {
88 NM_GPRS_NSE_ST_OP_DISABLED_NOTINSTALLED,
89 NM_GPRS_NSE_ST_OP_DISABLED_DEPENDENCY,
90 NM_GPRS_NSE_ST_OP_DISABLED_OFFLINE,
91 NM_GPRS_NSE_ST_OP_ENABLED,
92};
93extern struct osmo_fsm nm_gprs_nse_fsm;