std::string get_popup_windows_log(void);
std::string get_system_screen_time(void);
std::string get_uart_at_status(void);
+ std::string get_current_vote_status(void);
private:
DebugOutputViewEventListener();
debugOutputItemInfo[index++] = {index, "current_screen_time"};
//串口状态服务
debugOutputItemInfo[index++] = {index, "uart_service_status"};
+ //Vote状态服务
+ debugOutputItemInfo[index++] = {index, "vote_service_status"};
usedLen = index;
/* -------------------------------- Add data -------------------------------- */
for (uint8_t i = 0; i < usedLen; i++)
bool status = logModel->get_uart_status();
return std::string("uart_at_status:") + std::to_string(status);
}
+ //获取vote状态
+ std::string DebugOutputViewEventListener::get_current_vote_status() {
+ // 获取系统日志实例
+ char buf[256];
+ get_vote_status(buf);
+ return std::string(buf);
+ }
bool DebugOutputViewEventListener::OnClick(OHOS::UIView &view, const OHOS::ClickEvent &event)
{
std::string viewId = view.GetViewId();
toggleButton->SetVisible(true);
}
}
+ break;
+ case 14:
+ str = get_current_vote_status();
break;
default:
str = "--";
for (i = 0; i < PM_ID_MAX; i++) {\r
// wstp_print("sub_counts[%d] = %d\r\n", i, pm_veto_ptr->veto_counts.sub_counts[i]);\r
wstp_print("sub_counts[%d] %s = %d\r\n", i,get_pm_id_name(i), pm_veto_ptr->veto_counts.sub_counts[i]);\r
-\r
}\r
}\r
\r
#include "power_display_service.h"
#include "los_base.h"
#include "tcxo.h"
+#include <stdint.h>
+#include "pm_veto.h"
// #include "config/include/ConfigModelC.h"
#ifdef SUPPORT_TCPIP
// display_api->set_screen_set_keepon_timeout(5000);
}
+//获取vote正在执行的状态
+errcode_t get_vote_status(char*str)
+{
+ uint8_t i = 0;
+ uint8_t falg = 0;
+ pm_veto_t *pm_veto_ptr = pm_veto_get_info();
+ for (i = 0; i < PM_ID_MAX; i++) {
+ if (pm_veto_ptr->veto_counts.sub_counts[i] == 1) {
+ sprintf(str, "%s %s", str, get_pm_id_name(i));
+ falg = 1;
+ }
+ }
+ if (falg==0) {
+ str = "没有正在进行的服务";
+ }
+ PRINT("***************get_vote_status***************\n %s\n", str);
+ return ERRCODE_SUCC;
+}
+
/*系统声音设置*/
void uapi_systemVolumeSet(int32_t sounding)
{
errcode_t uapi_get_WeekStr(char *p_week);
/*设置屏幕亮屏*/
void uapi_set_screen_on_api(void);
+/*获取Vote状态*/
+errcode_t get_vote_status(char *str);
/**
* @brief 日期格式选项枚举