blob: f6dafc3c224cbf363b34165dc8799ba9d4fcde0b [file] [log] [blame]
Pau Espin Pedroldc2aaac2021-05-14 12:50:46 +02001/* tbf_fsm.c
2 *
Pau Espin Pedrol343c0ee2022-11-17 19:55:08 +01003 * Copyright (C) 2021-2022 by sysmocom - s.f.m.c. GmbH <info@sysmocom.de>
Pau Espin Pedroldc2aaac2021-05-14 12:50:46 +02004 * Author: Pau Espin Pedrol <pespin@sysmocom.de>
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
Pau Espin Pedroldc2aaac2021-05-14 12:50:46 +020015 */
16
Pau Espin Pedrol343c0ee2022-11-17 19:55:08 +010017#include <osmocom/core/utils.h>
Pau Espin Pedroldc2aaac2021-05-14 12:50:46 +020018
19#include <tbf_fsm.h>
Pau Espin Pedroldc2aaac2021-05-14 12:50:46 +020020
Pau Espin Pedrol343c0ee2022-11-17 19:55:08 +010021/* Note: This file contains shared code for UL/DL TBF FSM. See tbf_dl_fsm.c and
22 * tbf_ul_fsm.c for the actual implementations of the FSM */
Pau Espin Pedroldc2aaac2021-05-14 12:50:46 +020023
24const struct value_string tbf_fsm_event_names[] = {
Pau Espin Pedrol33e80072021-07-22 19:20:50 +020025 { TBF_EV_ASSIGN_ADD_CCCH, "ASSIGN_ADD_CCCH" },
26 { TBF_EV_ASSIGN_ADD_PACCH, "ASSIGN_ADD_PACCH" },
Pau Espin Pedrol720e19e2021-07-22 19:56:37 +020027 { TBF_EV_ASSIGN_ACK_PACCH, "ASSIGN_ACK_PACCH" },
28 { TBF_EV_ASSIGN_READY_CCCH, "ASSIGN_READY_CCCH" },
Pau Espin Pedrol32252902021-07-29 16:44:11 +020029 { TBF_EV_ASSIGN_PCUIF_CNF, "ASSIGN_PCUIF_CNF" },
Pau Espin Pedrol338a5ae2022-10-28 18:47:44 +020030 { TBF_EV_FIRST_UL_DATA_RECVD, "FIRST_UL_DATA_RECVD" },
Pau Espin Pedrolf38a47e2022-10-28 19:06:45 +020031 { TBF_EV_CONTENTION_RESOLUTION_MS_SUCCESS, "CONTENTION_RESOLUTION_MS_SUCCESS" },
Pau Espin Pedrol32252902021-07-29 16:44:11 +020032 { TBF_EV_DL_ACKNACK_MISS, "DL_ACKNACK_MISS" },
Pau Espin Pedrolc32c4a32021-07-23 18:27:57 +020033 { TBF_EV_LAST_DL_DATA_SENT, "LAST_DL_DATA_SENT" },
34 { TBF_EV_LAST_UL_DATA_RECVD, "LAST_UL_DATA_RECVD" },
Pau Espin Pedrolefcb0462021-07-26 12:33:39 +020035 { TBF_EV_FINAL_ACK_RECVD, "FINAL_ACK_RECVD" },
Pau Espin Pedrol7a2b65e2021-10-11 19:18:13 +020036 { TBF_EV_FINAL_UL_ACK_CONFIRMED, "FINAL_UL_ACK_CONFIRMED" },
Pau Espin Pedrol55f600b2021-07-26 15:54:39 +020037 { TBF_EV_MAX_N3101 , "MAX_N3101" },
38 { TBF_EV_MAX_N3103 , "MAX_N3103" },
39 { TBF_EV_MAX_N3105 , "MAX_N3105" },
Pau Espin Pedroldc2aaac2021-05-14 12:50:46 +020040 { 0, NULL }
41};