WPILib 2012
WPILibRoboticsLibraryforFRC
ChipObject/tSystem.h
00001 // Base class for generated chip objects
00002 // Copyright (c) National Instruments 2008.  All Rights Reserved.
00003 
00004 #ifndef __tSystem_h__
00005 #define __tSystem_h__
00006 
00007 #include "NiRio.h"
00008 #include <vxWorks.h>
00009 
00010 #define FRC_FPGA_PRELOAD_BITFILE
00011 
00012 typedef uint32_t NiFpga_Session;
00013 
00014 namespace nFPGA
00015 {
00016 
00017 class tSystem
00018 {
00019 public:
00020    tSystem(tRioStatusCode *status);
00021    ~tSystem();
00022    void getFpgaGuid(uint32_t *guid_ptr, tRioStatusCode *status);
00023 
00024 protected:
00025    static NiFpga_Session _DeviceHandle;
00026 
00027 #ifdef FRC_FPGA_PRELOAD_BITFILE
00028    void NiFpga_SharedOpen_common(const char*     bitfile);
00029    NiFpga_Status NiFpga_SharedOpen(const char*     bitfile,
00030                             const char*     signature,
00031                             const char*     resource,
00032                             uint32_t        attribute,
00033                             NiFpga_Session* session);
00034    NiFpga_Status NiFpgaLv_SharedOpen(const char* const     bitfile,
00035                             const char* const     apiSignature,
00036                             const char* const     resource,
00037                             const uint32_t        attribute,
00038                             NiFpga_Session* const session);
00039 private:
00040     static char *_FileName;
00041     static char *_Bitfile;
00042 #endif
00043 };
00044 
00045 }
00046 
00047 #endif // __tSystem_h__
 All Classes Functions Variables