- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试在树莓派 3 上构建一个 C 应用程序,它收集一些传感器读数并将它们记录到 mongodb 日志附加程序中。我面临应用程序的非常奇怪的行为
这是我的应用程序代码,从主函数调用
#include <stdio.h>
#include <stdlib.h>
#include <kaa/kaa.h>
#include <kaa/platform/kaa_client.h>
#include <kaa/kaa_error.h>
#include "dht11.h"
#include "kaa-log.h"
#define KAA_LOG_GENERATION_FREQUENCY 1 // in seconds
/*
* Pin on Rasbery Pi 3 Model B
*/
#define DHT11_PIN 7
static void kaa_loop(void *context)
{
static bool logInitialized = false;
kaa_client_t *kaa_client = context;
if (!logInitialized)
{
logInitialized = true;
kaaLogInitializing(kaa_client);
}
if (logDelivered != LOG_DELIVERY_DELIVERING)
{
logDelivered = LOG_DELIVERY_IDLE;
read_dht11_dat();
sendLog(kaa_client);
}
//kaa_client_stop(context);
}
uint8_t kaa_application_start()
{
printf("Starting kaa application\n");
kaa_client_t *kaa_client = NULL;
kaa_error_t error = kaa_client_create(&kaa_client, NULL);
if (error) {
return EXIT_FAILURE;
}
error = kaa_client_start(kaa_client, kaa_loop, (void *)kaa_client, KAA_LOG_GENERATION_FREQUENCY);
kaa_client_destroy(kaa_client);
if (error) {
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}
这是我的 kaa 日志代码
#include <stdio.h>
#include <kaa/kaa.h>
#include <kaa/platform/kaa_client.h>
#include <kaa/kaa_error.h>
#include <extensions/logging/kaa_logging.h>
#include <kaa/platform-impl/common/ext_log_upload_strategies.h>
#include <extensions/logging/kaa_logging_private.h>
#include <kaa/gen/kaa_logging_gen.h>
#include <kaa/utilities/kaa_mem.h>
#include "kaa-log.h"
#define LOG_UPLOAD_THRESHOLD 1
#define MAX_LOG_BUCKET_SIZE SIZE_MAX
#define MAX_LOG_COUNT 5
uint8_t logDelivered = LOG_DELIVERY_IDLE;
/* Set of routines that handles log delivery events */
static void success_log_delivery_callback(void *context, const kaa_log_bucket_info_t *bucket)
{
/* ... */
logDelivered = LOG_DELIVERY_DELIVERED_SUCCESS;
printf("Log Sent\n");
// kaa_client_t * kaa_client_context = context;
// kaa_client_stop(kaa_client_context);
}
static void failed_log_delivery_callback(void *context, const kaa_log_bucket_info_t *bucket)
{
/* ... */
logDelivered = LOG_DELIVERY_DELIVERED_FAILURE;
printf("Log Failure\n");
// kaa_client_t * kaa_client_context = context;
// kaa_client_stop(kaa_client_context);
}
static void timeout_log_delivery_callback(void *context, const kaa_log_bucket_info_t *bucket)
{
/* ... */
logDelivered = LOG_DELIVERY_DELIVERED_TIMEOUT;
printf("Log Timeout\n");
// kaa_client_t * kaa_client_context = context;
// kaa_client_stop(kaa_client_context);
}
void kaaLogInitializing(void *context)
{
void *log_storage_context = NULL;
void *log_upload_strategy_context = NULL;
printf("Initializing the Kaa log\n");
kaa_client_t * kaa_client_context = context;
if (context == NULL) {
return;
}
/* Log delivery listener callbacks. Each callback called whenever something happen with a log bucket. */
kaa_log_delivery_listener_t log_listener = {
.on_success = success_log_delivery_callback, /* Called if log delivered successfully */
.on_failed = failed_log_delivery_callback, /* Called if delivery failed */
.on_timeout = timeout_log_delivery_callback, /* Called if timeout occurs */
.ctx = kaa_client_context, /* Optional context */
};
/* The internal memory log storage distributed with Kaa SDK */
kaa_error_t error_code = ext_unlimited_log_storage_create(&log_storage_context,
kaa_client_get_context(
kaa_client_context
)->logger
);
if (error_code) {
printf("Failed to create Kaa log storage %d\r\n", error_code);
return;
}
error_code = ext_log_upload_strategy_create(kaa_client_get_context(
kaa_client_context),
&log_upload_strategy_context, KAA_LOG_UPLOAD_VOLUME_STRATEGY);
if (error_code) {
printf("Failed to create log upload strategy, error code %d\r\n", error_code);
return;
}
error_code = ext_log_upload_strategy_set_threshold_count(log_upload_strategy_context,
LOG_UPLOAD_THRESHOLD);
if (error_code) {
printf("Failed to set threshold log record count, error code %d\r\n", error_code);
return;
}
error_code = kaa_logging_set_strategy(kaa_client_get_context(kaa_client_context)->log_collector,
log_upload_strategy_context);
if (error_code) {
printf("Failed to set log upload strategy, error code %d\r\n", error_code);
return;
}
/* Specify log bucket size constraints */
kaa_log_bucket_constraints_t bucket_sizes = {
.max_bucket_size = MAX_LOG_BUCKET_SIZE, /* Bucket size in bytes */
.max_bucket_log_count = MAX_LOG_COUNT, /* Maximum log count in one bucket */
};
/* Initialize the log storage and strategy (by default it is not set) */
error_code = kaa_logging_init(kaa_client_get_context(
kaa_client_context)->log_collector
, log_storage_context
, log_upload_strategy_context
, &bucket_sizes);
if (error_code) {
printf("Failed to initialize Kaa log %d\r\n", error_code);
return;
}
/* Add listeners to a log collector */
kaa_logging_set_listeners(kaa_client_get_context(
kaa_client_context)->log_collector,
&log_listener);
}
void sendLog(void *context)
{
kaa_client_t * kaa_client_context = context;
double *p_temperature = KAA_MALLOC(sizeof(double));
if (!p_temperature) {
// error handling
}
*p_temperature = 25.5;
if (context == NULL) {
return;
}
logDelivered = LOG_DELIVERY_DELIVERING;
printf("Start attempt to send Log\n");
kaa_logging_remote_sensor_log_t *log_record = kaa_logging_remote_sensor_log_create();
log_record->device_id = kaa_string_copy_create("Dev1");
log_record->temperature = kaa_logging_union_double_or_null_branch_0_create();
log_record->temperature->data = p_temperature; /* create subobject */
log_record->humidity = kaa_logging_union_long_or_null_branch_1_create();
log_record->battery_level = kaa_logging_union_int_or_null_branch_1_create();
printf("Log record created\n");
/* Log information. Populated when log is added via kaa_logging_add_record() */
kaa_log_record_info_t log_info;
kaa_error_t error = kaa_logging_add_record(
kaa_client_get_context(kaa_client_context)->log_collector,
log_record, &log_info);
if (error) {
printf("Failed to add log record, error code\r\n");
kaa_client_stop(kaa_client_context);
return;
}
log_record->destroy(log_record);
logDelivered = LOG_DELIVERY_IDLE;
}
行为:
KAA_LOG_GENERATION_FREQUENCY
更改为任意数字,例如 60,即使再次运行可执行文件,我也永远不会获得任何记录这是跟踪日志
2017/02/14 1:30:12 [TRACE] [kaa_client.c:402] (0) - Channel [0x79303301] initialized successfully (type 1)
2017/02/14 1:30:12 [TRACE] [kaa_logging.c:449] (0) - Upload will not be triggered now.
Initializing the Kaa log
2017/02/14 1:30:12 [DEBUG] [kaa_logging.c:383] (0) - Initialized log collector with log storage {0x20f7c8}, log upload strategy {0x20f5f8}
Data not good, skip
Start attempt to send Log
Log record created
2017/02/14 1:30:12 [TRACE] [kaa_logging.c:566] (0) - Added log record, size 0, bucket 1
2017/02/14 1:30:12 [TRACE] [kaa_logging.c:449] (0) - Upload will not be triggered now.
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:850] (0) - Kaa TCP channel new access point [0x929A2016] destination resolved
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:1489] (0) - Kaa TCP channel [0x929A2016] connecting to the server...
2017/02/14 1:30:12 [TRACE] [kaa_client.c:270] (0) - Channel [0x79303301] successfully connected
2017/02/14 1:30:12 [TRACE] [kaa_logging.c:449] (0) - Upload will not be triggered now.
2017/02/14 1:30:12 [TRACE] [kaa_client.c:235] (0) - Processing OUT event for the client socket 4
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:740] (0) - Kaa TCP channel [0x929A2016] socket was successfully connected
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:1156] (0) - Calling kaa_platform_protocol_alloc_serialize_client_sync
2017/02/14 1:30:12 [TRACE] [kaa_platform_protocol.c:245] (0) - Serializing client sync...
2017/02/14 1:30:12 [TRACE] [kaa_platform_protocol.c:72] (0) - Going to serialize client meta sync
2017/02/14 1:30:12 [TRACE] [kaa_platform_protocol.c:111] (0) - Meta sync: payload length '76', request id '2'
2017/02/14 1:30:12 [TRACE] [kaa_notification_manager.c:505] (0) - Going to serialize client notification sync
2017/02/14 1:30:12 [TRACE] [kaa_notification_manager.c:520] (0) - Going to serialize 0 topic states
2017/02/14 1:30:12 [TRACE] [kaa_notification_manager.c:532] (0) - Going to serialize 0 uids
2017/02/14 1:30:12 [TRACE] [kaa_logging.c:655] (0) - Going to serialize client logging sync
2017/02/14 1:30:12 [TRACE] [kaa_logging.c:686] (0) - Extracting log records... (bucket size 34)
2017/02/14 1:30:12 [INFO] [kaa_logging.c:733] (0) - Created log bucket: id '1', log records count 1, payload size 36
2017/02/14 1:30:12 [TRACE] [kaa_event.c:695] (0) - Going to serialize client event sync
2017/02/14 1:30:12 [TRACE] [kaa_event.c:701] (0) - Going to sync event SQN
2017/02/14 1:30:12 [TRACE] [kaa_configuration_manager.c:220] (0) - Going to serialize client configuration sync
2017/02/14 1:30:12 [TRACE] [kaa_user.c:435] (0) - Going to serialize client user sync
2017/02/14 1:30:12 [TRACE] [kaa_profile.c:281] (0) - Going to compile profile client sync
2017/02/14 1:30:12 [TRACE] [kaa_profile.c:326] (0) - Writing public key (size 294)...
2017/02/14 1:30:12 [INFO] [kaa_platform_protocol.c:256] (0) - Client sync serialized: request id '2', payload size '504'
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:1180] (0) - Kaa TCP channel [0x929A2016] going to send CONNECT message (512 bytes)
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:1242] (0) - Kaa TCP channel [0x929A2016] created CONNECT message (1045 bytes)
2017/02/14 1:30:12 [TRACE] [kaa_logging.c:449] (0) - Upload will not be triggered now.
2017/02/14 1:30:12 [TRACE] [kaa_client.c:235] (0) - Processing OUT event for the client socket 4
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:1651] (0) - Kaa TCP channel [0x929A2016] writing 1045 bytes to the socket
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:1661] (0) - Kaa TCP channel [0x929A2016] 1045 bytes were successfully written
2017/02/14 1:30:12 [TRACE] [kaa_logging.c:449] (0) - Upload will not be triggered now.
2017/02/14 1:30:12 [TRACE] [kaa_client.c:226] (0) - Processing IN event for the client socket 4
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:680] (0) - Kaa TCP channel [0x929A2016] successfully read 4 bytes
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:954] (0) - Kaa TCP channel [0x929A2016] successfully authorized
2017/02/14 1:30:12 [TRACE] [kaa_logging.c:449] (0) - Upload will not be triggered now.
2017/02/14 1:30:12 [TRACE] [kaa_client.c:226] (0) - Processing IN event for the client socket 4
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:680] (0) - Kaa TCP channel [0x929A2016] successfully read 126 bytes
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:1015] (0) - Kaa TCP channel [0x929A2016] KAASYNC message received
2017/02/14 1:30:12 [INFO] [kaa_platform_protocol.c:271] (0) - Server sync received: payload size '104'
2017/02/14 1:30:12 [TRACE] [kaa_platform_protocol.c:326] (0) - Server sync request id 2
2017/02/14 1:30:12 [TRACE] [kaa_platform_protocol.c:340] (0) - Server resync request 0
2017/02/14 1:30:12 [INFO] [kaa_profile.c:372] (0) - Received profile server sync: options 0, payload size 0
2017/02/14 1:30:12 [INFO] [kaa_profile.c:387] (0) - Endpoint has been registered
2017/02/14 1:30:12 [INFO] [kaa_user.c:554] (0) - Received user server sync: options 0, payload size 0
2017/02/14 1:30:12 [INFO] [kaa_configuration_manager.c:249] (0) - Received configuration server sync: options 2, payload size 24
2017/02/14 1:30:12 [INFO] [kaa_configuration_manager.c:255] (0) - Received configuration body, size '17'
2017/02/14 1:30:12 [TRACE] [kaa_channel_manager.c:346] (0) - Transport channel [0x79303301] for service 5 was found
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:352] (0) - Kaa TCP channel [0x929A2016] sync for 1 services
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:1375] (0) - Kaa TCP channel [0x929A2016] 0 pending services, going to update 1 services
2017/02/14 1:30:12 [INFO] [kaa_notification_manager.c:1200] (0) - Received notification server sync: options 0, payload size 12
2017/02/14 1:30:12 [TRACE] [kaa_notification_manager.c:1208] (0) - Received delta response: NO DELTA. Going to clear uids list...
2017/02/14 1:30:12 [INFO] [kaa_notification_manager.c:1307] (0) - Received topics list. Topics count is 0
2017/02/14 1:30:12 [INFO] [kaa_notification_manager.c:1223] (0) - Received notifications. Notifications count is 0
2017/02/14 1:30:12 [TRACE] [kaa_channel_manager.c:346] (0) - Transport channel [0x79303301] for service 6 was found
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:352] (0) - Kaa TCP channel [0x929A2016] sync for 1 services
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:1375] (0) - Kaa TCP channel [0x929A2016] 1 pending services, going to update 1 services
2017/02/14 1:30:12 [INFO] [kaa_event.c:893] (0) - Received event server sync: options 1, payload size 4
2017/02/14 1:30:12 [INFO] [kaa_event.c:906] (0) - Received event sequence number '0'
2017/02/14 1:30:12 [TRACE] [kaa_platform_protocol.c:386] (0) - Server sync successfully processed
2017/02/14 1:30:12 [TRACE] [kaa_logging.c:449] (0) - Upload will not be triggered now.
2017/02/14 1:30:12 [TRACE] [kaa_client.c:235] (0) - Processing OUT event for the client socket 4
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:1651] (0) - Kaa TCP channel [0x929A2016] writing 0 bytes to the socket
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:778] (0) - Kaa TCP channel [0x929A2016] going to sync all services
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:1547] (0) - Kaa TCP channel [0x929A2016] going to serialize 2 pending services
2017/02/14 1:30:12 [TRACE] [kaa_platform_protocol.c:245] (0) - Serializing client sync...
2017/02/14 1:30:12 [TRACE] [kaa_platform_protocol.c:72] (0) - Going to serialize client meta sync
2017/02/14 1:30:12 [TRACE] [kaa_platform_protocol.c:111] (0) - Meta sync: payload length '76', request id '3'
2017/02/14 1:30:12 [TRACE] [kaa_notification_manager.c:505] (0) - Going to serialize client notification sync
2017/02/14 1:30:12 [TRACE] [kaa_notification_manager.c:520] (0) - Going to serialize 0 topic states
2017/02/14 1:30:12 [TRACE] [kaa_notification_manager.c:532] (0) - Going to serialize 0 uids
2017/02/14 1:30:12 [TRACE] [kaa_configuration_manager.c:220] (0) - Going to serialize client configuration sync
2017/02/14 1:30:12 [INFO] [kaa_platform_protocol.c:256] (0) - Client sync serialized: request id '3', payload size '132'
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:1587] (0) - Kaa TCP channel [0x929A2016] serialized client sync (144 bytes)
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:1329] (0) - Kaa TCP channel [0x929A2016] 2 pending services, going to delete 2 services
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:1627] (0) - Kaa TCP channel [0x929A2016] going to send KAASYNC message (144 bytes)
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:1651] (0) - Kaa TCP channel [0x929A2016] writing 159 bytes to the socket
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:1661] (0) - Kaa TCP channel [0x929A2016] 159 bytes were successfully written
2017/02/14 1:30:12 [TRACE] [kaa_logging.c:449] (0) - Upload will not be triggered now.
2017/02/14 1:30:12 [TRACE] [kaa_client.c:226] (0) - Processing IN event for the client socket 4
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:680] (0) - Kaa TCP channel [0x929A2016] successfully read 62 bytes
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:1015] (0) - Kaa TCP channel [0x929A2016] KAASYNC message received
2017/02/14 1:30:12 [INFO] [kaa_platform_protocol.c:271] (0) - Server sync received: payload size '40'
2017/02/14 1:30:12 [TRACE] [kaa_platform_protocol.c:326] (0) - Server sync request id 2
2017/02/14 1:30:12 [TRACE] [kaa_platform_protocol.c:340] (0) - Server resync request 0
2017/02/14 1:30:12 [INFO] [kaa_logging.c:764] (0) - Received logging server sync: options 0, payload size 8
2017/02/14 1:30:12 [INFO] [kaa_logging.c:774] (0) - Received 1 log delivery statuses
2017/02/14 1:30:12 [INFO] [kaa_logging.c:799] (0) - Log bucket uploaded successfully, id '1'
Log Sent
2017/02/14 1:30:12 [INFO] [kaa_logging.c:427] (0) - Initiating log upload...
2017/02/14 1:30:12 [TRACE] [kaa_channel_manager.c:346] (0) - Transport channel [0x79303301] for service 4 was found
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:352] (0) - Kaa TCP channel [0x929A2016] sync for 1 services
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:1375] (0) - Kaa TCP channel [0x929A2016] 0 pending services, going to update 1 services
2017/02/14 1:30:12 [TRACE] [kaa_platform_protocol.c:386] (0) - Server sync successfully processed
2017/02/14 1:30:12 [TRACE] [kaa_logging.c:449] (0) - Upload will not be triggered now.
2017/02/14 1:30:12 [TRACE] [kaa_client.c:235] (0) - Processing OUT event for the client socket 4
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:1651] (0) - Kaa TCP channel [0x929A2016] writing 0 bytes to the socket
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:778] (0) - Kaa TCP channel [0x929A2016] going to sync all services
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:1547] (0) - Kaa TCP channel [0x929A2016] going to serialize 1 pending services
2017/02/14 1:30:12 [TRACE] [kaa_platform_protocol.c:245] (0) - Serializing client sync...
2017/02/14 1:30:12 [TRACE] [kaa_platform_protocol.c:72] (0) - Going to serialize client meta sync
2017/02/14 1:30:12 [TRACE] [kaa_platform_protocol.c:111] (0) - Meta sync: payload length '76', request id '4'
2017/02/14 1:30:12 [INFO] [kaa_platform_protocol.c:256] (0) - Client sync serialized: request id '4', payload size '92'
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:1587] (0) - Kaa TCP channel [0x929A2016] serialized client sync (96 bytes)
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:1329] (0) - Kaa TCP channel [0x929A2016] 1 pending services, going to delete 1 services
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:1627] (0) - Kaa TCP channel [0x929A2016] going to send KAASYNC message (96 bytes)
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:1651] (0) - Kaa TCP channel [0x929A2016] writing 110 bytes to the socket
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:1661] (0) - Kaa TCP channel [0x929A2016] 110 bytes were successfully written
2017/02/14 1:30:12 [TRACE] [kaa_logging.c:449] (0) - Upload will not be triggered now.
2017/02/14 1:30:12 [TRACE] [kaa_client.c:226] (0) - Processing IN event for the client socket 4
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:680] (0) - Kaa TCP channel [0x929A2016] successfully read 78 bytes
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:1015] (0) - Kaa TCP channel [0x929A2016] KAASYNC message received
2017/02/14 1:30:12 [INFO] [kaa_platform_protocol.c:271] (0) - Server sync received: payload size '48'
2017/02/14 1:30:12 [TRACE] [kaa_platform_protocol.c:326] (0) - Server sync request id 3
2017/02/14 1:30:12 [TRACE] [kaa_platform_protocol.c:340] (0) - Server resync request 0
2017/02/14 1:30:12 [INFO] [kaa_configuration_manager.c:249] (0) - Received configuration server sync: options 0, payload size 0
2017/02/14 1:30:12 [INFO] [kaa_notification_manager.c:1200] (0) - Received notification server sync: options 0, payload size 8
2017/02/14 1:30:12 [TRACE] [kaa_notification_manager.c:1208] (0) - Received delta response: NO DELTA. Going to clear uids list...
2017/02/14 1:30:12 [INFO] [kaa_notification_manager.c:1223] (0) - Received notifications. Notifications count is 0
2017/02/14 1:30:12 [TRACE] [kaa_channel_manager.c:346] (0) - Transport channel [0x79303301] for service 6 was found
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:352] (0) - Kaa TCP channel [0x929A2016] sync for 1 services
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:1375] (0) - Kaa TCP channel [0x929A2016] 0 pending services, going to update 1 services
2017/02/14 1:30:12 [TRACE] [kaa_platform_protocol.c:386] (0) - Server sync successfully processed
2017/02/14 1:30:12 [TRACE] [kaa_logging.c:449] (0) - Upload will not be triggered now.
2017/02/14 1:30:12 [TRACE] [kaa_client.c:235] (0) - Processing OUT event for the client socket 4
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:1651] (0) - Kaa TCP channel [0x929A2016] writing 0 bytes to the socket
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:778] (0) - Kaa TCP channel [0x929A2016] going to sync all services
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:1547] (0) - Kaa TCP channel [0x929A2016] going to serialize 1 pending services
2017/02/14 1:30:12 [TRACE] [kaa_platform_protocol.c:245] (0) - Serializing client sync...
2017/02/14 1:30:12 [TRACE] [kaa_platform_protocol.c:72] (0) - Going to serialize client meta sync
2017/02/14 1:30:12 [TRACE] [kaa_platform_protocol.c:111] (0) - Meta sync: payload length '76', request id '5'
2017/02/14 1:30:12 [TRACE] [kaa_notification_manager.c:505] (0) - Going to serialize client notification sync
2017/02/14 1:30:12 [TRACE] [kaa_notification_manager.c:520] (0) - Going to serialize 0 topic states
2017/02/14 1:30:12 [TRACE] [kaa_notification_manager.c:532] (0) - Going to serialize 0 uids
2017/02/14 1:30:12 [INFO] [kaa_platform_protocol.c:256] (0) - Client sync serialized: request id '5', payload size '104'
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:1587] (0) - Kaa TCP channel [0x929A2016] serialized client sync (112 bytes)
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:1329] (0) - Kaa TCP channel [0x929A2016] 1 pending services, going to delete 1 services
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:1627] (0) - Kaa TCP channel [0x929A2016] going to send KAASYNC message (112 bytes)
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:1651] (0) - Kaa TCP channel [0x929A2016] writing 126 bytes to the socket
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:1661] (0) - Kaa TCP channel [0x929A2016] 126 bytes were successfully written
2017/02/14 1:30:12 [TRACE] [kaa_logging.c:449] (0) - Upload will not be triggered now.
2017/02/14 1:30:12 [TRACE] [kaa_client.c:226] (0) - Processing IN event for the client socket 4
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:680] (0) - Kaa TCP channel [0x929A2016] successfully read 46 bytes
2017/02/14 1:30:12 [TRACE] [kaa_tcp_channel.c:1015] (0) - Kaa TCP channel [0x929A2016] KAASYNC message received
2017/02/14 1:30:12 [INFO] [kaa_platform_protocol.c:271] (0) - Server sync received: payload size '24'
2017/02/14 1:30:12 [TRACE] [kaa_platform_protocol.c:326] (0) - Server sync request id 4
2017/02/14 1:30:12 [TRACE] [kaa_platform_protocol.c:340] (0) - Server resync request 0
2017/02/14 1:30:12 [TRACE] [kaa_platform_protocol.c:386] (0) - Server sync successfully processed
2017/02/14 1:30:12 [TRACE] [kaa_logging.c:449] (0) - Upload will not be triggered now.
2017/02/14 1:30:13 [TRACE] [kaa_client.c:226] (0) - Processing IN event for the client socket 4
2017/02/14 1:30:13 [TRACE] [kaa_tcp_channel.c:680] (0) - Kaa TCP channel [0x929A2016] successfully read 46 bytes
2017/02/14 1:30:13 [TRACE] [kaa_tcp_channel.c:1015] (0) - Kaa TCP channel [0x929A2016] KAASYNC message received
2017/02/14 1:30:13 [INFO] [kaa_platform_protocol.c:271] (0) - Server sync received: payload size '24'
2017/02/14 1:30:13 [TRACE] [kaa_platform_protocol.c:326] (0) - Server sync request id 5
2017/02/14 1:30:13 [TRACE] [kaa_platform_protocol.c:340] (0) - Server resync request 0
2017/02/14 1:30:13 [TRACE] [kaa_platform_protocol.c:386] (0) - Server sync successfully processed
2017/02/14 1:30:13 [TRACE] [kaa_logging.c:449] (0) - Upload will not be triggered now.
Data not good, skip
Start attempt to send Log
Log record created
2017/02/14 1:30:13 [TRACE] [kaa_logging.c:566] (0) - Added log record, size 0, bucket 2
2017/02/14 1:30:13 [TRACE] [kaa_logging.c:449] (0) - Upload will not be triggered now.
2017/02/14 1:30:14 [TRACE] [kaa_logging.c:449] (0) - Upload will not be triggered now.
Data not good, skip
Start attempt to send Log
Log record created
2017/02/14 1:30:14 [TRACE] [kaa_logging.c:566] (0) - Added log record, size 0, bucket 2
2017/02/14 1:30:14 [TRACE] [kaa_logging.c:449] (0) - Upload will not be triggered now.
2017/02/14 1:30:15 [TRACE] [kaa_logging.c:449] (0) - Upload will not be triggered now.
Data not good, skip
Start attempt to send Log
Log record created
2017/02/14 1:30:15 [TRACE] [kaa_logging.c:566] (0) - Added log record, size 0, bucket 2
2017/02/14 1:30:15 [TRACE] [kaa_logging.c:449] (0) - Upload will not be triggered now.
2017/02/14 1:30:16 [TRACE] [kaa_logging.c:449] (0) - Upload will not be triggered now.
Data not good, skip
Start attempt to send Log
Log record created
2017/02/14 1:30:16 [TRACE] [kaa_logging.c:566] (0) - Added log record, size 0, bucket 2
2017/02/14 1:30:16 [TRACE] [kaa_logging.c:449] (0) - Upload will not be triggered now.
2017/02/14 1:30:17 [TRACE] [kaa_logging.c:449] (0) - Upload will not be triggered now.
Data not good, skip
Start attempt to send Log
Log record created
2017/02/14 1:30:17 [TRACE] [kaa_logging.c:566] (0) - Added log record, size 0, bucket 2
2017/02/14 1:30:17 [TRACE] [kaa_logging.c:449] (0) - Upload will not be triggered now.
2017/02/14 1:30:18 [TRACE] [kaa_logging.c:449] (0) - Upload will not be triggered now.
Data not good, skip
Start attempt to send Log
Log record created
2017/02/14 1:30:18 [TRACE] [kaa_logging.c:566] (0) - Added log record, size 0, bucket 3
2017/02/14 1:30:18 [TRACE] [kaa_logging.c:449] (0) - Upload will not be triggered now.
2017/02/14 1:30:19 [TRACE] [kaa_logging.c:449] (0) - Upload will not be triggered now.
Data not good, skip
Start attempt to send Log
Log record created
2017/02/14 1:30:19 [TRACE] [kaa_logging.c:566] (0) - Added log record, size 0, bucket 3
最佳答案
我已经成功解决了这个问题,这就是我是如何做到的。在日志初始化中我刚刚删除了这一行
error_code = kaa_logging_set_strategy(kaa_client_get_context(kaa_client_context)->log_collector,
log_upload_strategy_context);
原因可能是kaa策略已经配置
关于c - RPI3 上 kaa C sdk 的奇怪行为,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42216357/
我有这种来自 Google map 自动完成的奇怪行为(或者我可能错过了某事)...想法?奇怪的: 您在输入中输入某物,例如“伦敦” 您按 [ENTER] 你按下 [CLEAR] 按钮 你点击进入'输
这段代码与《Learning Java》(Oracle Press Books)一书中的代码完全一样,但它不起作用。我不明白为什么它不起作用,它应该起作用。我用 OpenJDK 和 Sun JDK 7
示例 1 中究竟发生了什么?这是如何解析的? # doesnt split on , [String]::Join(",",("aaaaa,aaaaa,aaaaa,aaaaa,aaaaa,aa
我需要获得方程式系统的解决方案。为此,我使用函数sgesv_()。 一切都很好,它使我感到解决方案的正确结果。 但是我得到一个奇怪的警告。 警告:从不兼容的指针类型传递'sgesv_'的参数3 我正在
我目前在制作动画时遇到一个奇怪的问题: [UIView animateWithDuration:3 delay:0
alert('works'); $(window).load(function () { alert('does not work'); });
我的代码: public class MyTest { public class StringSorter implements Comparator { public
我正在学习 JavaScript。尝试理解代码, function foo (){ var a = b = {name: 'Hai'}; document.write(a.name +''
这个问题不太可能帮助任何 future 的访问者;它只与一个小的地理区域、一个特定的时间点或一个非常狭窄的情况有关,这些情况并不普遍适用于互联网的全局受众。为了帮助使这个问题更广泛地适用,visit
这按预期工作: [dgorur@ted ~]$ env -i env [dgorur@ted ~]$ 这样做: [dgorur@ted ~]$ env -i which date which: no
struct BLA { int size_; int size()const{ return size_; } } int x; BLA b[ 2 ]; BLA * p = &b[
我有以下代码: #test img {vertical-align: middle;} div#test { border: 1px solid green; height: 150px; li
我想大多数使用过 C/C++ 的人都对预处理器的工作原理有一定的直觉(或多或少)。直到今天我也是这么认为的,但事实证明我的直觉是错误的。故事是这样的: 今天我尝试了一些东西,但我无法解释结果。首先考虑
我想为 TnSettings 做 mock,是的,如果通过以下方法编写代码,它就可以工作,问题是我们需要为每个案例编写 mock 代码,如果我们只 mock 一次然后执行多个案例,那么第二个将报告异常
我的项目中有以下两个结构 typedef volatile struct { unsigned char rx_buf[MAX_UART_BUF]; //Input buffer over U
Regex rx = new Regex(@"[+-]"); string[] substrings = rx.Split(expression); expression = "-9a3dcb
我的两个应用程序遇到了一个奇怪的问题。这是设置: 两个 tomcat/java 应用程序,在同一个网络中运行,连接到相同的 MS-SQL-Server。一个应用程序,恰好按顺序位于 DMZ 中可从互联
我目前正在与 Android Api Lvl 8 上的 OnLongClickListener 作斗争。 拿这段代码: this.webView.setOnLongClickListener(new
这个问题不太可能帮助任何 future 的访问者;它只与一个小的地理区域、一个特定的时间点或一个非常狭窄的情况相关,这些情况并不普遍适用于互联网的全局受众。为了帮助使这个问题更广泛地适用,visit
只是遇到了奇怪的事情。我有以下代码: -(void)ImageDownloadCompleat { [self performSelectorOnMainThread:@selector(up
我是一名优秀的程序员,十分优秀!