NASA Astrobee Robot Software  0.19.1
Flight software for the Astrobee robots operating inside the International Space Station.
laser.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 
20 #ifndef LASER_LASER_H_
21 #define LASER_LASER_H_
22 
23 #include <i2c/i2c_new.h>
24 
25 namespace laser {
26 
27 class Laser {
28  public:
29  explicit Laser(i2c::Device const& dev);
30 
31  bool Init(i2c::Error* ec);
32 
33  bool SetEnabled(bool enabled, i2c::Error* ec);
34 
35  bool enabled() { return enabled_; }
36 
37  private:
38  i2c::Device dev_;
39  bool enabled_;
40 };
41 
42 } // namespace laser
43 
44 #endif // LASER_LASER_H_
laser
Definition: laser.h:25
laser::Laser
Definition: laser.h:27
laser::Laser::SetEnabled
bool SetEnabled(bool enabled, i2c::Error *ec)
Definition: laser.cc:81
i2c_new.h
laser::Laser::Laser
Laser(i2c::Device const &dev)
Definition: laser.cc:41
laser::Laser::enabled
bool enabled()
Definition: laser.h:35
i2c::Error
int Error
Definition: i2c_new.h:30
i2c::Device
Definition: i2c_new.h:82
laser::Laser::Init
bool Init(i2c::Error *ec)
Definition: laser.cc:45