00001 00002 // Title : NIDIO.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 National Instruments DAQ boards 00027 //----------------------------------------------------------------------------- 00028 // 00029 // 00031 #ifndef NIDIO_h 00032 #define NIDIO_h 00033 00034 #include "IODevices/DIO.h" 00035 00037 namespace OSCAR { 00038 00045 class NIDIO : public DIO 00046 { 00047 public: 00048 00062 NIDIO(unsigned int deviceNo, unsigned int portNo, const String& name = String(), OSCARError& err = DUMMY_ERROR(noError)); 00063 00067 virtual ~NIDIO(){} 00068 00069 bool SetPortDirection(DIO::PortDirection direction); 00070 00071 00080 bool ReadDI(unsigned int channel, bool& state); 00081 00090 bool WriteDI(unsigned int channel, bool state); 00091 00092 protected: 00093 int deviceNo; 00094 int portNo; 00095 }; 00096 00097 #include "IODevices/NIDIO.ipp" 00098 00099 } 00100 #endif // DIO_h
| RRG Homepage | OSCAR Overview | OSCAR Tutorials | Simulations |