Maps SDK for C++ 1.0.0
Loading...
Searching...
No Matches
gem::sense::IBattery Class Referenceabstract

Definition of Battery interface. More...

Inheritance diagram for gem::sense::IBattery:
Collaboration diagram for gem::sense::IBattery:

Public Types

enum class  EState {
  Unknown = 0 , Charging , Discharging , NotCharging ,
  Full
}
 Values that represent the state of the battery. More...
enum class  EHealth {
  Unknown = 0 , Good , Overheat , Dead ,
  OverVoltage , Unspecified , Cold
}
 Values that represent the health status of the battery. More...
enum class  EPluggedType { Unknown = 0 , Ac , Usb , Wireless }
 Values that represent the type of battery plug connection. More...

Public Member Functions

virtual int getBatteryLevel () const =0
 Get battery level.
virtual EState getBatteryState () const =0
 Get battery state.
virtual EHealth getBatteryHealth () const =0
 Get battery health.
virtual bool getLowBatteryNoticed () const =0
 Get if low battery had noticed.
virtual EPluggedType getPluggedType () const =0
 Get plugged type.
virtual int getVoltage () const =0
 Get voltage.
virtual int getTemperature () const =0
 Get temperature.
EDataType getType () const override final
 Get data type.
virtual LargeInteger getAcquisitionTimestamp () const =0
Time getTime () const
template<typename TDerivedType>
StrongPointer< TDerivedType > cast ()
 Cast to a derived type.

Static Public Member Functions

static bool isSameType (const IData *ptr)
 Check if two data elements have the same type.

Detailed Description

Definition of Battery interface.

Member Enumeration Documentation

◆ EHealth

enum class gem::sense::IBattery::EHealth
strong

Values that represent the health status of the battery.

Enumerator
Unknown 

The battery health status is unknown.

Good 

The battery is in good condition.

Overheat 

The battery is overheating.

Dead 

The battery is no longer functional (dead).

OverVoltage 

The battery is experiencing over voltage, which may indicate improper charging.

Unspecified 

The battery health status is unspecified or not determined.

Cold 

The battery is too cold to function properly.

◆ EPluggedType

Values that represent the type of battery plug connection.

Enumerator
Unknown 

The plugged type is unknown.

Ac 

The battery is connected to an AC power source.

Usb 

The battery is connected to a USB power source.

Wireless 

The battery is being charged wirelessly.

◆ EState

enum class gem::sense::IBattery::EState
strong

Values that represent the state of the battery.

Enumerator
Unknown 

The battery state is unknown.

Charging 

The battery is currently charging.

Discharging 

The battery is discharging (i.e., in use and not plugged in for charging).

NotCharging 

The battery is not charging but is plugged in (may be maintaining a certain charge level).

Full 

The battery is fully charged.

Member Function Documentation

◆ cast()

template<typename TDerivedType>
StrongPointer< TDerivedType > gem::sense::IData::cast ( )
inlineinherited

Cast to a derived type.

Returns
The requested derived type as a shared pointer.

◆ getAcquisitionTimestamp()

virtual LargeInteger gem::sense::IData::getAcquisitionTimestamp ( ) const
pure virtualinherited
Returns
Acquisition timestamp in milliseconds since 1970 ( epoch )

Implemented in gem::sense::MockPosition.

◆ getBatteryHealth()

virtual EHealth gem::sense::IBattery::getBatteryHealth ( ) const
pure virtual

Get battery health.

Returns
The health of the battery.

◆ getBatteryLevel()

virtual int gem::sense::IBattery::getBatteryLevel ( ) const
pure virtual

Get battery level.

Returns
The percentage of the battery level.

◆ getBatteryState()

virtual EState gem::sense::IBattery::getBatteryState ( ) const
pure virtual

Get battery state.

Returns
The state of the battery.

◆ getLowBatteryNoticed()

virtual bool gem::sense::IBattery::getLowBatteryNoticed ( ) const
pure virtual

Get if low battery had noticed.

Returns
Whether or not the low battery was noticed. If true it means the battery is low.

◆ getPluggedType()

virtual EPluggedType gem::sense::IBattery::getPluggedType ( ) const
pure virtual

Get plugged type.

Returns
The plugged type.

◆ getTemperature()

virtual int gem::sense::IBattery::getTemperature ( ) const
pure virtual

Get temperature.

Returns
The temperature in tenths of a degree Celsius.

◆ getTime()

Time gem::sense::IData::getTime ( ) const
inlineinherited
Returns
System acquisition time

◆ getType()

EDataType gem::sense::IDataWithType< DerivedType >::getType ( ) const
inlinefinaloverridevirtualinherited

Get data type.

Returns
The data type.

Implements gem::sense::IData.

◆ getVoltage()

virtual int gem::sense::IBattery::getVoltage ( ) const
pure virtual

Get voltage.

Returns
The voltage in millivolts.

◆ isSameType()

bool gem::sense::IDataWithType< DerivedType >::isSameType ( const IData * ptr)
inlinestaticinherited

Check if two data elements have the same type.

Parameters
ptrThe other IData pointer to check against.
Returns
True if of same type, false if not.