Start receiving notification

Context

You must have implemented and set the appropriate observers to receive notification.

Use [[[ERROR: [NOKX000E] Unable to find definition for key reference 'CHWRMPower']]]CHWRMPower::StartAveragePowerReporting() to start battery voltage and battery consumption measurements.

The following code snippet demonstrates how to start battery voltage measurements:

TRequestStatus newstatus;
TIntervalMultiple intmul;

iPower->StartAveragePowerReporting( newstatus, intmul );
...

Use [[[ERROR: [NOKX000E] Unable to find definition for key reference 'CHWRMPower']]]CHWRMPower::NotifyAverageChargingCurrent() to start receiving charging current information and [[[ERROR: [NOKX000E] Unable to find definition for key reference 'CHWRMPower']]]CHWRMPower::NotifyBatteryFullChargingTime() to receive battery charging time information.

The following code snippet demonstrates how to receive battery charging status notification:

// Start receiving charging notification 
TRequestStaus status;
iPower->NotifyAverageChargingCurrent( status, EFourTimesBaseTimeInterval );
User::WaitForRequest( status );

Notes: Charging status notification is started automatically when [[[ERROR: [NOKX000E] Unable to find definition for key reference 'CHWRMPower']]]SetBatteryChargingObserver is called with a [[[ERROR: [NOKX000E] Unable to find definition for key reference 'CHWRMPower']]]MHWRMBatteryChargingStatusObserver specified.

When the charging status changes to [[[ERROR: [NOKX000E] Unable to find definition for key reference 'CHWRMPower']]]EChargingStatusChargingComplete charging status notification is automatically disabled.

The following code snippet demonstrates how to get average charging current and remaining charging time notification:

// Register only for charging current
iPower->SetBatteryChargingObserver( NULL, notifier, NULL );

// Start receiving notification now-on
TRequestStaus status;
iPower->NotifyAverageChargingCurrent( status, 4 );
User::WaitForRequest( status );
...

// Register only for remaining charging time notification
iPower->SetBatteryChargingObserver( NULL, NULL, notifier );

// Start receiving notification now-on
TRequestStaus status;
iPower->NotifyBatteryFullChargingTime( status, 4 );
User::WaitForRequest( status );
...