Closed wmnsk closed 1 year ago
It can possibly be useful if the IEs can be retrieved all at once regardless of the message type (without asserting by the message type). The example implementation for AssociationSetupRequest would be like this.
AssociationSetupRequest
func (m *AssociationSetupRequest) AllIEs() []*ie.IE { ies := []*ie.IE{ m.NodeID, m.RecoveryTimeStamp, m.UPFunctionFeatures, m.CPFunctionFeatures, m.SMFSetID, m.PFCPSessionRetentionInformation, m.PFCPASReqFlags, } ies = append(ies, m.UserPlaneIPResourceInformation...) ies = append(ies, m.AlternativeSMFIPAddress...) ies = append(ies, m.UEIPAddressPoolInformation...) ies = append(ies, m.GTPUPathQoSControlInformation...) ies = append(ies, m.ClockDriftControlInformation...) ies = append(ies, m.IEs...) return ies }
*Maybe the inefficient append can be avoided, as the length of returned slice (=number of IEs) can be determined beforehand.
append
Doesn't seem to be very useful
It can possibly be useful if the IEs can be retrieved all at once regardless of the message type (without asserting by the message type). The example implementation for
AssociationSetupRequest
would be like this.*Maybe the inefficient
append
can be avoided, as the length of returned slice (=number of IEs) can be determined beforehand.