Skip to main content

Aila_GetChargerWattage

Since 3.0.0

Return current charger wattage.

Signature​

void Aila_GetChargerWattage(void (^completion)(int chargerWattage));

Parameters​

  • completion - Block/closure called with the charger wattage

Description​

Returns the negotiated charger power contract for the connected Aila hardware (on devices equipped with powered hubs). If the call succeeds, the power contract is returned as the chargerWattage parameter. If the call fails, the parameter is 0.

Note that this value only indicates the power capabilities advertised by the charger, which may differ from actual power delivered.

Usage​

Aila_GetChargerWattage(^(int chargerWattage) {
if (chargerWattage > 0) {
NSLog(@"Charger Wattage: %dW", chargerWattage);
} else {
NSLog(@"Failed to retrieve charger wattage");
}
});

See Also​