Changeset 390 for azure_iot_hub/trunk/app_iothub_client/src/client.c
- Timestamp:
- May 23, 2019, 12:45:39 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
azure_iot_hub/trunk/app_iothub_client/src/client.c
r389 r390 160 160 else 161 161 { 162 #if 0162 #if 1 163 163 (void)printf("Starting the IoTHub client sample HTTP...\r\n"); 164 164 IOTHUB_CLIENT_TRANSPORT_PROVIDER protocol = HTTP_Protocol; … … 235 235 temperature = minTemperature + (rand() % 10); 236 236 humidity = minHumidity + (rand() % 20); 237 sprintf_s(msgText, sizeof(msgText), "{\"deviceId\":\"myFirstDevice\",\"windSpeed\":%.2f,\"temperature\":%.2f,\"humidity\":%.2f}", avgWindSpeed + (rand() % 4 + 2), temperature, humidity);237 sprintf_s(msgText, sizeof(msgText), "{\"windSpeed\":%.2f,\"temperature\":%.2f,\"humidity\":%.2f}", avgWindSpeed + (rand() % 4 + 2), temperature, humidity); 238 238 if ((messages[iterator].messageHandle = IoTHubMessage_CreateFromByteArray((const unsigned char*)msgText, strlen(msgText))) == NULL) 239 239 {
Note:
See TracChangeset
for help on using the changeset viewer.