SensorValueBattery.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <string>
4
5
#include <
RobotAPI/components/units/RobotUnit/SensorValues/SensorValueBase.h
>
6
7
namespace
armarx
8
{
9
10
enum class
BatteryState
: std::uint8_t
11
{
12
unavailable
= 0,
13
discharging
= 1,
14
charging
= 2,
15
notCharging
= 3,
16
full
= 4
17
};
18
19
class
SensorValueBattery
:
virtual
public
SensorValueBase
20
{
21
public
:
22
DETAIL_SensorValueBase_DEFAULT_METHOD_IMPLEMENTATION
23
24
std::uint8_t
state
;
25
float
designEnergy_Wh
;
26
float
fullChargeEnergy_Wh
;
27
float
energy_Wh
;
28
float
energyFromFullCharge_pct
;
29
float
fullEnergyFromDesignEnergy_pct
;
30
float
temperature_degC
;
31
float
ratedVoltage_V
;
32
float
voltage_V
;
33
float
current_A
;
34
float
power_W
;
35
float
remainingTime_h
;
36
bool
hasError
;
37
38
static
SensorValueInfo<SensorValueBattery>
39
GetClassMemberInfo
()
40
{
41
SensorValueInfo<SensorValueBattery>
svi;
42
svi.
addMemberVariable
(&
SensorValueBattery::state
,
"state"
);
43
svi.
addMemberVariable
(&
SensorValueBattery::designEnergy_Wh
,
"designEnergy_Wh"
);
44
svi.
addMemberVariable
(&
SensorValueBattery::fullChargeEnergy_Wh
,
"fullChargeEnergy_Wh"
);
45
svi.
addMemberVariable
(&
SensorValueBattery::energy_Wh
,
"energy_Wh"
);
46
svi.
addMemberVariable
(&
SensorValueBattery::energyFromFullCharge_pct
,
47
"energyFromFullCharge_pct"
);
48
svi.
addMemberVariable
(&
SensorValueBattery::fullEnergyFromDesignEnergy_pct
,
49
"fullEnergyFromDesignEnergy_pct"
);
50
svi.
addMemberVariable
(&
SensorValueBattery::temperature_degC
,
"temperature_degC"
);
51
svi.
addMemberVariable
(&
SensorValueBattery::ratedVoltage_V
,
"ratedVoltage_V"
);
52
svi.
addMemberVariable
(&
SensorValueBattery::voltage_V
,
"voltage_V"
);
53
svi.
addMemberVariable
(&
SensorValueBattery::current_A
,
"current_A"
);
54
svi.
addMemberVariable
(&
SensorValueBattery::power_W
,
"power_W"
);
55
svi.
addMemberVariable
(&
SensorValueBattery::remainingTime_h
,
"remainingTime_h"
);
56
svi.
addMemberVariable
(&
SensorValueBattery::hasError
,
"hasError"
);
57
return
svi;
58
}
59
};
60
61
}
// namespace armarx
armarx::SensorValueBattery::power_W
float power_W
Definition:
SensorValueBattery.h:34
armarx::SensorValueBase
The SensorValueBase class.
Definition:
SensorValueBase.h:40
armarx::SensorValueBattery::remainingTime_h
float remainingTime_h
Definition:
SensorValueBattery.h:35
armarx::SensorValueBattery::fullChargeEnergy_Wh
float fullChargeEnergy_Wh
Definition:
SensorValueBattery.h:26
armarx::SensorValueBattery::hasError
bool hasError
Definition:
SensorValueBattery.h:36
armarx::SensorValueBattery::energyFromFullCharge_pct
float energyFromFullCharge_pct
Definition:
SensorValueBattery.h:28
armarx::BatteryState
BatteryState
Definition:
SensorValueBattery.h:10
armarx::introspection::ClassMemberInfo
Definition:
ClassMemberInfo.h:34
armarx::SensorValueBattery::GetClassMemberInfo
static SensorValueInfo< SensorValueBattery > GetClassMemberInfo()
Definition:
SensorValueBattery.h:39
armarx::SensorValueBattery::fullEnergyFromDesignEnergy_pct
float fullEnergyFromDesignEnergy_pct
Definition:
SensorValueBattery.h:29
SensorValueBase.h
armarx::SensorValueBattery::state
DETAIL_SensorValueBase_DEFAULT_METHOD_IMPLEMENTATION std::uint8_t state
Definition:
SensorValueBattery.h:24
armarx::introspection::ClassMemberInfo::addMemberVariable
EntryConfigurator< ClassType > addMemberVariable(MemberType ClassType::*ptr, const std::string &name)
add a member variable of the current class
armarx::BatteryState::full
@ full
armarx::SensorValueBattery::ratedVoltage_V
float ratedVoltage_V
Definition:
SensorValueBattery.h:31
armarx::SensorValueBattery::voltage_V
float voltage_V
Definition:
SensorValueBattery.h:32
armarx::BatteryState::discharging
@ discharging
DETAIL_SensorValueBase_DEFAULT_METHOD_IMPLEMENTATION
#define DETAIL_SensorValueBase_DEFAULT_METHOD_IMPLEMENTATION
Definition:
SensorValueBase.h:139
armarx::SensorValueBattery::designEnergy_Wh
float designEnergy_Wh
Definition:
SensorValueBattery.h:25
armarx::SensorValueBattery::energy_Wh
float energy_Wh
Definition:
SensorValueBattery.h:27
armarx::SensorValueBattery::current_A
float current_A
Definition:
SensorValueBattery.h:33
armarx::SensorValueBattery
Definition:
SensorValueBattery.h:19
armarx::BatteryState::notCharging
@ notCharging
armarx::BatteryState::unavailable
@ unavailable
armarx::BatteryState::charging
@ charging
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition:
ArmarXTimeserver.cpp:28
armarx::SensorValueBattery::temperature_degC
float temperature_degC
Definition:
SensorValueBattery.h:30
RobotAPI
components
units
RobotUnit
SensorValues
SensorValueBattery.h
Generated on Sat Oct 12 2024 09:14:07 for armarx_documentation by
1.8.17