cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
osaDigitalOutput1394.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* ex: set filetype=cpp softtabstop=4 shiftwidth=4 tabstop=4 cindent expandtab: */
3 
4 /*
5  Author(s): Anton Deguet
6  Created on: 2014-11-06
7 
8  (C) Copyright 2014-2015 Johns Hopkins University (JHU), All Rights Reserved.
9 
10 --- begin cisst license - do not edit ---
11 
12 This software is provided "as is" under an open source license, with
13 no warranty. The complete license can be found in license.txt and
14 http://www.cisst.org/cisst/license.txt.
15 
16 --- end cisst license ---
17 */
18 
19 #ifndef _osaDigitalOutput1394_h
20 #define _osaDigitalOutput1394_h
21 
23 #include "AmpIO.h"
24 
25 namespace sawRobotIO1394 {
26 
28  public:
30 
31  void Configure(const osaDigitalOutput1394Configuration & config);
32  void SetBoard(AmpIO * board);
33 
34  void PollState(void);
35 
37  const std::string & Name(void) const;
38  const bool & Value(void) const;
39  void SetValue(const bool & newValue);
40  void SetPWMDutyCycle(const double & dutyCycle);
41 
42  protected:
43  AmpIO * mBoard; // Board Assignment
44 
46  std::string mName;
47  int mBitID; // Board assigned bitID for this Digital Output
48  AmpIO_UInt32 mBitMask; // BitMask for this input. From DigitalOutput Stream.
49 
50  // State data
51  AmpIO_UInt32 mDigitalOutputBits; // BitMask for this output. From DigitalOutput Stream.
52  bool mValue; // Current read value
53  };
54 
55 }
56 
57 #endif // _osaDigitalOutput1394_h
std::string mName
Definition: osaDigitalOutput1394.h:46
void SetValue(const bool &newValue)
void Configure(const osaDigitalOutput1394Configuration &config)
const osaDigitalOutput1394Configuration & Configuration(void) const
AmpIO * mBoard
Definition: osaDigitalOutput1394.h:43
const bool & Value(void) const
void SetPWMDutyCycle(const double &dutyCycle)
int mBitID
Definition: osaDigitalOutput1394.h:47
AmpIO_UInt32 mBitMask
Definition: osaDigitalOutput1394.h:48
AmpIO_UInt32 mDigitalOutputBits
Definition: osaDigitalOutput1394.h:51
osaDigitalOutput1394(const osaDigitalOutput1394Configuration &config)
Definition: osaDigitalOutput1394.h:27
bool mValue
Definition: osaDigitalOutput1394.h:52
const std::string & Name(void) const
Definition: osaConfiguration1394.h:134
osaDigitalOutput1394Configuration mConfiguration
Definition: osaDigitalOutput1394.h:45