-// This function checks the validity of the given subscription id
-func (r *Registry) IsValidSequenceNumber(sn uint16) bool {
- r.mutex.Lock()
- defer r.mutex.Unlock()
- xapp.Logger.Debug("Registry map: %v", r.register)
- if _, ok := r.register[sn]; ok {
- return true
- }
- return false
-}
-
-// This function sets the give id as confirmed in the register
-func (r *Registry) setSubscriptionToConfirmed(sn uint16) {
- r.mutex.Lock()
- defer r.mutex.Unlock()
- r.register[sn].Confirmed()
-}
-
-//This function sets the given id as unused in the register
-func (r *Registry) setSubscriptionToUnConfirmed(sn uint16) {
- r.mutex.Lock()
- defer r.mutex.Unlock()
- r.register[sn].UnConfirmed()
-}
-
-//This function releases the given id as unused in the register
-func (r *Registry) releaseSequenceNumber(sn uint16) bool {