mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-cbc.git
synced 2025-10-23 08:22:19 +00:00
Split event list for smscb_message_fsm and smscb_peer_fsm
It really doesn't make sense to share the event list betwen those for several reasons. First, because ech of those FSM relate to different things: * smscb_message_fsm: Handling/scheduling of 1 smscb towards all peers * smscb_peer_fsm: Handling/scheduling of 1 smscb towards 1 peer. The former has higher level interface used by the REST API, plus some mid level interface used by smscb_peer_fsm. The later has a mid level interface used by smscb_message_fsm to interact, and a lower level interface used by the SBcAP/CBSP links to talk to. Furthermore, this makes it a lot easier understanding which events are sent from one to another FSM. Change-Id: I909474d1ff4ec7ed20aff0981da47074397df6cb
This commit is contained in:
@@ -13,4 +13,5 @@ noinst_HEADERS = \
|
||||
sbcap_link_fsm.h \
|
||||
rest_it_op.h \
|
||||
smscb_message_fsm.h \
|
||||
smscb_peer_fsm.h \
|
||||
$(NULL)
|
||||
|
@@ -3,36 +3,28 @@
|
||||
#include <stdint.h>
|
||||
#include <osmocom/core/fsm.h>
|
||||
|
||||
enum smscb_fsm_event {
|
||||
SMSCB_E_CHILD_DIED,
|
||||
enum smscb_message_fsm_event {
|
||||
SMSCB_MSG_E_CHILD_DIED,
|
||||
/* create a message (from REST) */
|
||||
SMSCB_E_CREATE,
|
||||
SMSCB_MSG_E_CREATE,
|
||||
/* replace a message (from REST) */
|
||||
SMSCB_E_REPLACE,
|
||||
SMSCB_MSG_E_REPLACE,
|
||||
/* get status of a message (from REST) */
|
||||
SMSCB_E_STATUS,
|
||||
SMSCB_MSG_E_STATUS,
|
||||
/* delete a message (from REST) */
|
||||
SMSCB_E_DELETE,
|
||||
/* CBSP peer confirms write */
|
||||
SMSCB_E_CBSP_WRITE_ACK,
|
||||
SMSCB_E_CBSP_WRITE_NACK,
|
||||
/* CBSP peer confirms replace */
|
||||
SMSCB_E_CBSP_REPLACE_ACK,
|
||||
SMSCB_E_CBSP_REPLACE_NACK,
|
||||
/* CBSP peer confirms delete */
|
||||
SMSCB_E_CBSP_DELETE_ACK,
|
||||
SMSCB_E_CBSP_DELETE_NACK,
|
||||
/* CBSP peer confirms status query */
|
||||
SMSCB_E_CBSP_STATUS_ACK,
|
||||
SMSCB_E_CBSP_STATUS_NACK,
|
||||
/* SBc-AP peer confirms write */
|
||||
SMSCB_E_SBCAP_WRITE_ACK,
|
||||
SMSCB_E_SBCAP_WRITE_NACK,
|
||||
/* SBc-AP peer confirms delete */
|
||||
SMSCB_E_SBCAP_DELETE_ACK,
|
||||
SMSCB_E_SBCAP_DELETE_NACK,
|
||||
/* SBc-AP peer sends Write Replace Warning Indication to us */
|
||||
SMSCB_E_SBCAP_WRITE_IND,
|
||||
SMSCB_MSG_E_DELETE,
|
||||
/* peer confirms write */
|
||||
SMSCB_MSG_E_WRITE_ACK,
|
||||
SMSCB_MSG_E_WRITE_NACK,
|
||||
/* peer confirms replace */
|
||||
SMSCB_MSG_E_REPLACE_ACK,
|
||||
SMSCB_MSG_E_REPLACE_NACK,
|
||||
/* peer confirms delete */
|
||||
SMSCB_MSG_E_DELETE_ACK,
|
||||
SMSCB_MSG_E_DELETE_NACK,
|
||||
/* peer confirms status query */
|
||||
SMSCB_MSG_E_STATUS_ACK,
|
||||
SMSCB_MSG_E_STATUS_NACK
|
||||
};
|
||||
|
||||
enum smscb_fsm_state {
|
||||
@@ -58,4 +50,4 @@ enum smscb_p_fsm_timer {
|
||||
T_WAIT_DELETE_ACK,
|
||||
};
|
||||
|
||||
extern const struct value_string smscb_fsm_event_names[];
|
||||
extern const struct value_string smscb_message_fsm_event_names[];
|
||||
|
37
include/osmocom/cbc/smscb_peer_fsm.h
Normal file
37
include/osmocom/cbc/smscb_peer_fsm.h
Normal file
@@ -0,0 +1,37 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <osmocom/core/fsm.h>
|
||||
|
||||
enum smscb_peer_fsm_event {
|
||||
/* create a message (from REST) */
|
||||
SMSCB_PEER_E_CREATE,
|
||||
/* replace a message (from REST) */
|
||||
SMSCB_PEER_E_REPLACE,
|
||||
/* get status of a message (from REST) */
|
||||
SMSCB_PEER_E_STATUS,
|
||||
/* delete a message (from REST) */
|
||||
SMSCB_PEER_E_DELETE,
|
||||
/* CBSP peer confirms write */
|
||||
SMSCB_PEER_E_CBSP_WRITE_ACK,
|
||||
SMSCB_PEER_E_CBSP_WRITE_NACK,
|
||||
/* CBSP peer confirms replace */
|
||||
SMSCB_PEER_E_CBSP_REPLACE_ACK,
|
||||
SMSCB_PEER_E_CBSP_REPLACE_NACK,
|
||||
/* CBSP peer confirms delete */
|
||||
SMSCB_PEER_E_CBSP_DELETE_ACK,
|
||||
SMSCB_PEER_E_CBSP_DELETE_NACK,
|
||||
/* CBSP peer confirms status query */
|
||||
SMSCB_PEER_E_CBSP_STATUS_ACK,
|
||||
SMSCB_PEER_E_CBSP_STATUS_NACK,
|
||||
/* SBc-AP peer confirms write */
|
||||
SMSCB_PEER_E_SBCAP_WRITE_ACK,
|
||||
SMSCB_PEER_E_SBCAP_WRITE_NACK,
|
||||
/* SBc-AP peer confirms delete */
|
||||
SMSCB_PEER_E_SBCAP_DELETE_ACK,
|
||||
SMSCB_PEER_E_SBCAP_DELETE_NACK,
|
||||
/* SBc-AP peer sends Write Replace Warning Indication to us */
|
||||
SMSCB_PEER_E_SBCAP_WRITE_IND,
|
||||
};
|
||||
|
||||
extern const struct value_string smscb_peer_fsm_event_names[];
|
Reference in New Issue
Block a user