New submgr for testing. Tagged as ric-plt-submgr:r3-test-v2. Tested that submgr can receive and forward messages correctly.
Signed-off-by: Anssi Mannila <anssi.mannila@nokia.com>
Change-Id: Ib6a472c3205fbf2e2d9a030282b7071a12ee8b0d
diff --git a/pkg/control/e2ap.go b/pkg/control/e2ap.go
index 6f5edcb..f9580d9 100644
--- a/pkg/control/e2ap.go
+++ b/pkg/control/e2ap.go
@@ -117,3 +117,49 @@
newPayload = C.GoBytes(cptr, C.int(size))
return
}
+
+/* RICsubscriptionRequestFailure */
+
+func (c *E2ap) GetSubscriptionFailureSequenceNumber(payload []byte) (subId uint16, err error) {
+ cptr := unsafe.Pointer(&payload[0])
+ cret := C.e2ap_get_ric_subscription_failure_sequence_number(cptr, C.size_t(len(payload)))
+ if cret < 0 {
+ return 0, errors.New("e2ap wrapper is unable to get Subscirption Failure Sequence Number due to wrong or invalid payload")
+ }
+ subId = uint16(cret)
+ return
+}
+
+// This function is not used currently. Can be deleted if not needed
+func (c *E2ap) SetSubscriptionFailureSequenceNumber(payload []byte, newSubscriptionid uint16) (newPayload []byte, err error) {
+ cptr := unsafe.Pointer(&payload[0])
+ size := C.e2ap_set_ric_subscription_failure_sequence_number(cptr, C.size_t(len(payload)), C.long(newSubscriptionid))
+ if size < 0 {
+ return make([]byte, 0), errors.New("e2ap wrapper is unable to set Subscription Failure Sequence Number due to wrong or invalid payload")
+ }
+ newPayload = C.GoBytes(cptr, C.int(size))
+ return
+}
+
+/* RICsubscriptionDeleteFailure */
+
+func (c *E2ap) GetSubscriptionDeleteFailureSequenceNumber(payload []byte) (subId uint16, err error) {
+ cptr := unsafe.Pointer(&payload[0])
+ cret := C.e2ap_get_ric_subscription_delete_failure_sequence_number(cptr, C.size_t(len(payload)))
+ if cret < 0 {
+ return 0, errors.New("e2ap wrapper is unable to get Subscirption Delete Failure Sequence Number due to wrong or invalid payload")
+ }
+ subId = uint16(cret)
+ return
+}
+
+// This function is not used currently. Can be deleted if not needed
+func (c *E2ap) SetSubscriptionDeleteFailureSequenceNumber(payload []byte, newSubscriptionid uint16) (newPayload []byte, err error) {
+ cptr := unsafe.Pointer(&payload[0])
+ size := C.e2ap_set_ric_subscription_delete_failure_sequence_number(cptr, C.size_t(len(payload)), C.long(newSubscriptionid))
+ if size < 0 {
+ return make([]byte, 0), errors.New("e2ap wrapper is unable to set Subscription Delete Failure Sequence Number due to wrong or invalid payload")
+ }
+ newPayload = C.GoBytes(cptr, C.int(size))
+ return
+}