Temp fix with macros to convert COAP codes to CA code.
Change-Id: I3bb759c63dafcfcc5a491133577c75240d63affe
Signed-off-by: Mandeep Shetty <mandeep.shetty@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/475
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Sashi Penta <sashi.kumar.penta@intel.com>
Reviewed-by: Sudarshan Prasad <sudarshan.prasad@intel.com>
#endif
typedef uint32_t code_t;
+#define CA_RESPONSE_CLASS(C) (((C) >> 5)*100)
+#define CA_RESPONSE_CODE(C) (CA_RESPONSE_CLASS(C) + (C - COAP_RESPONSE_CODE(CA_RESPONSE_CLASS(C))))
/**
* @brief generates pdu structure from the given information.
// set code
if (outCode)
{
- (*outCode) = (uint32_t) pdu->hdr->code;
+ (*outCode) = (uint32_t) CA_RESPONSE_CODE(pdu->hdr->code);
}
// init HeaderOption list