sandeepindia | fbc7e3a | 2023-06-28 18:03:26 +0530 | [diff] [blame] | 1 | #ifndef _WRAPPER_E2AP_H_ |
| 2 | #define _WRAPPER_E2AP_H_ |
| 3 | #include <stdio.h> |
| 4 | #include <stdlib.h> |
| 5 | #include "RICsubscriptionRequest.h" |
| 6 | #include "RICsubscriptionResponse.h" |
| 7 | #include "RICsubscriptionDeleteRequest.h" |
| 8 | #include "RICsubscriptionDeleteResponse.h" |
| 9 | #include "RICcontrolRequest.h" |
| 10 | #include "RICindication.h" |
| 11 | #include "E2AP-PDU.h" |
| 12 | #include "InitiatingMessage.h" |
| 13 | #include "SuccessfulOutcome.h" |
| 14 | #include "UnsuccessfulOutcome.h" |
| 15 | #include "ProtocolIE-Container.h" |
| 16 | #include "ProtocolIE-Field.h" |
| 17 | #include "RICactionDefinition.h" |
| 18 | #include "RICsubsequentAction.h" |
| 19 | #include "CauseRIC.h" |
| 20 | |
| 21 | typedef struct RICControlAcknowledgeMsg { |
| 22 | long requestorID; |
| 23 | long instanceID; |
| 24 | long ranfunctionID; |
| 25 | uint8_t *callProcessID; |
| 26 | size_t callProcessIDSize; |
| 27 | uint8_t *ricControlOutCome; |
| 28 | size_t ricControlOutComeSize; |
| 29 | }RICControlAcknowledge; |
| 30 | |
| 31 | typedef struct RICControlFailureMsg { |
| 32 | long requestorID; |
| 33 | long instanceID; |
| 34 | long ranfunctionID; |
| 35 | uint8_t *callProcessID; |
| 36 | size_t callProcessIDSize; |
| 37 | uint8_t *ricControlOutCome; |
| 38 | size_t ricControlOutComeSize; |
| 39 | int causeType; |
| 40 | long causeValue; |
| 41 | |
| 42 | }RICControlFailure; |
| 43 | |
| 44 | typedef struct RICindicationMessage { |
| 45 | long requestorID; |
| 46 | long requestSequenceNumber; |
| 47 | long ranfunctionID; |
| 48 | long actionID; |
| 49 | long indicationSN; |
| 50 | long indicationType; |
| 51 | uint8_t *indicationHeader; |
| 52 | size_t indicationHeaderSize; |
| 53 | uint8_t *indicationMessage; |
| 54 | size_t indicationMessageSize; |
| 55 | uint8_t *callProcessID; |
| 56 | size_t callProcessIDSize; |
| 57 | } RICindicationMsg; |
| 58 | |
| 59 | typedef struct RICcauseItem { |
| 60 | int ricCauseType; |
| 61 | long ricCauseID; |
| 62 | } RICcauseItem; |
| 63 | |
| 64 | typedef struct RICactionAdmittedList { |
| 65 | long ricActionID[16]; |
| 66 | int count; |
| 67 | } RICactionAdmittedList; |
| 68 | |
| 69 | typedef struct RICactionNotAdmittedList { |
| 70 | long ricActionID[16]; |
| 71 | RICcauseItem ricCause[16]; |
| 72 | int count; |
| 73 | } RICactionNotAdmittedList; |
| 74 | |
| 75 | typedef struct RICsubscriptionResponseMessage { |
| 76 | long requestorID; |
| 77 | long requestSequenceNumber; |
| 78 | long ranfunctionID; |
| 79 | RICactionAdmittedList ricActionAdmittedList; |
| 80 | RICactionNotAdmittedList ricActionNotAdmittedList; |
| 81 | } RICsubscriptionResponseMsg; |
| 82 | |
| 83 | typedef struct RICactionDefinition { |
| 84 | uint8_t *actionDefinition; |
| 85 | int size; |
| 86 | } RICactionDefinition; |
| 87 | |
| 88 | typedef struct RICSubsequentAction { |
| 89 | int isValid; |
| 90 | long subsequentActionType; |
| 91 | long timeToWait; |
| 92 | } RICSubsequentAction; |
| 93 | |
| 94 | size_t encode_E2AP_PDU(E2AP_PDU_t* pdu, void* buffer, size_t buf_size); |
| 95 | E2AP_PDU_t* decode_E2AP_PDU(const void* buffer, size_t buf_size); |
| 96 | |
| 97 | /* RICsubscriptionRequest */ |
| 98 | long e2ap_get_ric_subscription_request_sequence_number(void *buffer, size_t buf_size); |
| 99 | ssize_t e2ap_set_ric_subscription_request_sequence_number(void *buffer, size_t buf_size, long sequence_number); |
| 100 | ssize_t e2ap_encode_ric_subscription_request_message(void *buffer, size_t buf_size, long ricRequestorID, long ricRequestSequenceNumber, long ranFunctionID, void *eventTriggerDefinition, size_t eventTriggerDefinitionSize, int actionCount, long *actionIds, long* actionTypes, RICactionDefinition *actionDefinitions, RICSubsequentAction *subsequentActionTypes); |
| 101 | |
| 102 | /* RICsubscriptionResponse */ |
| 103 | long e2ap_get_ric_subscription_response_sequence_number(void *buffer, size_t buf_size); |
| 104 | ssize_t e2ap_set_ric_subscription_response_sequence_number(void *buffer, size_t buf_size, long sequence_number); |
| 105 | RICsubscriptionResponseMsg* e2ap_decode_ric_subscription_response_message(void *buffer, size_t buf_size); |
| 106 | |
| 107 | /* RICsubscriptionFailure */ |
| 108 | long e2ap_get_ric_subscription_failure_sequence_number(void *buffer, size_t buf_size); |
| 109 | |
| 110 | /* RICsubscriptionDeleteRequest */ |
| 111 | long e2ap_get_ric_subscription_delete_request_sequence_number(void *buffer, size_t buf_size); |
| 112 | ssize_t e2ap_set_ric_subscription_delete_request_sequence_number(void *buffer, size_t buf_size, long sequence_number); |
| 113 | ssize_t e2ap_encode_ric_subscription_delete_request_message(void *buffer, size_t buf_size, long ricRequestorID, long ricRequestSequenceNumber, long ranFunctionID); |
| 114 | |
| 115 | /* RICsubscriptionDeleteResponse */ |
| 116 | long e2ap_get_ric_subscription_delete_response_sequence_number(void *buffer, size_t buf_size); |
| 117 | ssize_t e2ap_set_ric_subscription_delete_response_sequence_number(void *buffer, size_t buf_size, long sequence_number); |
| 118 | |
| 119 | /* RICsubscriptionDeleteFailure */ |
| 120 | long e2ap_get_ric_subscription_delete_failure_sequence_number(void *buffer, size_t buf_size); |
| 121 | |
| 122 | /* RICindication */ |
| 123 | RICindicationMsg* e2ap_decode_ric_indication_message(void *buffer, size_t buf_size); |
| 124 | RICindicationMsg* e2ap_decode_ric_indication_m(); |
| 125 | void e2ap_free_decoded_ric_indication_message(RICindicationMsg* msg); |
| 126 | |
| 127 | /* RICcontrol */ |
| 128 | ssize_t e2ap_encode_ric_control_request_message(void *buffer, size_t buf_size, long ricRequestorID, long ricRequestSequenceNumber, long ranFunctionID, void *ricControlHdr, size_t ricControlHdrSize, void *ricControlMsg, size_t ricControlMsgSize); |
| 129 | |
| 130 | RICControlAcknowledge* e2ap_decode_ric_control_acknowledge_message(void *buffer, size_t buf_size); |
| 131 | void e2ap_free_decoded_ric_control_ack(RICControlAcknowledge* msg); |
| 132 | |
| 133 | RICControlFailure* e2ap_decode_ric_control_failure_message(void *buffer, size_t buf_size); |
| 134 | void e2ap_free_decoded_ric_control_failure(RICControlFailure* msg); |
| 135 | |
| 136 | #endif /* _WRAPPER_E2AP_H_ */ |