registers.h
Go to the documentation of this file.
1 /*********************************************************************
2 * Software License Agreement (BSD License)
3 *
4 * Copyright (c) 2014 Tomas Petricek
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 *
11 * * Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * * Redistributions in binary form must reproduce the above
14 * copyright notice, this list of conditions and the following
15 * disclaimer in the documentation and/or other materials provided
16 * with the distribution.
17 * * Neither the name of the author nor other contributors may be
18 * used to endorse or promote products derived from this software
19 * without specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 * POSSIBILITY OF SUCH DAMAGE.
33 *********************************************************************/
34 
35 #ifndef CAMERA1394_REGISTERS_H
36 #define CAMERA1394_REGISTERS_H
37 
38 #include <dc1394/dc1394.h>
39 #include <vector>
40 
48 namespace camera1394
49 {
50 
55 class Registers
56 {
57 public:
58  Registers(dc1394camera_t *camera);
59  Registers();
60 
61  bool getControlRegisters(const uint64_t offset, const uint32_t num_regs,
62  std::vector<uint32_t> &val);
63  bool setControlRegisters(const uint64_t offset,
64  const std::vector<uint32_t> &val);
65 
66  bool getAbsoluteRegister(const uint64_t offset, const uint32_t feature,
67  uint32_t &val);
68  bool setAbsoluteRegister(const uint64_t offset, const uint32_t feature,
69  const uint32_t val);
70 
71  bool getFormat7Register(const uint64_t offset, const uint32_t mode,
72  uint32_t &val);
73  bool setFormat7Register(const uint64_t offset, const uint32_t mode,
74  const uint32_t val);
75 
76  bool getAdvancedControlRegisters(const uint64_t offset,
77  const uint32_t num_regs,
78  std::vector<uint32_t> &val);
79  bool setAdvancedControlRegisters(const uint64_t offset,
80  const std::vector<uint32_t> &val);
81 
82  bool getPIORegister(const uint64_t offset, uint32_t &val);
83  bool setPIORegister(const uint64_t offset, const uint32_t val);
84 
85  bool getSIORegister(const uint64_t offset, uint32_t &val);
86  bool setSIORegister(const uint64_t offset, const uint32_t val);
87 
88  bool getStrobeRegister(const uint64_t offset, uint32_t &val);
89  bool setStrobeRegister(const uint64_t offset, const uint32_t val);
90 
91 private:
92  dc1394camera_t *camera_;
93 };
94 }
95 
96 #endif // CAMERA1394_REGISTERS_H
bool setSIORegister(const uint64_t offset, const uint32_t val)
Definition: registers.cpp:155
bool getAdvancedControlRegisters(const uint64_t offset, const uint32_t num_regs, std::vector< uint32_t > &val)
Definition: registers.cpp:118
dc1394camera_t * camera_
Definition: registers.h:92
bool getControlRegisters(const uint64_t offset, const uint32_t num_regs, std::vector< uint32_t > &val)
Definition: registers.cpp:63
bool setAbsoluteRegister(const uint64_t offset, const uint32_t feature, const uint32_t val)
Definition: registers.cpp:92
Registers class.
Definition: registers.h:55
bool getStrobeRegister(const uint64_t offset, uint32_t &val)
Definition: registers.cpp:162
bool getAbsoluteRegister(const uint64_t offset, const uint32_t feature, uint32_t &val)
Definition: registers.cpp:84
bool setStrobeRegister(const uint64_t offset, const uint32_t val)
Definition: registers.cpp:168
bool setFormat7Register(const uint64_t offset, const uint32_t mode, const uint32_t val)
Definition: registers.cpp:109
bool setPIORegister(const uint64_t offset, const uint32_t val)
Definition: registers.cpp:142
bool getFormat7Register(const uint64_t offset, const uint32_t mode, uint32_t &val)
Definition: registers.cpp:101
bool setAdvancedControlRegisters(const uint64_t offset, const std::vector< uint32_t > &val)
Definition: registers.cpp:127
bool getPIORegister(const uint64_t offset, uint32_t &val)
Definition: registers.cpp:136
bool setControlRegisters(const uint64_t offset, const std::vector< uint32_t > &val)
Definition: registers.cpp:76
bool getSIORegister(const uint64_t offset, uint32_t &val)
Definition: registers.cpp:149


camera1394
Author(s): Jack O'Quin, Ken Tossell, Patrick Beeson, Nate Koenig, Andrew Howard, Damien Douxchamps, Dan Dennedy
autogenerated on Mon Jun 10 2019 12:52:31