jerrym | f157933 | 2013-02-07 01:56:28 +0000 | [diff] [blame^] | 1 | // Base class for generated chip objects
|
| 2 | // Copyright (c) National Instruments 2008. All Rights Reserved.
|
| 3 |
|
| 4 | #ifndef __tSystem_h__
|
| 5 | #define __tSystem_h__
|
| 6 |
|
| 7 | #include "NiRio.h"
|
| 8 | #include <vxWorks.h>
|
| 9 |
|
| 10 | #define FRC_FPGA_PRELOAD_BITFILE
|
| 11 |
|
| 12 | typedef uint32_t NiFpga_Session;
|
| 13 |
|
| 14 | namespace nFPGA
|
| 15 | {
|
| 16 |
|
| 17 | class tSystem
|
| 18 | {
|
| 19 | public:
|
| 20 | tSystem(tRioStatusCode *status);
|
| 21 | ~tSystem();
|
| 22 | void getFpgaGuid(uint32_t *guid_ptr, tRioStatusCode *status);
|
| 23 |
|
| 24 | protected:
|
| 25 | static NiFpga_Session _DeviceHandle;
|
| 26 |
|
| 27 | #ifdef FRC_FPGA_PRELOAD_BITFILE
|
| 28 | void NiFpga_SharedOpen_common(const char* bitfile);
|
| 29 | NiFpga_Status NiFpga_SharedOpen(const char* bitfile,
|
| 30 | const char* signature,
|
| 31 | const char* resource,
|
| 32 | uint32_t attribute,
|
| 33 | NiFpga_Session* session);
|
| 34 | NiFpga_Status NiFpgaLv_SharedOpen(const char* const bitfile,
|
| 35 | const char* const apiSignature,
|
| 36 | const char* const resource,
|
| 37 | const uint32_t attribute,
|
| 38 | NiFpga_Session* const session);
|
| 39 | private:
|
| 40 | static char *_FileName;
|
| 41 | static char *_Bitfile;
|
| 42 | #endif
|
| 43 | };
|
| 44 |
|
| 45 | }
|
| 46 |
|
| 47 | #endif // __tSystem_h__
|