iCub-main
batteryInfo.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2022 Istituto Italiano di Tecnologia (IIT)
3  * All rights reserved.
4  * Author: Luca Tricerri
5  * This software may be modified and distributed under the terms of the
6  * BSD-3-Clause license. See the accompanying LICENSE file for details.
7  */
8 
9 #ifndef _BATTERYINFO_H_
10 #define _BATTERYINFO_H_
11 
12 #include <string>
13 
14 #include "EoAnalogSensors.h"
15 
17 {
18  public:
19  uint8_t acquisitionRate{0};
20  eObrd_type_t board{eobrd_unknown};
21  int port{0};
22  int address{0};
23  int majorProtocol{0};
24  int minorProtocol{0};
25  int majorFirmware{0};
26  int minorFirmware{0};
27  int buildFirmware{0};
28 
29  bool toEomn(eOas_battery_sensordescriptor_t& out) const;
30 };
31 
32 bool operator==(const BatteryInfo& right, const BatteryInfo& left);
33 bool operator!=(const BatteryInfo& right, const BatteryInfo& left);
34 
35 #endif // include-guard
bool operator!=(const BatteryInfo &right, const BatteryInfo &left)
Definition: batteryInfo.cpp:67
bool operator==(const BatteryInfo &right, const BatteryInfo &left)
Definition: batteryInfo.cpp:44
int buildFirmware
Definition: batteryInfo.h:27
int minorProtocol
Definition: batteryInfo.h:24
bool toEomn(eOas_battery_sensordescriptor_t &out) const
Definition: batteryInfo.cpp:14
eObrd_type_t board
Definition: batteryInfo.h:20
int minorFirmware
Definition: batteryInfo.h:26
uint8_t acquisitionRate
Definition: batteryInfo.h:19
int majorProtocol
Definition: batteryInfo.h:23
int majorFirmware
Definition: batteryInfo.h:25
out
Definition: sine.m:8