X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=ric_benchmarking%2Fe2-interface%2Fe2sim%2Fprevious%2Fe2apv1sim%2Fe2sim%2Fe2sim.hpp;fp=ric_benchmarking%2Fe2-interface%2Fe2sim%2Fprevious%2Fe2apv1sim%2Fe2sim%2Fe2sim.hpp;h=a8cb564cb5bbbf0f5b7890a2a65046ee52ef1327;hb=c84cf647bef80dd1f3766890d4215e85725ae85a;hp=0000000000000000000000000000000000000000;hpb=0d26f300d5f9da0aa23612b8a4a9e863423d598b;p=it%2Ftest.git diff --git a/ric_benchmarking/e2-interface/e2sim/previous/e2apv1sim/e2sim/e2sim.hpp b/ric_benchmarking/e2-interface/e2sim/previous/e2apv1sim/e2sim/e2sim.hpp new file mode 100644 index 0000000..a8cb564 --- /dev/null +++ b/ric_benchmarking/e2-interface/e2sim/previous/e2apv1sim/e2sim/e2sim.hpp @@ -0,0 +1,37 @@ +#ifndef E2SIM_HPP +#define E2SIM_HPP + +#include + +extern "C" { +#include "E2AP-PDU.h" +#include "OCTET_STRING.h" +} + +typedef void (*SubscriptionCallback)(E2AP_PDU_t*); + +class E2Sim; +class E2Sim { + +private: + + std::unordered_map ran_functions_registered; + std::unordered_map subscription_callbacks; + + void wait_for_sctp_data(); + +public: + + SubscriptionCallback get_subscription_callback(long func_id); + + void register_e2sm(long func_id, OCTET_STRING_t* ostr); + + void register_subscription_callback(long func_id, SubscriptionCallback cb); + + void encode_and_send_sctp_data(E2AP_PDU_t* pdu); + + int run_loop(int argc, char* argv[]); + +}; + +#endif