NASA Astrobee Robot Software  0.19.1
Flight software for the Astrobee robots operating inside the International Space Station.
ADT7410.h
Go to the documentation of this file.
1 /* Copyright (c) 2017, United States Government, as represented by the
2  * Administrator of the National Aeronautics and Space Administration.
3  *
4  * All rights reserved.
5  *
6  * The Astrobee platform is licensed under the Apache License, Version 2.0
7  * (the "License"); you may not use this file except in compliance with the
8  * License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15  * License for the specific language governing permissions and limitations
16  * under the License.
17  */
18 
19 #ifndef HARDWARE_TEMP_MONITOR_SRC_ADT7410_H_
20 #define HARDWARE_TEMP_MONITOR_SRC_ADT7410_H_
21 
23 
24 namespace temp_monitor {
25 
26 class ADT7410 : public TempMonitor {
27  public:
28  explicit ADT7410(i2c::Device const& device);
29 
30  bool GetTemperature(double *temp);
31 
32  protected:
33  bool Init(void);
34 
35  private:
36  bool init_;
37 
38  enum Register {
39  TEMP_MSB = 0x00,
40  TEMP_LSB = 0x01,
41  STATUS = 0x02,
42  CONFIGURATION = 0x03,
43  TEMP_HIGH_SET_MSB = 0x04,
44  TEMP_HIGH_SET_LSB = 0x05,
45  TEMP_LOW_SET_MSB = 0x06,
46  TEMP_LOW_SET_LSB = 0x07,
47  TEMP_CRIT_SET_MSB = 0x08,
48  TEMP_CRIT_SET_LSB = 0x09,
49  TEMP_HYST_SET = 0x0A,
50  ID = 0x0B,
51  SOFTWARE_RESET = 0x2F
52  };
53 };
54 
55 } // namespace temp_monitor
56 
57 #endif // HARDWARE_TEMP_MONITOR_SRC_ADT7410_H_
temp_monitor::ADT7410::Init
bool Init(void)
Definition: ADT7410.cc:25
temp_monitor
Definition: temp_monitor.h:29
temp_monitor::TempMonitor
Definition: temp_monitor.h:33
temp_monitor::ADT7410::GetTemperature
bool GetTemperature(double *temp)
Definition: ADT7410.cc:37
temp_monitor::ADT7410::ADT7410
ADT7410(i2c::Device const &device)
Definition: ADT7410.cc:23
temp_monitor::ADT7410
Definition: ADT7410.h:26
i2c::Device
Definition: i2c_new.h:82
temp_monitor.h