fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/42448?usp=email )
Change subject: s1ap_proxy: add public erab_list() type ......................................................................
s1ap_proxy: add public erab_list() type
Change-Id: I21a674537d1d9f16fdb319aaf2d758ba0906b407 --- M src/enb_proxy.erl M src/s1ap_proxy.erl 2 files changed, 5 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-s1gw refs/changes/48/42448/1
diff --git a/src/enb_proxy.erl b/src/enb_proxy.erl index 40d446a..5dfa0ff 100644 --- a/src/enb_proxy.erl +++ b/src/enb_proxy.erl @@ -112,7 +112,7 @@ gen_statem:call(Pid, ?FUNCTION_NAME).
--spec fetch_erab_list(pid()) -> [{term(), pid()}]. +-spec fetch_erab_list(pid()) -> s1ap_proxy:erab_list(). fetch_erab_list(Pid) -> gen_statem:call(Pid, ?FUNCTION_NAME).
diff --git a/src/s1ap_proxy.erl b/src/s1ap_proxy.erl index ef7665e..dcd053e 100644 --- a/src/s1ap_proxy.erl +++ b/src/s1ap_proxy.erl @@ -65,6 +65,7 @@ -type enb_ue_id() :: 0..16#ffffff. -type erab_id() :: 0..16#ff. -type erab_uid() :: {mme_ue_id(), erab_id()}. +-type erab_list() :: [{erab_uid(), pid()}].
-record(proxy_state, {owner :: pid(), erabs :: dict:dict(K :: erab_uid(), @@ -79,7 +80,8 @@ -type proxy_state() :: #proxy_state{}. -type proxy_action() :: forward | reply | drop.
--export_type([proxy_action/0]). +-export_type([proxy_action/0, + erab_list/0]).
%% ------------------------------------------------------------------ @@ -109,7 +111,7 @@
%% Fetch all E-RABs from the registry in form of a list --spec fetch_erab_list(pid()) -> [{erab_uid(), pid()}]. +-spec fetch_erab_list(pid()) -> erab_list(). fetch_erab_list(Pid) -> gen_server:call(Pid, ?FUNCTION_NAME).