lte/gateway/c/session_manager/UpfMsgManageHandler.cpp
/**
 * Node level GRPC message received from UPF
 * during startup
 */
Node level GRPC message received from UPF
during startup
Node level GRPC message received from UPF during startup
void UpfMsgManageHandler::SetUPFNodeState(
    ServerContext* context, const UPFNodeState* node_request,
    std::function<void(Status, SmContextVoid)> response_callback) {
  auto& request = *node_request;
  PrintGrpcMessage(static_cast<const google::protobuf::Message&>(request));
  Status status;
  conv_enforcer_->get_event_base().runInEventBaseThread([this,
                                                         response_callback,
                                                         request]() {
    switch (request.upf_node_messages_case()) {
      case UPFNodeState::kAssociatonState: {
        std::string upf_id = request.upf_id();
        UPFAssociationState Assostate = request.associaton_state();
        auto recovery_time = Assostate.recovery_time_stamp();
        auto feature_set = Assostate.feature_set();
        std::string ipv4_addr = Assostate.ip_resource_schema(0).ipv4_address();
        conv_enforcer_->set_upf_node(upf_id, ipv4_addr);
        Status status(grpc::OK, "UPF Node message supported");
        break;
      }
      default:
        MLOG(MDEBUG) << "UPF Node message of type "
                     << request.upf_node_messages_case()
                     << "Not Being Handled in SMF";
        Status status(grpc::UNIMPLEMENTED, "UPF Node message not supported");
    }
  });
  response_callback(status, SmContextVoid());
  return;
}
void UpfMsgManageHandler :: SetUPFNodeState ( ServerContext * context , const UPFNodeState * node_request , std :: function < void ( Status , SmContextVoid ) > response_callback ) { auto & request = * node_request ; PrintGrpcMessage ( static_cast < const google :: protobuf :: Message & > ( request ) ) ; Status status ; conv_enforcer_ -> get_event_base ( ) . runInEventBaseThread ( [ this , response_callback , request ] ( ) { switch ( request . upf_node_messages_case ( ) ) { case UPFNodeState :: kAssociatonState : { std :: string upf_id = request . upf_id ( ) ; UPFAssociationState Assostate = request . associaton_state ( ) ; auto recovery_time = Assostate . recovery_time_stamp ( ) ; auto feature_set = Assostate . feature_set ( ) ; std :: string ipv4_addr = Assostate . ip_resource_schema ( 0 ) . ipv4_address ( ) ; conv_enforcer_ -> set_upf_node ( upf_id , ipv4_addr ) ; Status status ( grpc :: OK , " " ) ; break ; } default : MLOG ( MDEBUG ) << " " << request . upf_node_messages_case ( ) << " " ; Status status ( grpc :: UNIMPLEMENTED , " " ) ; } } ) ; response_callback ( status , SmContextVoid ( ) ) ; return ; }
Node level GRPC message received from UPF
 during startup
Node level GRPC message received from UPF during startup
// Print the message from UPF // For now get User Plan IPv4 resource at index '0' only // Set the UPF address // send the same UPF Node association response back to UPF