Merge newe2 into master
[ric-plt/submgr.git] / e2ap / pkg / e2ap / msg_e2ap.go
index 8020049..2ce2c17 100644 (file)
@@ -119,12 +119,12 @@ func (msgInfo *MessageInfo) String() string {
 //
 //-----------------------------------------------------------------------------
 type RequestId struct {
-       Id  uint32
-       Seq uint32
+       Id         uint32
+       InstanceId uint32
 }
 
 func (rid *RequestId) String() string {
-       return strconv.FormatUint((uint64)(rid.Id), 10) + string(":") + strconv.FormatUint((uint64)(rid.Seq), 10)
+       return strconv.FormatUint((uint64)(rid.Id), 10) + string(":") + strconv.FormatUint((uint64)(rid.InstanceId), 10)
 }
 
 //-----------------------------------------------------------------------------
@@ -183,12 +183,34 @@ const (
 )
 
 type EventTriggerDefinition struct {
+       NBX2EventTriggerDefinitionPresent bool
+       X2EventTriggerDefinition
+       NBNRTEventTriggerDefinitionPresent bool
+       NBNRTEventTriggerDefinition
+}
+
+//-----------------------------------------------------------------------------
+//
+//-----------------------------------------------------------------------------
+type X2EventTriggerDefinition struct {
        InterfaceId
        InterfaceDirection uint32
        ProcedureCode      uint32
        TypeOfMessage      uint64
 }
 
+//-----------------------------------------------------------------------------
+//
+//-----------------------------------------------------------------------------
+type NBNRTEventTriggerDefinition struct {
+       TriggerNature uint8
+}
+
+const ( // enum NRTTriggerNature
+       NRTTriggerNature_now = iota
+       NRTTriggerNature_onchange
+)
+
 /*
 //-----------------------------------------------------------------------------
 //
@@ -198,14 +220,147 @@ type CallProcessId struct {
 }
 */
 
+type ActionDefinitionChoice struct {
+       ActionDefinitionX2Format1Present  bool
+       ActionDefinitionX2Format1         E2SMgNBX2actionDefinition
+       ActionDefinitionX2Format2Present  bool
+       ActionDefinitionX2Format2         ActionDefinitionFormat2
+       ActionDefinitionNRTFormat1Present bool
+       ActionDefinitionNRTFormat1        E2SMgNBNRTActionDefinitionFormat1
+}
+
+//-----------------------------------------------------------------------------
+//
+//-----------------------------------------------------------------------------
+type E2SMgNBNRTActionDefinitionFormat1 struct {
+       RanParameterList []RANParameterItem // 1..255
+}
+
+//-----------------------------------------------------------------------------
+//
+//-----------------------------------------------------------------------------
+type E2SMgNBX2actionDefinition struct {
+       StyleID              uint64
+       ActionParameterItems []ActionParameterItem // 1..255
+}
+
+//-----------------------------------------------------------------------------
+//
+//-----------------------------------------------------------------------------
+type ActionParameterItem struct {
+       ParameterID          uint32 // 1..255
+       ActionParameterValue ActionParameterValue
+}
+
+//-----------------------------------------------------------------------------
+//
+//-----------------------------------------------------------------------------
+type ActionParameterValue struct {
+       ValueIntPresent  bool
+       ValueInt         int64
+       ValueEnumPresent bool
+       ValueEnum        int64
+       ValueBoolPresent bool
+       ValueBool        bool
+       ValueBitSPresent bool
+       ValueBitS        BitString
+       ValueOctSPresent bool
+       ValueOctS        OctetString
+       ValuePrtSPresent bool
+       ValuePrtS        OctetString
+}
+
+//-----------------------------------------------------------------------------
+//
+//-----------------------------------------------------------------------------
+type ActionDefinitionFormat2 struct {
+       RanUEgroupItems []RANueGroupItem // 1..15
+}
+
+//-----------------------------------------------------------------------------
+//
+//-----------------------------------------------------------------------------
+type RANueGroupItem struct {
+       RanUEgroupID         int64
+       RanUEgroupDefinition RANueGroupDefinition
+       RanPolicy            RANimperativePolicy
+}
+
+//-----------------------------------------------------------------------------
+//
+//-----------------------------------------------------------------------------
+type RANueGroupDefinition struct {
+       RanUEGroupDefItems []RANueGroupDefItem // 1..255
+}
+
+//-----------------------------------------------------------------------------
+//
+//-----------------------------------------------------------------------------
+type RANimperativePolicy struct {
+       RanParameterItems []RANParameterItem // 1..255
+}
+
+//-----------------------------------------------------------------------------
+//
+//-----------------------------------------------------------------------------
+type RANueGroupDefItem struct {
+       RanParameterID    uint32 // 1..255
+       RanParameterTest  uint8
+       RanParameterValue RANParameterValue
+}
+
+//-----------------------------------------------------------------------------
+//
+//-----------------------------------------------------------------------------
+type RANParameterItem struct {
+       RanParameterID    uint8 // 1..255
+       RanParameterValue RANParameterValue
+}
+
+//-----------------------------------------------------------------------------
+//
+//-----------------------------------------------------------------------------
+const ( // enum RANParameterTest
+       RANParameterTest_equal = iota
+       RANParameterTest_greaterthan
+       RANParameterTest_lessthan
+       RANParameterTest_contains
+       RANParameterTest_present
+)
+
+//-----------------------------------------------------------------------------
+//
+//-----------------------------------------------------------------------------
+type RANParameterValue struct {
+       ValueIntPresent  bool
+       ValueInt         int64
+       ValueEnumPresent bool
+       ValueEnum        int64
+       ValueBoolPresent bool
+       ValueBool        bool
+       ValueBitSPresent bool
+       ValueBitS        BitString
+       ValueOctSPresent bool
+       ValueOctS        OctetString
+       ValuePrtSPresent bool
+       ValuePrtS        OctetString
+}
+
+//-----------------------------------------------------------------------------
+//
+//-----------------------------------------------------------------------------
+type BitString struct {
+       UnusedBits uint8
+       Length     uint64
+       Data       []uint8
+}
+
 //-----------------------------------------------------------------------------
 //
 //-----------------------------------------------------------------------------
-type ActionDefinition struct {
-       Present bool
-       StyleId uint64
-       ParamId uint32
-       //ParamValue
+type OctetString struct {
+       Length uint64
+       Data   []uint8
 }
 
 //-----------------------------------------------------------------------------
@@ -255,9 +410,10 @@ const (
 )
 
 type ActionToBeSetupItem struct {
-       ActionId   uint64
-       ActionType uint64
-       ActionDefinition
+       ActionId                   uint64
+       ActionType                 uint64
+       RicActionDefinitionPresent bool
+       ActionDefinitionChoice
        SubsequentAction
 }