#include <algorithm>
#include <stdlib.h>
#include <stdio.h>
+#define __STDC_FORMAT_MACROS
#include <inttypes.h>
#include <string.h>
#include <string>
{
throw "Failed to set 'brightness' in payload";
}
- OIC_LOG_V(INFO, TAG, " Brightness State (Hue Bulb): %ld Brightness(OCF) : %d",
- light_state.bri, ocfBrightness);
+ OIC_LOG_V(INFO, TAG, " Brightness State (Hue Bulb): %" PRIu64 " Brightness(OCF) : %d",
+ light_state.bri, ocfBrightness);
}
else if (HUE_CHROMA_RESOURCE_TYPE == resType)
{
{
throw "Failed to set csc in payload" ;
}
- OIC_LOG_V(INFO, TAG, "hue: %ld, sat: %ld, csc: [%f, %f] in payload.",
+ OIC_LOG_V(INFO, TAG, "hue: %" PRIu64 ", sat: %" PRIu64 ", csc: [%f, %f] in payload.",
light_state.hue,
light_state.sat,
light_state.csc[0],
{
throw "No brightness in representation" ;
}
- OIC_LOG_V(INFO, TAG, "PUT/POST brightness:%ld", light_resource.bri);
+ OIC_LOG_V(INFO, TAG, "PUT/POST brightness:%" PRIu64 "", light_resource.bri);
// Sclae up from 1-100 for OCF Light to 1-254 for Hue device
light_resource.bri *= 2.54;
{
state.hue = light_resource.hue;
isChromaPropertyInPayload = true;
- OIC_LOG_V(INFO, TAG, "PUT/POST hue :%ld", state.hue);
+ OIC_LOG_V(INFO, TAG, "PUT/POST hue :%" PRIu64 "", state.hue);
}
if (!OCRepPayloadGetPropInt(input, "saturation", &light_resource.sat))
{
state.sat = light_resource.sat;
isChromaPropertyInPayload = true;
- OIC_LOG_V(INFO, TAG, "PUT/POST sat :%ld", state.sat);
+ OIC_LOG_V(INFO, TAG, "PUT/POST sat :%" PRIu64 "", state.sat);
}
if (!OCRepPayloadSetPropInt(payload, "hue", state.hue) ||
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
//
+#define __STDC_FORMAT_MACROS
+#include <inttypes.h>
#include "stringbuffer.h"
#include "writer.h"
#include "curlClient.h"
if (parsedLights.size() != 1)
{
- OIC_LOG_V(ERROR, TAG, "This is irregular! Instead of 1 light, returned %ld " , parsedLights.size());
+ OIC_LOG_V(ERROR, TAG, "This is irregular! Instead of 1 light, returned %" PRIuPTR "", parsedLights.size());
return MPM_RESULT_JSON_ERROR;
}