Download presentation
Presentation is loading. Please wait.
Published byBelinda Conley Modified over 9 years ago
1
SKKU Embedded Software Lab. 15 1 https://github.com/batteryinfo Battery Information 최완수 (2014711789) 김영훈 (2014711277) 곽현호 (2014711645)
2
SKKU Embedded Software Lab. 15 2 The need for batteries usage information in mobile environments –User Can check their use patterns Can remove the application, there is a problem –Developer Can check possible errors related to power management Can optimize app in power management Other mobile OS already supports the feature –Now need to provide that features in the Tizen Provide Battery Usage Information
3
SKKU Embedded Software Lab. 15 3 Two types of data –Battery remaining capacity/hardware device usage information –Battery usage percentage for each app Battery Information
4
SKKU Embedded Software Lab. 15 4 Overall structure Implementation Data collection and processing Service Daemon Battery usage percentage for each app hardware device usage Stat File Existing Framework Data Write Display UI based on data UI App Communication
5
SKKU Embedded Software Lab. 15 5 Obtain App list Obtain Application Information [1/5] Ecore Main Loop 소켓 통신 등록 Service Daemon Appcore Framework ② Socket Communications App [pid / name / state] ③ Socket Communications ④ App list configuration ① Socket Register
6
SKKU Embedded Software Lab. 15 6 Inter-process communication same with a common socket socket programming –Use Ecore main loop & Socket register –Use ecore main loop in order not to create additional loop thread –Register socket for main loop Obtain Application Information [2/5] Init for custom service Ecore main loop example Fd for socket communication call-back for socket communication
7
SKKU Embedded Software Lab. 15 7 5 Application State –When the state changes is needed, use app-core f/w –Edit App-core/src/appcore-efl.c Transfer the information to the service whenever changes occur to State Obtain Application Information [3/5] Change UI app state depending on event Transfer Pid, name, state information
8
SKKU Embedded Software Lab. 15 8 Organize usage information for the App in the List –Foreground state time in the app is the same as LCD on time –Read CPU time for each App from proc filesystem Obtain Application Information [4/5] Service Daemon Each hardware device usage updates for the App list CPU usage time for each process /proc/pid/stat read Stat File Calculate battery ratio for the App
9
SKKU Embedded Software Lab. 15 9 Ratio calculation for each app –Reflecting a 50% share for LCD & CPU usage time Can be extended to a more accurate result –Can reflect the power consumption of the real device –Can be added other hardware Obtain Application Information[5/5] PidNamePercentage
10
SKKU Embedded Software Lab. 15 10 Use Vconf –One of IPC –Whenever the value in the vconf is changed, the corresponding f / w or app is operating Register call back –Register notify for specific value of vconf Hardware Information [1/2] Brightness, battery, wifi state, other information exists vconf_notify_key_changed(VCONFKEY_PM_STATE, _notify_pm_state_cb, NULL)
11
SKKU Embedded Software Lab. 15 11 Used vconf value –VCONFKEY_PM_STATE LCD, power On/Off state –VCONFKEY_WIFI_STATE WiFi On/Off state –VCONFKEY_SYSMAN_BATTERY_CAPACITY Current battery capacity Hardware Information[2/2] Service Daemon vconf_notify Register Notify Stat File TimeValue
12
SKKU Embedded Software Lab. 15 12 Tizen::Graphics::Canvas –Using the Canvas to display a state change in the visual –Show battery usage graph and device on/off state –Use DrawLine for graph –Use FillRectangle for device on/off display Tizen::Ui::Controls::GroupedListView –Read the file and Show list by using GroupedListView –Add to the list as the number of app written in Applist –Display name and proportion of each App (%) UI Implementation [1/2]
13
SKKU Embedded Software Lab. 15 13 UI Implementation[2/2] Battery capacity LCD On/Off WiFi On/Off App list App proportion (Based on CPU/LCD usage)
14
SKKU Embedded Software Lab. 15 14 Demo Movie Demo
15
SKKU Embedded Software Lab. 15 https://github.com/batteryinfo Git Hub Service daemon code Edited app-core code for transfer app state UI Application Example code for Ecore main loop and vconfnotify
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.