开发者

Faking the battery info in my laptop

开发者 https://www.devze.com 2023-02-16 07:05 出处:网络
How one can fake the battery info in the laptop? I am working on a tool that must fake the power of the battery in my laptop.

How one can fake the battery info in the laptop?

I am working on a tool that must fake the power of the battery in my laptop.

This means that the tool must force the battery or laptop to report low power while its charged well.

Is there any framework or driver that can help me to do this?

Do we have the firmware of the battery to support this functionality?

I really can't find a solution for this problem, any开发者_运维技巧 help is so appreciated.

Thanks in advance.

Note: the programming language does not matter.


Build an application that shows a low battery icon in the System Tray.


You are asking about how to mock/stub something. I would use a mock or stub.

so

  • new MyFirstPowerMonitor(new AcpiBatteryLevelReader()) - main program

  • new MyFirstPowerMonitor(new ProgrammableBatteryLevelReader()) - to use something you can control.

thats it really.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号