Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

MCDIO.h

Go to the documentation of this file.
00001 
00002 //  Title       :  MCDIO.h
00003 //  Project     :  OSCAR Version 2.0
00004 //  Created     :  04/08/04
00005 //  Author      :  Chetan Kapoor
00006 //  Platforms   :  All
00007 //  Copyright   :  The University of Texas at Austin, 2002. All rights reserved.
00008 //
00009 //                 This software and documentation constitute an unpublished work
00010 //                 and contain valuable trade secrets and proprietary information
00011 //                 belonging to University.  None of the foregoing material may be
00012 //                 copied  or duplicated or disclosed without the express, written
00013 //                 permission of University.  UNIVERSITY EXPRESSLY DISCLAIMS ANY
00014 //                 AND ALL WARRANTIES CONCERNING THIS SOFTWARE AND DOCUMENTATION,
00015 //                 INCLUDING ANY WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
00016 //                 PARTICULAR PURPOSE, AND WARRANTIES OF PERFORMANCE, AND ANY WARRANTY
00017 //                 THAT MIGHT OTHERWISE ARISE FROM COURSE OF DEALING OR USAGE OF TRADE.
00018 //                 NO WARRANTY IS EITHER EXPRESS OR IMPLIED WITH RESPECT TO THE USE OF
00019 //                 THE SOFTWARE OR DOCUMENTATION.  Under no circumstances shall
00020 //                 University be liable for incidental, special, indirect, direct or
00021 //                 consequential damages or loss of profits, interruption of business,
00022 //                 or related expenses which may arise from use of software or documentation,
00023 //                 including but not limited to those resulting from defects in software
00024 //                 and/or documentation, or loss or inaccuracy of data of any kind.
00025 //
00026 //  Purpose     :  Class for digital IO using Measurement Computing DAQ boards
00027 //-----------------------------------------------------------------------------
00028 //
00029 //
00031 #ifndef MCDIO_h
00032 #define MCDIO_h
00033 
00034 #include "IODevices/DIO.h"
00035 #include "MCC/C/cbw.h"
00036 
00038 namespace OSCAR {
00039 
00046   class MCDIO : public DIO
00047   {
00048   public:
00049 
00066     MCDIO(unsigned int boardNo, DIO::PortDirection direction = DIO::Input, unsigned int portType = FIRSTPORTA, const String& name = String(), OSCARError& err = DUMMY_ERROR(noError));
00067 
00071     virtual ~MCDIO() {}
00072 
00078     bool SetPortDirection(DIO::PortDirection direction);
00079 
00088     bool ReadDI(unsigned int channel, bool& state);
00089 
00098     bool WriteDI(unsigned int channel, bool state);
00099 
00100   protected:
00101     int boardNo;
00102     int portType;
00103   };
00104 
00105 }
00106 #endif // DIO_h
RRG Homepage OSCAR Overview OSCAR Tutorials Simulations