add GetScheduleStatus interface.
This commit is contained in:
parent
3411823f8a
commit
db430c05e2
@ -286,7 +286,7 @@ 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) {
|
||||
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;
|
||||
zlog_debug(zbt, "[Nxt] [%d:%x] send wave time:[%s]", id, short_addr, GetUTCTime(send_wave_ts).c_str());
|
||||
zlog_debug(zbt, "[Nxt] [%d:%x] send z wave time:[%s]", id, short_addr, GetUTCTime(send_wave_ts).c_str());
|
||||
next_task_id = kScheduleWaveForm;
|
||||
z = true;
|
||||
break;
|
||||
@ -298,7 +298,7 @@ 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) {
|
||||
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;
|
||||
zlog_debug(zbt, "[Nxt] [%d:%x] send wave time:[%s]", id, short_addr, GetUTCTime(send_wave_ts).c_str());
|
||||
zlog_debug(zbt, "[Nxt] [%d:%x] send xy wave time:[%s]", id, short_addr, GetUTCTime(send_wave_ts).c_str());
|
||||
next_task_id = kScheduleWaveForm;
|
||||
z = false;
|
||||
break;
|
||||
@ -783,6 +783,7 @@ bool SensorScheduler::XYMissedWave(uint16_t short_addr) {
|
||||
}
|
||||
|
||||
void SensorScheduler::WaveSuccess(uint16_t short_addr, bool z) {
|
||||
zlog_debug(zbt, "[%x] wave z:%d success", short_addr, z);
|
||||
if (z) {
|
||||
z_success_set_.insert(short_addr);
|
||||
auto iter = z_failure_map_.find(short_addr);
|
||||
@ -1244,6 +1245,10 @@ void SensorScheduler::SetScheduleStatus(ScheduleStatus status) {
|
||||
}
|
||||
}
|
||||
|
||||
ScheduleStatus SensorScheduler::GetScheduleStatus() {
|
||||
return current_schedule_status_;
|
||||
}
|
||||
|
||||
void SensorScheduler::GenerateDebugSchedule(std::vector<uint16_t> short_addr_list) {
|
||||
int debug_size = short_addr_list.size();
|
||||
|
||||
|
||||
@ -48,6 +48,7 @@ public:
|
||||
SensorScheduler();
|
||||
|
||||
void SetScheduleStatus(ScheduleStatus status);
|
||||
ScheduleStatus GetScheduleStatus();
|
||||
// kScheduleConfigSensor kScheduleUpgrade 等有结果,调我接口通知结果
|
||||
// kScheduleEigenValue kScheduleWaveForm
|
||||
// 上面4个结束,调GetNextDuration()获取休眠时间
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user