WPILib 2012
WPILibRoboticsLibraryforFRC
ChipObject/tAnalogTrigger.h
00001 // Copyright (c) National Instruments 2008.  All Rights Reserved.
00002 // Do Not Edit... this file is generated!
00003 
00004 #ifndef __nFRC_2012_1_6_4_AnalogTrigger_h__
00005 #define __nFRC_2012_1_6_4_AnalogTrigger_h__
00006 
00007 #include "tSystemInterface.h"
00008 
00009 namespace nFPGA
00010 {
00011 namespace nFRC_2012_1_6_4
00012 {
00013 
00014 class tAnalogTrigger
00015 {
00016 public:
00017    tAnalogTrigger(){}
00018    virtual ~tAnalogTrigger(){}
00019 
00020    virtual tSystemInterface* getSystemInterface() = 0;
00021    static tAnalogTrigger* create(unsigned char sys_index, tRioStatusCode *status);
00022    virtual unsigned char getSystemIndex() = 0;
00023 
00024 
00025    typedef enum
00026    {
00027       kNumSystems = 8,
00028    } tIfaceConstants;
00029 
00030    typedef
00031    union{
00032       struct{
00033          unsigned InHysteresis : 1;
00034          unsigned OverLimit : 1;
00035          unsigned Rising : 1;
00036          unsigned Falling : 1;
00037       };
00038       struct{
00039          unsigned value : 4;
00040       };
00041    } tOutput;
00042    typedef
00043    union{
00044       struct{
00045          unsigned Channel : 3;
00046          unsigned Module : 1;
00047          unsigned Averaged : 1;
00048          unsigned Filter : 1;
00049          unsigned FloatingRollover : 1;
00050          signed RolloverLimit : 8;
00051       };
00052       struct{
00053          unsigned value : 15;
00054       };
00055    } tSourceSelect;
00056 
00057 
00058    typedef enum
00059    {
00060    } tSourceSelect_IfaceConstants;
00061 
00062    virtual void writeSourceSelect(tSourceSelect value, tRioStatusCode *status) = 0;
00063    virtual void writeSourceSelect_Channel(unsigned char value, tRioStatusCode *status) = 0;
00064    virtual void writeSourceSelect_Module(unsigned char value, tRioStatusCode *status) = 0;
00065    virtual void writeSourceSelect_Averaged(bool value, tRioStatusCode *status) = 0;
00066    virtual void writeSourceSelect_Filter(bool value, tRioStatusCode *status) = 0;
00067    virtual void writeSourceSelect_FloatingRollover(bool value, tRioStatusCode *status) = 0;
00068    virtual void writeSourceSelect_RolloverLimit(signed short value, tRioStatusCode *status) = 0;
00069    virtual tSourceSelect readSourceSelect(tRioStatusCode *status) = 0;
00070    virtual unsigned char readSourceSelect_Channel(tRioStatusCode *status) = 0;
00071    virtual unsigned char readSourceSelect_Module(tRioStatusCode *status) = 0;
00072    virtual bool readSourceSelect_Averaged(tRioStatusCode *status) = 0;
00073    virtual bool readSourceSelect_Filter(tRioStatusCode *status) = 0;
00074    virtual bool readSourceSelect_FloatingRollover(tRioStatusCode *status) = 0;
00075    virtual signed short readSourceSelect_RolloverLimit(tRioStatusCode *status) = 0;
00076 
00077 
00078    typedef enum
00079    {
00080    } tUpperLimit_IfaceConstants;
00081 
00082    virtual void writeUpperLimit(signed int value, tRioStatusCode *status) = 0;
00083    virtual signed int readUpperLimit(tRioStatusCode *status) = 0;
00084 
00085 
00086    typedef enum
00087    {
00088    } tLowerLimit_IfaceConstants;
00089 
00090    virtual void writeLowerLimit(signed int value, tRioStatusCode *status) = 0;
00091    virtual signed int readLowerLimit(tRioStatusCode *status) = 0;
00092 
00093 
00094 
00095    typedef enum
00096    {
00097       kNumOutputElements = 8,
00098    } tOutput_IfaceConstants;
00099 
00100    virtual tOutput readOutput(unsigned char bitfield_index, tRioStatusCode *status) = 0;
00101    virtual bool readOutput_InHysteresis(unsigned char bitfield_index, tRioStatusCode *status) = 0;
00102    virtual bool readOutput_OverLimit(unsigned char bitfield_index, tRioStatusCode *status) = 0;
00103    virtual bool readOutput_Rising(unsigned char bitfield_index, tRioStatusCode *status) = 0;
00104    virtual bool readOutput_Falling(unsigned char bitfield_index, tRioStatusCode *status) = 0;
00105 
00106 
00107 
00108 
00109 private:
00110    tAnalogTrigger(const tAnalogTrigger&);
00111    void operator=(const tAnalogTrigger&);
00112 };
00113 
00114 }
00115 }
00116 
00117 #endif // __nFRC_2012_1_6_4_AnalogTrigger_h__
 All Classes Functions Variables