Documentation
¶
Overview ¶
Copyright 2024 Ella Networks
Index ¶
- Constants
- func AttachSourceUeTargetUe(sourceUe, targetUe *RanUe) error
- func CompareUserLocation(loc1 models.UserLocation, loc2 models.UserLocation) bool
- func DetachSourceUeTargetUe(ranUe *RanUe)
- func GetSubscriberData(ctx context.Context, ueID string) (*models.AmbrRm, string, error)
- func InTaiList(servedTai models.Tai, taiList []models.Tai) bool
- func IsSubscriberRegistered(imsi string) bool
- func TacInAreas(targetTac string, areas []models.Area) bool
- type AMFContext
- func (context *AMFContext) AddAmfUeToUePool(ue *AmfUe, supi string)
- func (context *AMFContext) AllocateAmfUeNgapID() (int64, error)
- func (context *AMFContext) AllocateRegistrationArea(ctx ctxt.Context, ue *AmfUe, anType models.AccessType, ...)
- func (context *AMFContext) AmfRanFindByConn(conn *sctp.SCTPConn) (*AmfRan, bool)
- func (context *AMFContext) AmfRanFindByRanID(ranNodeID models.GlobalRanNodeID) (*AmfRan, bool)
- func (context *AMFContext) AmfUeFindByGuti(guti string) (ue *AmfUe, ok bool)
- func (context *AMFContext) AmfUeFindByGutiLocal(guti string) (*AmfUe, bool)
- func (context *AMFContext) AmfUeFindBySuci(suci string) (ue *AmfUe, ok bool)
- func (context *AMFContext) AmfUeFindBySupi(supi string) (ue *AmfUe, ok bool)
- func (context *AMFContext) AmfUeFindBySupiLocal(supi string) (ue *AmfUe, ok bool)
- func (context *AMFContext) AmfUeFindByUeContextID(ueContextID string) (*AmfUe, bool)
- func (context *AMFContext) DeleteAmfRan(conn *sctp.SCTPConn)
- func (context *AMFContext) FreeOldGuti(ue *AmfUe)
- func (context *AMFContext) Get5gsNwFeatSuppEmc() uint8
- func (context *AMFContext) Get5gsNwFeatSuppEmcN3() uint8
- func (context *AMFContext) Get5gsNwFeatSuppEmf() uint8
- func (context *AMFContext) Get5gsNwFeatSuppEnable() bool
- func (context *AMFContext) Get5gsNwFeatSuppImsVoPS() uint8
- func (context *AMFContext) Get5gsNwFeatSuppIwkN26() uint8
- func (context *AMFContext) Get5gsNwFeatSuppMcsi() uint8
- func (context *AMFContext) Get5gsNwFeatSuppMpsi() uint8
- func (context *AMFContext) InPlmnSupport(ctx ctxt.Context, snssai models.Snssai, supportedPLMN *PlmnSupportItem) bool
- func (context *AMFContext) ListAmfRan() []AmfRan
- func (context *AMFContext) NewAmfRan(conn *sctp.SCTPConn) *AmfRan
- func (context *AMFContext) NewAmfUe(ctx ctxt.Context, supi string) *AmfUe
- func (context *AMFContext) RanUeFindByAmfUeNgapID(amfUeNgapID int64) *RanUe
- func (context *AMFContext) RanUeFindByAmfUeNgapIDLocal(amfUeNgapID int64) *RanUe
- func (context *AMFContext) ReAllocateGutiToUe(ctx ctxt.Context, ue *AmfUe, supportedGuami *models.Guami)
- func (context *AMFContext) TmsiAllocate() int32
- type AmfRan
- func (ran *AmfRan) NewRanUe(ranUeNgapID int64) (*RanUe, error)
- func (ran *AmfRan) RanUeFindByRanUeNgapID(ranUeNgapID int64) *RanUe
- func (ran *AmfRan) RanUeFindByRanUeNgapIDLocal(ranUeNgapID int64) *RanUe
- func (ran *AmfRan) Remove()
- func (ran *AmfRan) RemoveAllUeInRan()
- func (ran *AmfRan) SetRanID(ranNodeID *ngapType.GlobalRANNodeID)
- type AmfUe
- func (ue *AmfUe) AttachRanUe(ranUe *RanUe)
- func (ue *AmfUe) ClearRegistrationData()
- func (ue *AmfUe) ClearRegistrationRequestData(accessType models.AccessType)
- func (ue *AmfUe) CmConnect(anType models.AccessType) bool
- func (ue *AmfUe) CmIdle(anType models.AccessType) bool
- func (ue *AmfUe) DerivateAlgKey()
- func (ue *AmfUe) DerivateAnKey(anType models.AccessType)
- func (ue *AmfUe) DerivateKamf()
- func (ue *AmfUe) DerivateNH(syncInput []byte)
- func (ue *AmfUe) DetachRanUe(anType models.AccessType)
- func (ue *AmfUe) GetAnType() models.AccessType
- func (ue *AmfUe) GetOnGoing(anType models.AccessType) OnGoingProcedureWithPrio
- func (ue *AmfUe) HasActivePduSessions() bool
- func (ue *AmfUe) InAllowedNssai(targetSNssai models.Snssai, anType models.AccessType) bool
- func (ue *AmfUe) InSubscribedNssai(targetSNssai *models.Snssai) bool
- func (ue *AmfUe) Remove()
- func (ue *AmfUe) RemoveAmPolicyAssociation()
- func (ue *AmfUe) SecurityContextIsValid() bool
- func (ue *AmfUe) SelectSecurityAlg(intOrder, encOrder []uint8)
- func (ue *AmfUe) SetOnGoing(anType models.AccessType, onGoing *OnGoingProcedureWithPrio)
- func (ue *AmfUe) SmContextFindByPDUSessionID(pduSessionID int32) (*SmContext, bool)
- func (ue *AmfUe) StoreSmContext(pduSessionID int32, smContext *SmContext)
- func (ue *AmfUe) TaiListInRegistrationArea(taiList []models.Tai, accessType models.AccessType) bool
- func (ue *AmfUe) UpdateNH()
- func (ue *AmfUe) UpdateSecurityContext(anType models.AccessType)
- type CauseAll
- type ConfigurationUpdateCommandFlags
- type InfoOnRecommendedCellsAndRanNodesForPaging
- type N1N2Message
- type NGRANCGI
- type NetworkFeatureSupport5GS
- type NetworkName
- type OnGoingProcedure
- type OnGoingProcedureWithPrio
- type OperatorInfo
- type PlmnSupportItem
- type RanUe
- type RecommendRanNode
- type RecommendedCell
- type RelAction
- type SecurityAlgorithm
- type SmContext
- func (c *SmContext) AccessType() models.AccessType
- func (c *SmContext) Dnn() string
- func (c *SmContext) IsPduSessionActive() bool
- func (c *SmContext) PduSessionID() int32
- func (c *SmContext) SetAccessType(accessType models.AccessType)
- func (c *SmContext) SetDnn(dnn string)
- func (c *SmContext) SetPduSessionInActive(s bool)
- func (c *SmContext) SetSmContextRef(ref string)
- func (c *SmContext) SetSnssai(snssai models.Snssai)
- func (c *SmContext) SetUserLocation(userLocation models.UserLocation)
- func (c *SmContext) SmContextRef() string
- func (c *SmContext) Snssai() models.Snssai
- func (c *SmContext) UserLocation() models.UserLocation
- type SupportedTAI
- type Timer
- type TimerValue
- type UERadioCapabilityForPaging
Constants ¶
const ( MaxNumOfTAI int = 16 MaxNumOfBroadcastPLMNs int = 12 MaxNumOfSlice int = 1024 MaxValueOfAmfUeNgapID int64 = 1099511627775 MaxNumOfServedGuamiList int = 256 MaxNumOfPDUSessions int = 256 MaxNumOfAOI int = 64 )
const ( RanPresentGNbID = 1 RanPresentNgeNbID = 2 RanPresentN3IwfID = 3 )
const ( NgRanCgiPresentNRCGI int32 = 0 NgRanCgiPresentEUTRACGI int32 = 1 )
const ( RecommendRanNodePresentRanNode int32 = 0 RecommendRanNodePresentTAI int32 = 1 )
const ( Deregistered fsm.StateType = "Deregistered" DeregistrationInitiated fsm.StateType = "DeregistrationInitiated" Authentication fsm.StateType = "Authentication" SecurityMode fsm.StateType = "SecurityMode" ContextSetup fsm.StateType = "ContextSetup" Registered fsm.StateType = "Registered" )
GMM state for UE
const (
RanUeNgapIDUnspecified int64 = 0xffffffff
)
const (
TimeT3513 time.Duration = 6 * time.Second
)
timers defined in TS 24.501 table 10.2.2
Variables ¶
This section is empty.
Functions ¶
func AttachSourceUeTargetUe ¶
func CompareUserLocation ¶
func CompareUserLocation(loc1 models.UserLocation, loc2 models.UserLocation) bool
func DetachSourceUeTargetUe ¶
func DetachSourceUeTargetUe(ranUe *RanUe)
func GetSubscriberData ¶ added in v0.6.0
func IsSubscriberRegistered ¶ added in v0.1.0
Types ¶
type AMFContext ¶
type AMFContext struct {
DBInstance *db.Database
UePool sync.Map // map[supi]*AmfUe
RanUePool sync.Map // map[AmfUeNgapID]*RanUe
AmfRanPool sync.Map // map[net.Conn]*AmfRan
RelativeCapacity int64
Name string
NetworkFeatureSupport5GS *NetworkFeatureSupport5GS
SecurityAlgorithm SecurityAlgorithm
NetworkName NetworkName
T3502Value int // unit is second
T3512Value int // unit is second
Non3gppDeregistrationTimerValue int // unit is second
TimeZone string // "[+-]HH:MM[+][1-2]", Refer to TS 29.571 - 5.2.2 Simple Data Types
T3513Cfg TimerValue
T3522Cfg TimerValue
T3550Cfg TimerValue
T3555Cfg TimerValue
T3560Cfg TimerValue
T3565Cfg TimerValue
}
func (*AMFContext) AddAmfUeToUePool ¶
func (context *AMFContext) AddAmfUeToUePool(ue *AmfUe, supi string)
func (*AMFContext) AllocateAmfUeNgapID ¶
func (context *AMFContext) AllocateAmfUeNgapID() (int64, error)
func (*AMFContext) AllocateRegistrationArea ¶
func (context *AMFContext) AllocateRegistrationArea(ctx ctxt.Context, ue *AmfUe, anType models.AccessType, supportedTais []models.Tai)
func (*AMFContext) AmfRanFindByConn ¶
func (context *AMFContext) AmfRanFindByConn(conn *sctp.SCTPConn) (*AmfRan, bool)
use net.Conn to find RAN context, return *AmfRan and ok bit
func (*AMFContext) AmfRanFindByRanID ¶
func (context *AMFContext) AmfRanFindByRanID(ranNodeID models.GlobalRanNodeID) (*AmfRan, bool)
use ranNodeID to find RAN context, return *AmfRan and ok bit
func (*AMFContext) AmfUeFindByGuti ¶
func (context *AMFContext) AmfUeFindByGuti(guti string) (ue *AmfUe, ok bool)
func (*AMFContext) AmfUeFindByGutiLocal ¶
func (context *AMFContext) AmfUeFindByGutiLocal(guti string) (*AmfUe, bool)
Looks up a UE by the provided GUTI.
func (*AMFContext) AmfUeFindBySuci ¶
func (context *AMFContext) AmfUeFindBySuci(suci string) (ue *AmfUe, ok bool)
func (*AMFContext) AmfUeFindBySupi ¶
func (context *AMFContext) AmfUeFindBySupi(supi string) (ue *AmfUe, ok bool)
func (*AMFContext) AmfUeFindBySupiLocal ¶
func (context *AMFContext) AmfUeFindBySupiLocal(supi string) (ue *AmfUe, ok bool)
func (*AMFContext) AmfUeFindByUeContextID ¶
func (context *AMFContext) AmfUeFindByUeContextID(ueContextID string) (*AmfUe, bool)
func (*AMFContext) DeleteAmfRan ¶
func (context *AMFContext) DeleteAmfRan(conn *sctp.SCTPConn)
func (*AMFContext) FreeOldGuti ¶ added in v0.6.0
func (context *AMFContext) FreeOldGuti(ue *AmfUe)
func (*AMFContext) Get5gsNwFeatSuppEmc ¶
func (context *AMFContext) Get5gsNwFeatSuppEmc() uint8
func (*AMFContext) Get5gsNwFeatSuppEmcN3 ¶
func (context *AMFContext) Get5gsNwFeatSuppEmcN3() uint8
func (*AMFContext) Get5gsNwFeatSuppEmf ¶
func (context *AMFContext) Get5gsNwFeatSuppEmf() uint8
func (*AMFContext) Get5gsNwFeatSuppEnable ¶
func (context *AMFContext) Get5gsNwFeatSuppEnable() bool
func (*AMFContext) Get5gsNwFeatSuppImsVoPS ¶
func (context *AMFContext) Get5gsNwFeatSuppImsVoPS() uint8
func (*AMFContext) Get5gsNwFeatSuppIwkN26 ¶
func (context *AMFContext) Get5gsNwFeatSuppIwkN26() uint8
func (*AMFContext) Get5gsNwFeatSuppMcsi ¶
func (context *AMFContext) Get5gsNwFeatSuppMcsi() uint8
func (*AMFContext) Get5gsNwFeatSuppMpsi ¶
func (context *AMFContext) Get5gsNwFeatSuppMpsi() uint8
func (*AMFContext) InPlmnSupport ¶ added in v0.0.12
func (context *AMFContext) InPlmnSupport(ctx ctxt.Context, snssai models.Snssai, supportedPLMN *PlmnSupportItem) bool
func (*AMFContext) ListAmfRan ¶ added in v0.0.5
func (context *AMFContext) ListAmfRan() []AmfRan
func (*AMFContext) NewAmfUe ¶
func (context *AMFContext) NewAmfUe(ctx ctxt.Context, supi string) *AmfUe
func (*AMFContext) RanUeFindByAmfUeNgapID ¶
func (context *AMFContext) RanUeFindByAmfUeNgapID(amfUeNgapID int64) *RanUe
func (*AMFContext) RanUeFindByAmfUeNgapIDLocal ¶
func (context *AMFContext) RanUeFindByAmfUeNgapIDLocal(amfUeNgapID int64) *RanUe
func (*AMFContext) ReAllocateGutiToUe ¶
func (*AMFContext) TmsiAllocate ¶
func (context *AMFContext) TmsiAllocate() int32
type AmfRan ¶
type AmfRan struct {
RanPresent int
RanID *models.GlobalRanNodeID
Name string
AnType models.AccessType
GnbIP string
GnbID string // RanID in string format, i.e.,mcc:mnc:gnbid
Conn *sctp.SCTPConn
SupportedTAList []SupportedTAI
RanUeList []*RanUe // RanUeNgapID as key
Log *zap.Logger
}
func (*AmfRan) RanUeFindByRanUeNgapID ¶
func (*AmfRan) RanUeFindByRanUeNgapIDLocal ¶
func (*AmfRan) RemoveAllUeInRan ¶
func (ran *AmfRan) RemoveAllUeInRan()
func (*AmfRan) SetRanID ¶ added in v0.0.12
func (ran *AmfRan) SetRanID(ranNodeID *ngapType.GlobalRANNodeID)
type AmfUe ¶
type AmfUe struct {
Mutex sync.Mutex
/* the AMF which serving this AmfUe now */
ServingAMF *AMFContext // never nil
/* Gmm State */
State map[models.AccessType]*fsm.State
/* Registration procedure related context */
RegistrationType5GS uint8
IdentityTypeUsedForRegistration uint8
RegistrationRequest *nasMessage.RegistrationRequest
ServingAmfChanged bool
DeregistrationTargetAccessType uint8 // only used when deregistration procedure is initialized by the network
RegistrationAcceptForNon3GPPAccess []byte
RetransmissionOfInitialNASMsg bool
/* Used for AMF relocation */
/* Ue Identity*/
PlmnID models.PlmnID
Suci string
Supi string
Gpsi string
Pei string
Tmsi int32
OldTmsi int32
Guti string
OldGuti string
EBI int32
/* Ue Identity*/
/* User Location*/
RatType models.RatType
Location models.UserLocation
Tai models.Tai
LocationChanged bool
LastVisitedRegisteredTai models.Tai
TimeZone string
/* context about udm */
SubscriptionDataValid bool
Dnn string
TraceData *models.TraceData
SubscribedNssai *models.Snssai
Ambr *models.AmbrRm
RoutingIndicator string
AuthenticationCtx *models.UeAuthenticationCtx
AuthFailureCauseSynchFailureTimes int
ABBA []uint8
Kseaf string
Kamf string
/* context about PCF */
AmPolicyAssociation *models.PolicyAssociation
RequestTriggerLocationChange bool // true if AmPolicyAssociation.Trigger contains RequestTriggerLocCh
/* N1N2Message */
N1N2Message *N1N2Message
/* Pdu Sesseion context */
SmContextList sync.Map // map[int32]*SmContext, pdu session id as key
/* Related Context*/
RanUe map[models.AccessType]*RanUe
/* other */
OnGoing map[models.AccessType]*OnGoingProcedureWithPrio
UeRadioCapability string // OCTET string
Capability5GMM nasType.Capability5GMM
ConfigurationUpdateIndication nasType.ConfigurationUpdateIndication
ConfigurationUpdateCommandFlags *ConfigurationUpdateCommandFlags
/* context related to Paging */
UeRadioCapabilityForPaging *UERadioCapabilityForPaging
InfoOnRecommendedCellsAndRanNodesForPaging *InfoOnRecommendedCellsAndRanNodesForPaging
UESpecificDRX uint8
/* Security Context */
SecurityContextAvailable bool
UESecurityCapability *nasType.UESecurityCapability // for security command
NgKsi models.NgKsi
MacFailed bool // set to true if the integrity check of current NAS message is failed
KnasInt [16]uint8 // 16 byte
KnasEnc [16]uint8 // 16 byte
Kgnb []uint8 // 32 byte
Kn3iwf []uint8 // 32 byte
NH []uint8 // 32 byte
NCC uint8 // 0..7
ULCount security.Count
DLCount security.Count
CipheringAlg uint8
IntegrityAlg uint8
/* Registration Area */
RegistrationArea map[models.AccessType][]models.Tai
/* Network Slicing related context and Nssf */
AllowedNssai map[models.AccessType]*models.Snssai
/* T3513(Paging) */
T3513 *Timer // for paging
/* T3565(Notification) */
T3565 *Timer // for NAS Notification
/* T3560 (for authentication request/security mode command retransmission) */
T3560 *Timer
/* T3550 (for registration accept retransmission) */
T3550 *Timer
/* T3555 (for configuration update command retransmission) */
T3555 *Timer
/* T3522 (for deregistration request) */
T3522 *Timer
/* Ue Context Release Cause */
ReleaseCause map[models.AccessType]*CauseAll
/* T3502 (Assigned by AMF, and used by UE to initialize registration procedure) */
T3502Value int // Second
T3512Value int // default 54 min
Non3gppDeregistrationTimerValue int // default 54 min
NASLog *zap.Logger
GmmLog *zap.Logger
TxLog *zap.Logger
ProducerLog *zap.Logger
}
func (*AmfUe) AttachRanUe ¶
func (*AmfUe) ClearRegistrationData ¶
func (ue *AmfUe) ClearRegistrationData()
this method called when we are reusing the same uecontext during the registration procedure
func (*AmfUe) ClearRegistrationRequestData ¶
func (ue *AmfUe) ClearRegistrationRequestData(accessType models.AccessType)
this is clearing the transient data of registration request, this is called entrypoint of Deregistration and Registration state
func (*AmfUe) DerivateAlgKey ¶
func (ue *AmfUe) DerivateAlgKey()
Algorithm key Derivation function defined in TS 33.501 Annex A.9
func (*AmfUe) DerivateAnKey ¶
func (ue *AmfUe) DerivateAnKey(anType models.AccessType)
Access Network key Derivation function defined in TS 33.501 Annex A.9
func (*AmfUe) DerivateKamf ¶
func (ue *AmfUe) DerivateKamf()
Kamf Derivation function defined in TS 33.501 Annex A.7
func (*AmfUe) DerivateNH ¶
NH Derivation function defined in TS 33.501 Annex A.10
func (*AmfUe) DetachRanUe ¶
func (ue *AmfUe) DetachRanUe(anType models.AccessType)
func (*AmfUe) GetAnType ¶
func (ue *AmfUe) GetAnType() models.AccessType
func (*AmfUe) GetOnGoing ¶
func (ue *AmfUe) GetOnGoing(anType models.AccessType) OnGoingProcedureWithPrio
func (*AmfUe) HasActivePduSessions ¶ added in v0.4.1
func (*AmfUe) InAllowedNssai ¶
func (*AmfUe) InSubscribedNssai ¶
func (*AmfUe) RemoveAmPolicyAssociation ¶
func (ue *AmfUe) RemoveAmPolicyAssociation()
func (*AmfUe) SecurityContextIsValid ¶
func (*AmfUe) SelectSecurityAlg ¶
func (*AmfUe) SetOnGoing ¶
func (ue *AmfUe) SetOnGoing(anType models.AccessType, onGoing *OnGoingProcedureWithPrio)
func (*AmfUe) SmContextFindByPDUSessionID ¶
func (*AmfUe) StoreSmContext ¶
func (*AmfUe) TaiListInRegistrationArea ¶
func (*AmfUe) UpdateSecurityContext ¶
func (ue *AmfUe) UpdateSecurityContext(anType models.AccessType)
type ConfigurationUpdateCommandFlags ¶ added in v0.6.0
type ConfigurationUpdateCommandFlags struct {
NeedGUTI bool
NeedNITZ bool
NeedTaiList bool
NeedRejectNSSAI bool
NeedAllowedNSSAI bool
NeedSmsIndication bool
NeedMicoIndication bool
NeedLadnInformation bool
NeedServiceAreaList bool
NeedConfiguredNSSAI bool
NeedNetworkSlicingIndication bool
NeedOperatordefinedAccessCategoryDefinitions bool
}
TS 24.501 8.2.19
type InfoOnRecommendedCellsAndRanNodesForPaging ¶
type InfoOnRecommendedCellsAndRanNodesForPaging struct {
RecommendedCells []RecommendedCell // RecommendedCellsForPaging
RecommendedRanNodes []RecommendRanNode // RecommendedRanNodesForPaging
}
TS 38.413 9.3.1.100
type N1N2Message ¶
type N1N2Message struct {
Request models.N1N2MessageTransferRequest
Status models.N1N2MessageTransferCause
}
type NetworkName ¶
type OnGoingProcedure ¶
type OnGoingProcedure string
const ( OnGoingProcedureNothing OnGoingProcedure = "Nothing" OnGoingProcedurePaging OnGoingProcedure = "Paging" OnGoingProcedureN2Handover OnGoingProcedure = "N2Handover" OnGoingProcedureRegistration OnGoingProcedure = "Registration" OnGoingProcedureAbort OnGoingProcedure = "Abort" )
type OnGoingProcedureWithPrio ¶
type OnGoingProcedureWithPrio struct {
Procedure OnGoingProcedure
Ppi int32 // Paging priority
}
type OperatorInfo ¶ added in v0.6.0
type OperatorInfo struct {
Tais []models.Tai
Guami *models.Guami
SupportedPLMN *PlmnSupportItem
}
func GetOperatorInfo ¶ added in v0.6.0
func GetOperatorInfo(ctx context.Context) (*OperatorInfo, error)
type RanUe ¶
type RanUe struct {
RanUeNgapID int64
AmfUeNgapID int64
HandOverType ngapType.HandoverType
SuccessPduSessionID []int32
SourceUe *RanUe
TargetUe *RanUe
Tai models.Tai
Location models.UserLocation
SupportedFeatures string
AmfUe *AmfUe
Ran *AmfRan
RoutingID string
Trsr string /* Trace Recording Session Reference */
ReleaseAction RelAction
InitialUEMessage []byte
RRCEstablishmentCause string // Received from initial ue message; pattern: ^[0-9a-fA-F]+$
UeContextRequest bool
SentInitialContextSetupRequest bool
RecvdInitialContextSetupResponse bool /*Received Initial context setup response or not */
Log *zap.Logger
}
func (*RanUe) DetachAmfUe ¶
func (ranUe *RanUe) DetachAmfUe()
func (*RanUe) SwitchToRan ¶
func (*RanUe) UpdateLocation ¶
func (ranUe *RanUe) UpdateLocation(ctx context.Context, userLocationInformation *ngapType.UserLocationInformation)
type RecommendRanNode ¶
type RecommendRanNode struct {
Present int32
GlobalRanNodeID *models.GlobalRanNodeID
Tai *models.Tai
}
TS 38.413 9.3.1.101
type RecommendedCell ¶
TS 38.413 9.3.1.71
type SecurityAlgorithm ¶
type SmContext ¶
type SmContext struct {
Mu *sync.RWMutex // protect the following fields
PduSessionIDVal int32
SmContextRefVal string
SnssaiVal models.Snssai
DnnVal string
AccessTypeVal models.AccessType
UserLocationVal models.UserLocation
PduSessionInactiveVal bool
}
func NewSmContext ¶
func (*SmContext) AccessType ¶
func (c *SmContext) AccessType() models.AccessType
func (*SmContext) IsPduSessionActive ¶
func (*SmContext) PduSessionID ¶
func (*SmContext) SetAccessType ¶
func (c *SmContext) SetAccessType(accessType models.AccessType)
func (*SmContext) SetPduSessionInActive ¶
func (*SmContext) SetSmContextRef ¶
func (*SmContext) SetUserLocation ¶
func (c *SmContext) SetUserLocation(userLocation models.UserLocation)
func (*SmContext) SmContextRef ¶
func (*SmContext) UserLocation ¶
func (c *SmContext) UserLocation() models.UserLocation
type SupportedTAI ¶
func NewSupportedTAI ¶
func NewSupportedTAI() (tai SupportedTAI)
func NewSupportedTAIList ¶
func NewSupportedTAIList() []SupportedTAI
type Timer ¶
type Timer struct {
// contains filtered or unexported fields
}
Timer can be used for retransmission, it will manage retry times automatically
func NewTimer ¶
func NewTimer(d time.Duration, maxRetryTimes int32, expiredFunc func(expireTimes int32), cancelFunc func()) *Timer
NewTimer will return a Timer struct and create a goroutine. Then it calls expiredFunc every time interval d until the user call Stop(). the number of expire event is be recorded when the timer is active. When the number of expire event is > maxRetryTimes, then the timer will call cancelFunc and turns off itself. Whether expiredFunc pass a parameter expireTimes to tell the user that the current expireTimes.
func (*Timer) ExpireTimes ¶
ExpireTimes return the current expire times of the timer
func (*Timer) MaxRetryTimes ¶
MaxRetryTimes return the max retry times of the timer