- return true;
-}
-bool XappMsgHandler::encode_subscription_delete_request(unsigned char* buffer, size_t *buf_len){
-
- subscription_helper sub_helper;
- sub_helper.set_request(0, 0); // requirement of subscription manager ... ?
- sub_helper.set_function_id(0);
-
- subscription_delete e2ap_sub_req_del;
-
- // generate the delete request pdu
-
- bool res = e2ap_sub_req_del.encode_e2ap_subscription(&buffer[0], buf_len, sub_helper);
- if(! res){
- mdclog_write(MDCLOG_ERR, "%s, %d: Error encoding subscription delete request pdu. Reason = %s", __FILE__, __LINE__, e2ap_sub_req_del.get_error().c_str());
- return false;
- }
-
- return true;
-
-}
-
-bool XappMsgHandler::decode_subscription_response(unsigned char* data_buf, size_t data_size){
-
- bool res = true;
- E2N_E2AP_PDU_t *e2pdu = 0;
-
- asn_dec_rval_t rval;
-
- ASN_STRUCT_RESET(asn_DEF_E2N_E2AP_PDU, e2pdu);
-
- rval = asn_decode(0,ATS_ALIGNED_BASIC_PER, &asn_DEF_E2N_E2AP_PDU, (void**)&e2pdu, data_buf, data_size);
- switch(rval.code)
- {
- case RC_OK:
- //Put in Subscription Response Object.
- asn_fprint(stdout, &asn_DEF_E2N_E2AP_PDU, e2pdu);
-
- break;
- case RC_WMORE:
- mdclog_write(MDCLOG_ERR, "RC_WMORE");
- res = false;
- break;
- case RC_FAIL:
- mdclog_write(MDCLOG_ERR, "RC_FAIL");
- res = false;
- break;
- default:
- break;
- }
- ASN_STRUCT_FREE(asn_DEF_E2N_E2AP_PDU, e2pdu);
- return res;
-
-}
-bool XappMsgHandler::decode_subscription_delete_response(unsigned char* data_buf, size_t data_size){
-
- bool res = true;
- E2N_E2AP_PDU_t *e2pdu = 0;
-
- asn_dec_rval_t rval;
-
- ASN_STRUCT_RESET(asn_DEF_E2N_E2AP_PDU, e2pdu);
-
- rval = asn_decode(0,ATS_ALIGNED_BASIC_PER, &asn_DEF_E2N_E2AP_PDU, (void**)&e2pdu, data_buf, data_size);
- switch(rval.code)
- {
- case RC_OK:
- //Put in Subscription Delete Response Object.
- asn_fprint(stdout, &asn_DEF_E2N_E2AP_PDU, e2pdu);
- break;
- case RC_WMORE:
- mdclog_write(MDCLOG_ERR, "RC_WMORE");
- res = false;
- break;
- case RC_FAIL:
- mdclog_write(MDCLOG_ERR, "RC_FAIL");
- res = false;
+ a1_policy_helper helper;
+ bool res=false;
+ switch(message->mtype){
+ //need to fix the health check.
+ case (RIC_HEALTH_CHECK_REQ):
+ message->mtype = RIC_HEALTH_CHECK_RESP; // if we're here we are running and all is ok
+ message->sub_id = -1;
+ strncpy( (char*)message->payload, "HELLOWORLD OK\n", rmr_payload_size( message) );
+ *resend = true;