add debug info and set resend wave num to 3.
This commit is contained in:
parent
78db33f4b2
commit
99fa26d305
@ -285,9 +285,9 @@ long SensorScheduler::CalcNextTimestamp(int id, uint16_t short_addr, bool &z, in
|
|||||||
// 发送波的时间窗也在本次特征值发送间隔中
|
// 发送波的时间窗也在本次特征值发送间隔中
|
||||||
for (int i = forward_wave_slice_num+1; i <= forward_wave_slice_num + wave_slice_num_per_eigen_interval_; ++i) {
|
for (int i = forward_wave_slice_num+1; i <= forward_wave_slice_num + wave_slice_num_per_eigen_interval_; ++i) {
|
||||||
if (first_wave_slice == i) {
|
if (first_wave_slice == i) {
|
||||||
send_wave_ts = current_wave_start_ts_ + nth_eigen_value_slice_ * eigen_value_send_interval_ + 60 + (i - forward_wave_slice_num - 1) * 60;
|
send_wave_ts = current_wave_start_ts_ + nth_eigen_value_slice_ * eigen_value_send_interval_ + 60 + (i - forward_wave_slice_num - 1) * 60;
|
||||||
zlog_debug(zbt, "[Nxt] [%d:%x] send z wave time:[%s]", id, short_addr, GetUTCTime(send_wave_ts).c_str());
|
|
||||||
next_task_id = kScheduleWaveForm;
|
next_task_id = kScheduleWaveForm;
|
||||||
|
zlog_debug(zbt, "[Nxt] [%d:%x] send z wave time:[%s], task id:%d", id, short_addr, GetUTCTime(send_wave_ts).c_str(), next_task_id);
|
||||||
z = true;
|
z = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -297,9 +297,9 @@ long SensorScheduler::CalcNextTimestamp(int id, uint16_t short_addr, bool &z, in
|
|||||||
// 发送波的时间窗也在本次特征值发送间隔中
|
// 发送波的时间窗也在本次特征值发送间隔中
|
||||||
for (int i = forward_wave_slice_num+1; i <= forward_wave_slice_num + wave_slice_num_per_eigen_interval_; ++i) {
|
for (int i = forward_wave_slice_num+1; i <= forward_wave_slice_num + wave_slice_num_per_eigen_interval_; ++i) {
|
||||||
if (second_wave_slice == i) {
|
if (second_wave_slice == i) {
|
||||||
send_wave_ts = current_wave_start_ts_ + nth_eigen_value_slice_ * eigen_value_send_interval_ + 60 + (i - forward_wave_slice_num - 1) * 60;
|
send_wave_ts = current_wave_start_ts_ + nth_eigen_value_slice_ * eigen_value_send_interval_ + 60 + (i - forward_wave_slice_num - 1) * 60;
|
||||||
zlog_debug(zbt, "[Nxt] [%d:%x] send xy wave time:[%s]", id, short_addr, GetUTCTime(send_wave_ts).c_str());
|
|
||||||
next_task_id = kScheduleWaveForm;
|
next_task_id = kScheduleWaveForm;
|
||||||
|
zlog_debug(zbt, "[Nxt] [%d:%x] send xy wave time:[%s], task id:%d", id, short_addr, GetUTCTime(send_wave_ts).c_str(), next_task_id);
|
||||||
z = false;
|
z = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -324,7 +324,7 @@ long SensorScheduler::CalcNextTimestamp(int id, uint16_t short_addr, bool &z, in
|
|||||||
z = false;
|
z = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
zlog_debug(zbt, "[Nxt][%d:%x] %d nth free wave slice will be used to trigger wave, utc time:[%s]", id, short_addr, i+forward_wave_slice_num, GetUTCTime(available_ts).c_str());
|
zlog_debug(zbt, "[Nxt][%d:%x] %d nth free wave slice will be used to trigger z : %d wave, utc time:[%s]", id, short_addr, i+forward_wave_slice_num, z, GetUTCTime(available_ts).c_str());
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
send_wave_ts = 0;
|
send_wave_ts = 0;
|
||||||
@ -442,7 +442,7 @@ long SensorScheduler::CalcNextTimestamp(int id, uint16_t short_addr, bool &z, in
|
|||||||
}
|
}
|
||||||
next_task_id = kScheduleEigenValue;
|
next_task_id = kScheduleEigenValue;
|
||||||
long available_ts = current_wave_start_ts_ + (nth_eigen_value_slice_ + 1)* eigen_value_send_interval_ + eigen_send_ts;
|
long available_ts = current_wave_start_ts_ + (nth_eigen_value_slice_ + 1)* eigen_value_send_interval_ + eigen_send_ts;
|
||||||
zlog_debug(zbt, "[Nxt] [%d:%x] next feature send utc time3:[%s]", id, short_addr, GetUTCTime(available_ts).c_str());
|
zlog_debug(zbt, "[Nxt] [%d:%x] next feature send utc time3:[%s], task id:%d", id, short_addr, GetUTCTime(available_ts).c_str(), next_task_id);
|
||||||
return available_ts;
|
return available_ts;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -532,6 +532,7 @@ long SensorScheduler::GetDebugUpgradeNextTS(uint16_t short_addr) {
|
|||||||
|
|
||||||
SensorScheduler::SensorScheduler() {
|
SensorScheduler::SensorScheduler() {
|
||||||
ReadTriggerWaveRecord();
|
ReadTriggerWaveRecord();
|
||||||
|
wave_resend_num_ = 3;
|
||||||
current_schedule_status_ = get_schedule_status();
|
current_schedule_status_ = get_schedule_status();
|
||||||
slice_sensor_id_ = NULL;
|
slice_sensor_id_ = NULL;
|
||||||
zlog_debug(zbt, "current schedule status:%s", get_status_desc(current_schedule_status_).c_str());
|
zlog_debug(zbt, "current schedule status:%s", get_status_desc(current_schedule_status_).c_str());
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user