Lines Matching refs:fd
30 bool BatteryDump::DumpBatteryHelp(int32_t fd, const std::vector<std::u16string> &args) in DumpBatteryHelp() argument
36 DumpHelp(fd); in DumpBatteryHelp()
40 void BatteryDump::DumpHelp(int32_t fd) in DumpHelp() argument
42 dprintf(fd, "Usage:\n"); in DumpHelp()
43 dprintf(fd, " -h: dump help\n"); in DumpHelp()
44 dprintf(fd, " -i: dump battery info\n"); in DumpHelp()
45 dprintf(fd, " -d: show low power diaolog\n"); in DumpHelp()
46 dprintf(fd, " -u: unplug battery charging state\n"); in DumpHelp()
47 dprintf(fd, " -r: reset battery charging state\n"); in DumpHelp()
50 void BatteryDump::DumpCurrentTime(int32_t fd) in DumpCurrentTime() argument
60 …dprintf(fd, "Current time: %04d-%02d-%02d %02d:%02d:%02d.%03d\n", timeinfo->tm_year + 1900, timein… in DumpCurrentTime()
65 bool BatteryDump::GetBatteryInfo(int32_t fd, sptr<BatteryService> &service, const std::vector<std::… in GetBatteryInfo() argument
71 DumpCurrentTime(fd); in GetBatteryInfo()
73 dprintf(fd, "capacity: %u \n", capacity); in GetBatteryInfo()
75 dprintf(fd, "batteryLevel: %u \n", batteryLevel); in GetBatteryInfo()
77 dprintf(fd, "chargingStatus: %u \n", chargingStatus); in GetBatteryInfo()
79 dprintf(fd, "healthState: %u \n", healthState); in GetBatteryInfo()
81 dprintf(fd, "pluggedType: %u \n", pluggedType); in GetBatteryInfo()
83 dprintf(fd, "voltage: %d \n", voltage); in GetBatteryInfo()
85 dprintf(fd, "present: %d \n", present); in GetBatteryInfo()
87 dprintf(fd, "technology: %s \n", technology.c_str()); in GetBatteryInfo()
89 dprintf(fd, "nowCurrent: %d \n", nowCurrent); in GetBatteryInfo()
91 dprintf(fd, "currentAverage: %d \n", currentAverage); in GetBatteryInfo()
93 dprintf(fd, "totalEnergy: %d \n", totalEnergy); in GetBatteryInfo()
95 dprintf(fd, "remainingEnergy: %d \n", remainEnergy); in GetBatteryInfo()
97 dprintf(fd, "remainingChargeTime: %ld \n", remainingChargeTime); in GetBatteryInfo()
99 dprintf(fd, "temperature: %d \n", temperature); in GetBatteryInfo()
103 bool BatteryDump::MockUnplugged(int32_t fd, sptr<BatteryService>& service, const std::vector<std::u… in MockUnplugged() argument
110 dprintf(fd, "unplugged battery charging state \n"); in MockUnplugged()
114 bool BatteryDump::ResetPlugged(int32_t fd, sptr<BatteryService>& service, const std::vector<std::u1… in ResetPlugged() argument
121 dprintf(fd, "reset battery charging state \n"); in ResetPlugged()