diff --git a/hal/lib/Athena/ChipObject/FRC_FPGA_ChipObject_Aliases.h b/hal/lib/Athena/ChipObject/FRC_FPGA_ChipObject_Aliases.h index ef129fa116..e177ac2de1 100644 --- a/hal/lib/Athena/ChipObject/FRC_FPGA_ChipObject_Aliases.h +++ b/hal/lib/Athena/ChipObject/FRC_FPGA_ChipObject_Aliases.h @@ -1,10 +1,10 @@ -// Copyright (c) National Instruments 2008. All Rights Reserved. -// Do Not Edit... this file is generated! - -#ifndef __FRC_FPGA_ChipObject_Aliases_h__ -#define __FRC_FPGA_ChipObject_Aliases_h__ - -#define nInvariantFPGANamespace nFRC_C0EF_1_1_0 -#define nRuntimeFPGANamespace nFRC_2012_1_6_4 - -#endif // __FRC_FPGA_ChipObject_Aliases_h__ +// Copyright (c) National Instruments 2008. All Rights Reserved. +// Do Not Edit... this file is generated! + +#ifndef __FRC_FPGA_ChipObject_Aliases_h__ +#define __FRC_FPGA_ChipObject_Aliases_h__ + +#define nInvariantFPGANamespace nFRC_C0EF_1_1_0 +#define nRuntimeFPGANamespace nFRC_2012_1_6_4 + +#endif // __FRC_FPGA_ChipObject_Aliases_h__ diff --git a/hal/lib/Athena/ChipObject/RoboRIO_FRC_ChipObject_Aliases.h b/hal/lib/Athena/ChipObject/RoboRIO_FRC_ChipObject_Aliases.h index 4706240b1f..be207c77f1 100644 --- a/hal/lib/Athena/ChipObject/RoboRIO_FRC_ChipObject_Aliases.h +++ b/hal/lib/Athena/ChipObject/RoboRIO_FRC_ChipObject_Aliases.h @@ -1,9 +1,9 @@ -// Copyright (c) National Instruments 2008. All Rights Reserved. -// Do Not Edit... this file is generated! - -#ifndef __RoboRIO_FRC_ChipObject_Aliases_h__ -#define __RoboRIO_FRC_ChipObject_Aliases_h__ - -#define nRoboRIO_FPGANamespace nFRC_2015_1_0_4 - -#endif // __RoboRIO_FRC_ChipObject_Aliases_h__ +// Copyright (c) National Instruments 2008. All Rights Reserved. +// Do Not Edit... this file is generated! + +#ifndef __RoboRIO_FRC_ChipObject_Aliases_h__ +#define __RoboRIO_FRC_ChipObject_Aliases_h__ + +#define nRoboRIO_FPGANamespace nFRC_2015_1_0_5 + +#endif // __RoboRIO_FRC_ChipObject_Aliases_h__ diff --git a/hal/lib/Athena/ChipObject/nInterfaceGlobals.h b/hal/lib/Athena/ChipObject/nInterfaceGlobals.h index d04a310d8e..a10713dae5 100644 --- a/hal/lib/Athena/ChipObject/nInterfaceGlobals.h +++ b/hal/lib/Athena/ChipObject/nInterfaceGlobals.h @@ -1,15 +1,15 @@ -// Copyright (c) National Instruments 2008. All Rights Reserved. -// Do Not Edit... this file is generated! - -#ifndef __nFRC_2015_1_0_4_nInterfaceGlobals_h__ -#define __nFRC_2015_1_0_4_nInterfaceGlobals_h__ - -namespace nFPGA -{ -namespace nFRC_2015_1_0_4 -{ - extern unsigned int g_currentTargetClass; -} -} - -#endif // __nFRC_2015_1_0_4_nInterfaceGlobals_h__ +// Copyright (c) National Instruments 2008. All Rights Reserved. +// Do Not Edit... this file is generated! + +#ifndef __nFRC_2015_1_0_5_nInterfaceGlobals_h__ +#define __nFRC_2015_1_0_5_nInterfaceGlobals_h__ + +namespace nFPGA +{ +namespace nFRC_2015_1_0_5 +{ + extern unsigned int g_currentTargetClass; +} +} + +#endif // __nFRC_2015_1_0_5_nInterfaceGlobals_h__ diff --git a/hal/lib/Athena/ChipObject/printFpgaVersion.h b/hal/lib/Athena/ChipObject/printFpgaVersion.h index 9ef9bf4370..788f1df6d9 100644 --- a/hal/lib/Athena/ChipObject/printFpgaVersion.h +++ b/hal/lib/Athena/ChipObject/printFpgaVersion.h @@ -1,42 +1,42 @@ -// Copyright (c) National Instruments 2008. All Rights Reserved. - -#ifndef __printFPGAVersion_h__ -#define __printFPGAVersion_h__ - -namespace nFPGA -{ - -template -inline void printFPGAVersion(ttGlobal &global) -{ - tRioStatusCode cleanStatus=0; - uint32_t hardwareGuid[4]; - tSystemInterface &system = *global.getSystemInterface(); - system.getHardwareFpgaSignature(hardwareGuid, &cleanStatus); - const uint32_t *softwareGuid = system.getExpectedFPGASignature(); - printf("FPGA Hardware GUID: 0x"); - for(int i=0; i<4; i++) - { - printf("%08X", hardwareGuid[i]); - } - printf("\n"); - printf("FPGA Software GUID: 0x"); - for(int i=0; i<4; i++) - { - printf("%08X", softwareGuid[i]); - } - printf("\n"); - uint16_t fpgaHardwareVersion = global.readVersion(&cleanStatus); - uint16_t fpgaSoftwareVersion = system.getExpectedFPGAVersion(); - printf("FPGA Hardware Version: %X\n", fpgaHardwareVersion); - printf("FPGA Software Version: %X\n", fpgaSoftwareVersion); - uint32_t fpgaHardwareRevision = global.readRevision(&cleanStatus); - uint32_t fpgaSoftwareRevision = system.getExpectedFPGARevision(); - printf("FPGA Hardware Revision: %X.%X.%X\n", (fpgaHardwareRevision >> 20) & 0xFFF, (fpgaHardwareRevision >> 12) & 0xFF, fpgaHardwareRevision & 0xFFF); - printf("FPGA Software Revision: %X.%X.%X\n", (fpgaSoftwareRevision >> 20) & 0xFFF, (fpgaSoftwareRevision >> 12) & 0xFF, fpgaSoftwareRevision & 0xFFF); -} - -} - -#endif // __printFPGAVersion_h__ - +// Copyright (c) National Instruments 2008. All Rights Reserved. + +#ifndef __printFPGAVersion_h__ +#define __printFPGAVersion_h__ + +namespace nFPGA +{ + +template +inline void printFPGAVersion(ttGlobal &global) +{ + tRioStatusCode cleanStatus=0; + uint32_t hardwareGuid[4]; + tSystemInterface &system = *global.getSystemInterface(); + system.getHardwareFpgaSignature(hardwareGuid, &cleanStatus); + const uint32_t *softwareGuid = system.getExpectedFPGASignature(); + printf("FPGA Hardware GUID: 0x"); + for(int i=0; i<4; i++) + { + printf("%08X", hardwareGuid[i]); + } + printf("\n"); + printf("FPGA Software GUID: 0x"); + for(int i=0; i<4; i++) + { + printf("%08X", softwareGuid[i]); + } + printf("\n"); + uint16_t fpgaHardwareVersion = global.readVersion(&cleanStatus); + uint16_t fpgaSoftwareVersion = system.getExpectedFPGAVersion(); + printf("FPGA Hardware Version: %X\n", fpgaHardwareVersion); + printf("FPGA Software Version: %X\n", fpgaSoftwareVersion); + uint32_t fpgaHardwareRevision = global.readRevision(&cleanStatus); + uint32_t fpgaSoftwareRevision = system.getExpectedFPGARevision(); + printf("FPGA Hardware Revision: %X.%X.%X\n", (fpgaHardwareRevision >> 20) & 0xFFF, (fpgaHardwareRevision >> 12) & 0xFF, fpgaHardwareRevision & 0xFFF); + printf("FPGA Software Revision: %X.%X.%X\n", (fpgaSoftwareRevision >> 20) & 0xFFF, (fpgaSoftwareRevision >> 12) & 0xFF, fpgaSoftwareRevision & 0xFFF); +} + +} + +#endif // __printFPGAVersion_h__ + diff --git a/hal/lib/Athena/ChipObject/tAI.h b/hal/lib/Athena/ChipObject/tAI.h index 24bba65593..5f953561f2 100644 --- a/hal/lib/Athena/ChipObject/tAI.h +++ b/hal/lib/Athena/ChipObject/tAI.h @@ -1,143 +1,143 @@ -// Copyright (c) National Instruments 2008. All Rights Reserved. -// Do Not Edit... this file is generated! - -#ifndef __nFRC_2015_1_0_4_AI_h__ -#define __nFRC_2015_1_0_4_AI_h__ - -#include "tSystemInterface.h" - -namespace nFPGA -{ -namespace nFRC_2015_1_0_4 -{ - -class tAI -{ -public: - tAI(){} - virtual ~tAI(){} - - virtual tSystemInterface* getSystemInterface() = 0; - static tAI* create(tRioStatusCode *status); - - typedef enum - { - kNumSystems = 1, - } tIfaceConstants; - - typedef - union{ - struct{ -#ifdef __vxworks - unsigned ScanSize : 3; - unsigned ConvertRate : 26; -#else - unsigned ConvertRate : 26; - unsigned ScanSize : 3; -#endif - }; - struct{ - unsigned value : 29; - }; - } tConfig; - typedef - union{ - struct{ -#ifdef __vxworks - unsigned Channel : 3; - unsigned Averaged : 1; -#else - unsigned Averaged : 1; - unsigned Channel : 3; -#endif - }; - struct{ - unsigned value : 4; - }; - } tReadSelect; - - - - typedef enum - { - } tOutput_IfaceConstants; - - virtual signed int readOutput(tRioStatusCode *status) = 0; - - - typedef enum - { - } tConfig_IfaceConstants; - - virtual void writeConfig(tConfig value, tRioStatusCode *status) = 0; - virtual void writeConfig_ScanSize(unsigned char value, tRioStatusCode *status) = 0; - virtual void writeConfig_ConvertRate(unsigned int value, tRioStatusCode *status) = 0; - virtual tConfig readConfig(tRioStatusCode *status) = 0; - virtual unsigned char readConfig_ScanSize(tRioStatusCode *status) = 0; - virtual unsigned int readConfig_ConvertRate(tRioStatusCode *status) = 0; - - - typedef enum - { - } tLoopTiming_IfaceConstants; - - virtual unsigned int readLoopTiming(tRioStatusCode *status) = 0; - - - typedef enum - { - kNumOversampleBitsElements = 8, - } tOversampleBits_IfaceConstants; - - virtual void writeOversampleBits(unsigned char bitfield_index, unsigned char value, tRioStatusCode *status) = 0; - virtual unsigned char readOversampleBits(unsigned char bitfield_index, tRioStatusCode *status) = 0; - - - typedef enum - { - kNumAverageBitsElements = 8, - } tAverageBits_IfaceConstants; - - virtual void writeAverageBits(unsigned char bitfield_index, unsigned char value, tRioStatusCode *status) = 0; - virtual unsigned char readAverageBits(unsigned char bitfield_index, tRioStatusCode *status) = 0; - - - typedef enum - { - kNumScanListElements = 8, - } tScanList_IfaceConstants; - - virtual void writeScanList(unsigned char bitfield_index, unsigned char value, tRioStatusCode *status) = 0; - virtual unsigned char readScanList(unsigned char bitfield_index, tRioStatusCode *status) = 0; - - - typedef enum - { - } tLatchOutput_IfaceConstants; - - virtual void strobeLatchOutput(tRioStatusCode *status) = 0; - - - typedef enum - { - } tReadSelect_IfaceConstants; - - virtual void writeReadSelect(tReadSelect value, tRioStatusCode *status) = 0; - virtual void writeReadSelect_Channel(unsigned char value, tRioStatusCode *status) = 0; - virtual void writeReadSelect_Averaged(bool value, tRioStatusCode *status) = 0; - virtual tReadSelect readReadSelect(tRioStatusCode *status) = 0; - virtual unsigned char readReadSelect_Channel(tRioStatusCode *status) = 0; - virtual bool readReadSelect_Averaged(tRioStatusCode *status) = 0; - - - - -private: - tAI(const tAI&); - void operator=(const tAI&); -}; - -} -} - -#endif // __nFRC_2015_1_0_4_AI_h__ +// Copyright (c) National Instruments 2008. All Rights Reserved. +// Do Not Edit... this file is generated! + +#ifndef __nFRC_2015_1_0_5_AI_h__ +#define __nFRC_2015_1_0_5_AI_h__ + +#include "tSystemInterface.h" + +namespace nFPGA +{ +namespace nFRC_2015_1_0_5 +{ + +class tAI +{ +public: + tAI(){} + virtual ~tAI(){} + + virtual tSystemInterface* getSystemInterface() = 0; + static tAI* create(tRioStatusCode *status); + + typedef enum + { + kNumSystems = 1, + } tIfaceConstants; + + typedef + union{ + struct{ +#ifdef __vxworks + unsigned ScanSize : 3; + unsigned ConvertRate : 26; +#else + unsigned ConvertRate : 26; + unsigned ScanSize : 3; +#endif + }; + struct{ + unsigned value : 29; + }; + } tConfig; + typedef + union{ + struct{ +#ifdef __vxworks + unsigned Channel : 3; + unsigned Averaged : 1; +#else + unsigned Averaged : 1; + unsigned Channel : 3; +#endif + }; + struct{ + unsigned value : 4; + }; + } tReadSelect; + + + + typedef enum + { + } tOutput_IfaceConstants; + + virtual signed int readOutput(tRioStatusCode *status) = 0; + + + typedef enum + { + } tConfig_IfaceConstants; + + virtual void writeConfig(tConfig value, tRioStatusCode *status) = 0; + virtual void writeConfig_ScanSize(unsigned char value, tRioStatusCode *status) = 0; + virtual void writeConfig_ConvertRate(unsigned int value, tRioStatusCode *status) = 0; + virtual tConfig readConfig(tRioStatusCode *status) = 0; + virtual unsigned char readConfig_ScanSize(tRioStatusCode *status) = 0; + virtual unsigned int readConfig_ConvertRate(tRioStatusCode *status) = 0; + + + typedef enum + { + } tLoopTiming_IfaceConstants; + + virtual unsigned int readLoopTiming(tRioStatusCode *status) = 0; + + + typedef enum + { + kNumOversampleBitsElements = 8, + } tOversampleBits_IfaceConstants; + + virtual void writeOversampleBits(unsigned char bitfield_index, unsigned char value, tRioStatusCode *status) = 0; + virtual unsigned char readOversampleBits(unsigned char bitfield_index, tRioStatusCode *status) = 0; + + + typedef enum + { + kNumAverageBitsElements = 8, + } tAverageBits_IfaceConstants; + + virtual void writeAverageBits(unsigned char bitfield_index, unsigned char value, tRioStatusCode *status) = 0; + virtual unsigned char readAverageBits(unsigned char bitfield_index, tRioStatusCode *status) = 0; + + + typedef enum + { + kNumScanListElements = 8, + } tScanList_IfaceConstants; + + virtual void writeScanList(unsigned char bitfield_index, unsigned char value, tRioStatusCode *status) = 0; + virtual unsigned char readScanList(unsigned char bitfield_index, tRioStatusCode *status) = 0; + + + typedef enum + { + } tLatchOutput_IfaceConstants; + + virtual void strobeLatchOutput(tRioStatusCode *status) = 0; + + + typedef enum + { + } tReadSelect_IfaceConstants; + + virtual void writeReadSelect(tReadSelect value, tRioStatusCode *status) = 0; + virtual void writeReadSelect_Channel(unsigned char value, tRioStatusCode *status) = 0; + virtual void writeReadSelect_Averaged(bool value, tRioStatusCode *status) = 0; + virtual tReadSelect readReadSelect(tRioStatusCode *status) = 0; + virtual unsigned char readReadSelect_Channel(tRioStatusCode *status) = 0; + virtual bool readReadSelect_Averaged(tRioStatusCode *status) = 0; + + + + +private: + tAI(const tAI&); + void operator=(const tAI&); +}; + +} +} + +#endif // __nFRC_2015_1_0_5_AI_h__ diff --git a/hal/lib/Athena/ChipObject/tAO.h b/hal/lib/Athena/ChipObject/tAO.h index 621cf34fa3..98fe2832eb 100644 --- a/hal/lib/Athena/ChipObject/tAO.h +++ b/hal/lib/Athena/ChipObject/tAO.h @@ -1,50 +1,50 @@ -// Copyright (c) National Instruments 2008. All Rights Reserved. -// Do Not Edit... this file is generated! - -#ifndef __nFRC_2015_1_0_4_AO_h__ -#define __nFRC_2015_1_0_4_AO_h__ - -#include "tSystemInterface.h" - -namespace nFPGA -{ -namespace nFRC_2015_1_0_4 -{ - -class tAO -{ -public: - tAO(){} - virtual ~tAO(){} - - virtual tSystemInterface* getSystemInterface() = 0; - static tAO* create(tRioStatusCode *status); - - typedef enum - { - kNumSystems = 1, - } tIfaceConstants; - - - - - - - typedef enum - { - kNumMXPRegisters = 2, - } tMXP_IfaceConstants; - - virtual void writeMXP(unsigned char reg_index, unsigned short value, tRioStatusCode *status) = 0; - virtual unsigned short readMXP(unsigned char reg_index, tRioStatusCode *status) = 0; - - -private: - tAO(const tAO&); - void operator=(const tAO&); -}; - -} -} - -#endif // __nFRC_2015_1_0_4_AO_h__ +// Copyright (c) National Instruments 2008. All Rights Reserved. +// Do Not Edit... this file is generated! + +#ifndef __nFRC_2015_1_0_5_AO_h__ +#define __nFRC_2015_1_0_5_AO_h__ + +#include "tSystemInterface.h" + +namespace nFPGA +{ +namespace nFRC_2015_1_0_5 +{ + +class tAO +{ +public: + tAO(){} + virtual ~tAO(){} + + virtual tSystemInterface* getSystemInterface() = 0; + static tAO* create(tRioStatusCode *status); + + typedef enum + { + kNumSystems = 1, + } tIfaceConstants; + + + + + + + typedef enum + { + kNumMXPRegisters = 2, + } tMXP_IfaceConstants; + + virtual void writeMXP(unsigned char reg_index, unsigned short value, tRioStatusCode *status) = 0; + virtual unsigned short readMXP(unsigned char reg_index, tRioStatusCode *status) = 0; + + +private: + tAO(const tAO&); + void operator=(const tAO&); +}; + +} +} + +#endif // __nFRC_2015_1_0_5_AO_h__ diff --git a/hal/lib/Athena/ChipObject/tAccel.h b/hal/lib/Athena/ChipObject/tAccel.h index cdbc5a9b7e..fe43ed4df6 100644 --- a/hal/lib/Athena/ChipObject/tAccel.h +++ b/hal/lib/Athena/ChipObject/tAccel.h @@ -1,62 +1,102 @@ -// Copyright (c) National Instruments 2008. All Rights Reserved. -// Do Not Edit... this file is generated! - -#ifndef __nFRC_2015_1_0_4_Accel_h__ -#define __nFRC_2015_1_0_4_Accel_h__ - -#include "tSystemInterface.h" - -namespace nFPGA -{ -namespace nFRC_2015_1_0_4 -{ - -class tAccel -{ -public: - tAccel(){} - virtual ~tAccel(){} - - virtual tSystemInterface* getSystemInterface() = 0; - static tAccel* create(tRioStatusCode *status); - - typedef enum - { - kNumSystems = 1, - } tIfaceConstants; - - - - - typedef enum - { - } tX_IfaceConstants; - - virtual signed short readX(tRioStatusCode *status) = 0; - - - typedef enum - { - } tY_IfaceConstants; - - virtual signed short readY(tRioStatusCode *status) = 0; - - - typedef enum - { - } tZ_IfaceConstants; - - virtual signed short readZ(tRioStatusCode *status) = 0; - - - - -private: - tAccel(const tAccel&); - void operator=(const tAccel&); -}; - -} -} - -#endif // __nFRC_2015_1_0_4_Accel_h__ +// Copyright (c) National Instruments 2008. All Rights Reserved. +// Do Not Edit... this file is generated! + +#ifndef __nFRC_2015_1_0_5_Accel_h__ +#define __nFRC_2015_1_0_5_Accel_h__ + +#include "tSystemInterface.h" + +namespace nFPGA +{ +namespace nFRC_2015_1_0_5 +{ + +class tAccel +{ +public: + tAccel(){} + virtual ~tAccel(){} + + virtual tSystemInterface* getSystemInterface() = 0; + static tAccel* create(tRioStatusCode *status); + + typedef enum + { + kNumSystems = 1, + } tIfaceConstants; + + + + + typedef enum + { + } tSTAT_IfaceConstants; + + virtual unsigned char readSTAT(tRioStatusCode *status) = 0; + + + typedef enum + { + } tCNTR_IfaceConstants; + + virtual void writeCNTR(unsigned char value, tRioStatusCode *status) = 0; + virtual unsigned char readCNTR(tRioStatusCode *status) = 0; + + + typedef enum + { + } tDATO_IfaceConstants; + + virtual void writeDATO(unsigned char value, tRioStatusCode *status) = 0; + virtual unsigned char readDATO(tRioStatusCode *status) = 0; + + + typedef enum + { + } tCNFG_IfaceConstants; + + virtual void writeCNFG(unsigned char value, tRioStatusCode *status) = 0; + virtual unsigned char readCNFG(tRioStatusCode *status) = 0; + + + typedef enum + { + } tCNTL_IfaceConstants; + + virtual void writeCNTL(unsigned char value, tRioStatusCode *status) = 0; + virtual unsigned char readCNTL(tRioStatusCode *status) = 0; + + + typedef enum + { + } tDATI_IfaceConstants; + + virtual unsigned char readDATI(tRioStatusCode *status) = 0; + + + typedef enum + { + } tGO_IfaceConstants; + + virtual void strobeGO(tRioStatusCode *status) = 0; + + + typedef enum + { + } tADDR_IfaceConstants; + + virtual void writeADDR(unsigned char value, tRioStatusCode *status) = 0; + virtual unsigned char readADDR(tRioStatusCode *status) = 0; + + + + +private: + tAccel(const tAccel&); + void operator=(const tAccel&); +}; + +} +} + +#endif // __nFRC_2015_1_0_5_Accel_h__ diff --git a/hal/lib/Athena/ChipObject/tAccumulator.h b/hal/lib/Athena/ChipObject/tAccumulator.h index 78f176cb1d..04c755190b 100644 --- a/hal/lib/Athena/ChipObject/tAccumulator.h +++ b/hal/lib/Athena/ChipObject/tAccumulator.h @@ -1,87 +1,87 @@ -// Copyright (c) National Instruments 2008. All Rights Reserved. -// Do Not Edit... this file is generated! - -#ifndef __nFRC_2015_1_0_4_Accumulator_h__ -#define __nFRC_2015_1_0_4_Accumulator_h__ - -#include "tSystemInterface.h" - -namespace nFPGA -{ -namespace nFRC_2015_1_0_4 -{ - -class tAccumulator -{ -public: - tAccumulator(){} - virtual ~tAccumulator(){} - - virtual tSystemInterface* getSystemInterface() = 0; - static tAccumulator* create(unsigned char sys_index, tRioStatusCode *status); - virtual unsigned char getSystemIndex() = 0; - - - typedef enum - { - kNumSystems = 2, - } tIfaceConstants; - - typedef - union{ - struct{ - signed long long Value; - unsigned Count : 32; - }; - struct{ - unsigned value : 32; - unsigned value2 : 32; - unsigned value3 : 32; - }; - } tOutput; - - - typedef enum - { - } tOutput_IfaceConstants; - - virtual tOutput readOutput(tRioStatusCode *status) = 0; - virtual signed long long readOutput_Value(tRioStatusCode *status) = 0; - virtual unsigned int readOutput_Count(tRioStatusCode *status) = 0; - - - typedef enum - { - } tCenter_IfaceConstants; - - virtual void writeCenter(signed int value, tRioStatusCode *status) = 0; - virtual signed int readCenter(tRioStatusCode *status) = 0; - - - typedef enum - { - } tDeadband_IfaceConstants; - - virtual void writeDeadband(signed int value, tRioStatusCode *status) = 0; - virtual signed int readDeadband(tRioStatusCode *status) = 0; - - - typedef enum - { - } tReset_IfaceConstants; - - virtual void strobeReset(tRioStatusCode *status) = 0; - - - - - -private: - tAccumulator(const tAccumulator&); - void operator=(const tAccumulator&); -}; - -} -} - -#endif // __nFRC_2015_1_0_4_Accumulator_h__ +// Copyright (c) National Instruments 2008. All Rights Reserved. +// Do Not Edit... this file is generated! + +#ifndef __nFRC_2015_1_0_5_Accumulator_h__ +#define __nFRC_2015_1_0_5_Accumulator_h__ + +#include "tSystemInterface.h" + +namespace nFPGA +{ +namespace nFRC_2015_1_0_5 +{ + +class tAccumulator +{ +public: + tAccumulator(){} + virtual ~tAccumulator(){} + + virtual tSystemInterface* getSystemInterface() = 0; + static tAccumulator* create(unsigned char sys_index, tRioStatusCode *status); + virtual unsigned char getSystemIndex() = 0; + + + typedef enum + { + kNumSystems = 2, + } tIfaceConstants; + + typedef + union{ + struct{ + signed long long Value; + unsigned Count : 32; + }; + struct{ + unsigned value : 32; + unsigned value2 : 32; + unsigned value3 : 32; + }; + } tOutput; + + + typedef enum + { + } tOutput_IfaceConstants; + + virtual tOutput readOutput(tRioStatusCode *status) = 0; + virtual signed long long readOutput_Value(tRioStatusCode *status) = 0; + virtual unsigned int readOutput_Count(tRioStatusCode *status) = 0; + + + typedef enum + { + } tCenter_IfaceConstants; + + virtual void writeCenter(signed int value, tRioStatusCode *status) = 0; + virtual signed int readCenter(tRioStatusCode *status) = 0; + + + typedef enum + { + } tDeadband_IfaceConstants; + + virtual void writeDeadband(signed int value, tRioStatusCode *status) = 0; + virtual signed int readDeadband(tRioStatusCode *status) = 0; + + + typedef enum + { + } tReset_IfaceConstants; + + virtual void strobeReset(tRioStatusCode *status) = 0; + + + + + +private: + tAccumulator(const tAccumulator&); + void operator=(const tAccumulator&); +}; + +} +} + +#endif // __nFRC_2015_1_0_5_Accumulator_h__ diff --git a/hal/lib/Athena/ChipObject/tAlarm.h b/hal/lib/Athena/ChipObject/tAlarm.h index e590fc0a79..3620eb75ba 100644 --- a/hal/lib/Athena/ChipObject/tAlarm.h +++ b/hal/lib/Athena/ChipObject/tAlarm.h @@ -1,57 +1,57 @@ -// Copyright (c) National Instruments 2008. All Rights Reserved. -// Do Not Edit... this file is generated! - -#ifndef __nFRC_2015_1_0_4_Alarm_h__ -#define __nFRC_2015_1_0_4_Alarm_h__ - -#include "tSystemInterface.h" - -namespace nFPGA -{ -namespace nFRC_2015_1_0_4 -{ - -class tAlarm -{ -public: - tAlarm(){} - virtual ~tAlarm(){} - - virtual tSystemInterface* getSystemInterface() = 0; - static tAlarm* create(tRioStatusCode *status); - - typedef enum - { - kNumSystems = 1, - } tIfaceConstants; - - - - - typedef enum - { - } tEnable_IfaceConstants; - - virtual void writeEnable(bool value, tRioStatusCode *status) = 0; - virtual bool readEnable(tRioStatusCode *status) = 0; - - - typedef enum - { - } tTriggerTime_IfaceConstants; - - virtual void writeTriggerTime(unsigned int value, tRioStatusCode *status) = 0; - virtual unsigned int readTriggerTime(tRioStatusCode *status) = 0; - - - - -private: - tAlarm(const tAlarm&); - void operator=(const tAlarm&); -}; - -} -} - -#endif // __nFRC_2015_1_0_4_Alarm_h__ +// Copyright (c) National Instruments 2008. All Rights Reserved. +// Do Not Edit... this file is generated! + +#ifndef __nFRC_2015_1_0_5_Alarm_h__ +#define __nFRC_2015_1_0_5_Alarm_h__ + +#include "tSystemInterface.h" + +namespace nFPGA +{ +namespace nFRC_2015_1_0_5 +{ + +class tAlarm +{ +public: + tAlarm(){} + virtual ~tAlarm(){} + + virtual tSystemInterface* getSystemInterface() = 0; + static tAlarm* create(tRioStatusCode *status); + + typedef enum + { + kNumSystems = 1, + } tIfaceConstants; + + + + + typedef enum + { + } tEnable_IfaceConstants; + + virtual void writeEnable(bool value, tRioStatusCode *status) = 0; + virtual bool readEnable(tRioStatusCode *status) = 0; + + + typedef enum + { + } tTriggerTime_IfaceConstants; + + virtual void writeTriggerTime(unsigned int value, tRioStatusCode *status) = 0; + virtual unsigned int readTriggerTime(tRioStatusCode *status) = 0; + + + + +private: + tAlarm(const tAlarm&); + void operator=(const tAlarm&); +}; + +} +} + +#endif // __nFRC_2015_1_0_5_Alarm_h__ diff --git a/hal/lib/Athena/ChipObject/tAnalogTrigger.h b/hal/lib/Athena/ChipObject/tAnalogTrigger.h index cb9efe1705..fdd776cab8 100644 --- a/hal/lib/Athena/ChipObject/tAnalogTrigger.h +++ b/hal/lib/Athena/ChipObject/tAnalogTrigger.h @@ -1,129 +1,129 @@ -// Copyright (c) National Instruments 2008. All Rights Reserved. -// Do Not Edit... this file is generated! - -#ifndef __nFRC_2015_1_0_4_AnalogTrigger_h__ -#define __nFRC_2015_1_0_4_AnalogTrigger_h__ - -#include "tSystemInterface.h" - -namespace nFPGA -{ -namespace nFRC_2015_1_0_4 -{ - -class tAnalogTrigger -{ -public: - tAnalogTrigger(){} - virtual ~tAnalogTrigger(){} - - virtual tSystemInterface* getSystemInterface() = 0; - static tAnalogTrigger* create(unsigned char sys_index, tRioStatusCode *status); - virtual unsigned char getSystemIndex() = 0; - - - typedef enum - { - kNumSystems = 8, - } tIfaceConstants; - - typedef - union{ - struct{ -#ifdef __vxworks - unsigned InHysteresis : 1; - unsigned OverLimit : 1; - unsigned Rising : 1; - unsigned Falling : 1; -#else - unsigned Falling : 1; - unsigned Rising : 1; - unsigned OverLimit : 1; - unsigned InHysteresis : 1; -#endif - }; - struct{ - unsigned value : 4; - }; - } tOutput; - typedef - union{ - struct{ -#ifdef __vxworks - unsigned Channel : 3; - unsigned Averaged : 1; - unsigned Filter : 1; - unsigned FloatingRollover : 1; - signed RolloverLimit : 8; -#else - signed RolloverLimit : 8; - unsigned FloatingRollover : 1; - unsigned Filter : 1; - unsigned Averaged : 1; - unsigned Channel : 3; -#endif - }; - struct{ - unsigned value : 14; - }; - } tSourceSelect; - - - typedef enum - { - } tSourceSelect_IfaceConstants; - - virtual void writeSourceSelect(tSourceSelect value, tRioStatusCode *status) = 0; - virtual void writeSourceSelect_Channel(unsigned char value, tRioStatusCode *status) = 0; - virtual void writeSourceSelect_Averaged(bool value, tRioStatusCode *status) = 0; - virtual void writeSourceSelect_Filter(bool value, tRioStatusCode *status) = 0; - virtual void writeSourceSelect_FloatingRollover(bool value, tRioStatusCode *status) = 0; - virtual void writeSourceSelect_RolloverLimit(signed short value, tRioStatusCode *status) = 0; - virtual tSourceSelect readSourceSelect(tRioStatusCode *status) = 0; - virtual unsigned char readSourceSelect_Channel(tRioStatusCode *status) = 0; - virtual bool readSourceSelect_Averaged(tRioStatusCode *status) = 0; - virtual bool readSourceSelect_Filter(tRioStatusCode *status) = 0; - virtual bool readSourceSelect_FloatingRollover(tRioStatusCode *status) = 0; - virtual signed short readSourceSelect_RolloverLimit(tRioStatusCode *status) = 0; - - - typedef enum - { - } tUpperLimit_IfaceConstants; - - virtual void writeUpperLimit(signed int value, tRioStatusCode *status) = 0; - virtual signed int readUpperLimit(tRioStatusCode *status) = 0; - - - typedef enum - { - } tLowerLimit_IfaceConstants; - - virtual void writeLowerLimit(signed int value, tRioStatusCode *status) = 0; - virtual signed int readLowerLimit(tRioStatusCode *status) = 0; - - - - typedef enum - { - kNumOutputElements = 8, - } tOutput_IfaceConstants; - - virtual tOutput readOutput(unsigned char bitfield_index, tRioStatusCode *status) = 0; - virtual bool readOutput_InHysteresis(unsigned char bitfield_index, tRioStatusCode *status) = 0; - virtual bool readOutput_OverLimit(unsigned char bitfield_index, tRioStatusCode *status) = 0; - virtual bool readOutput_Rising(unsigned char bitfield_index, tRioStatusCode *status) = 0; - virtual bool readOutput_Falling(unsigned char bitfield_index, tRioStatusCode *status) = 0; - - - - -private: - tAnalogTrigger(const tAnalogTrigger&); - void operator=(const tAnalogTrigger&); -}; - -} -} - -#endif // __nFRC_2015_1_0_4_AnalogTrigger_h__ +// Copyright (c) National Instruments 2008. All Rights Reserved. +// Do Not Edit... this file is generated! + +#ifndef __nFRC_2015_1_0_5_AnalogTrigger_h__ +#define __nFRC_2015_1_0_5_AnalogTrigger_h__ + +#include "tSystemInterface.h" + +namespace nFPGA +{ +namespace nFRC_2015_1_0_5 +{ + +class tAnalogTrigger +{ +public: + tAnalogTrigger(){} + virtual ~tAnalogTrigger(){} + + virtual tSystemInterface* getSystemInterface() = 0; + static tAnalogTrigger* create(unsigned char sys_index, tRioStatusCode *status); + virtual unsigned char getSystemIndex() = 0; + + + typedef enum + { + kNumSystems = 8, + } tIfaceConstants; + + typedef + union{ + struct{ +#ifdef __vxworks + unsigned InHysteresis : 1; + unsigned OverLimit : 1; + unsigned Rising : 1; + unsigned Falling : 1; +#else + unsigned Falling : 1; + unsigned Rising : 1; + unsigned OverLimit : 1; + unsigned InHysteresis : 1; +#endif + }; + struct{ + unsigned value : 4; + }; + } tOutput; + typedef + union{ + struct{ +#ifdef __vxworks + unsigned Channel : 3; + unsigned Averaged : 1; + unsigned Filter : 1; + unsigned FloatingRollover : 1; + signed RolloverLimit : 8; +#else + signed RolloverLimit : 8; + unsigned FloatingRollover : 1; + unsigned Filter : 1; + unsigned Averaged : 1; + unsigned Channel : 3; +#endif + }; + struct{ + unsigned value : 14; + }; + } tSourceSelect; + + + typedef enum + { + } tSourceSelect_IfaceConstants; + + virtual void writeSourceSelect(tSourceSelect value, tRioStatusCode *status) = 0; + virtual void writeSourceSelect_Channel(unsigned char value, tRioStatusCode *status) = 0; + virtual void writeSourceSelect_Averaged(bool value, tRioStatusCode *status) = 0; + virtual void writeSourceSelect_Filter(bool value, tRioStatusCode *status) = 0; + virtual void writeSourceSelect_FloatingRollover(bool value, tRioStatusCode *status) = 0; + virtual void writeSourceSelect_RolloverLimit(signed short value, tRioStatusCode *status) = 0; + virtual tSourceSelect readSourceSelect(tRioStatusCode *status) = 0; + virtual unsigned char readSourceSelect_Channel(tRioStatusCode *status) = 0; + virtual bool readSourceSelect_Averaged(tRioStatusCode *status) = 0; + virtual bool readSourceSelect_Filter(tRioStatusCode *status) = 0; + virtual bool readSourceSelect_FloatingRollover(tRioStatusCode *status) = 0; + virtual signed short readSourceSelect_RolloverLimit(tRioStatusCode *status) = 0; + + + typedef enum + { + } tUpperLimit_IfaceConstants; + + virtual void writeUpperLimit(signed int value, tRioStatusCode *status) = 0; + virtual signed int readUpperLimit(tRioStatusCode *status) = 0; + + + typedef enum + { + } tLowerLimit_IfaceConstants; + + virtual void writeLowerLimit(signed int value, tRioStatusCode *status) = 0; + virtual signed int readLowerLimit(tRioStatusCode *status) = 0; + + + + typedef enum + { + kNumOutputElements = 8, + } tOutput_IfaceConstants; + + virtual tOutput readOutput(unsigned char bitfield_index, tRioStatusCode *status) = 0; + virtual bool readOutput_InHysteresis(unsigned char bitfield_index, tRioStatusCode *status) = 0; + virtual bool readOutput_OverLimit(unsigned char bitfield_index, tRioStatusCode *status) = 0; + virtual bool readOutput_Rising(unsigned char bitfield_index, tRioStatusCode *status) = 0; + virtual bool readOutput_Falling(unsigned char bitfield_index, tRioStatusCode *status) = 0; + + + + +private: + tAnalogTrigger(const tAnalogTrigger&); + void operator=(const tAnalogTrigger&); +}; + +} +} + +#endif // __nFRC_2015_1_0_5_AnalogTrigger_h__ diff --git a/hal/lib/Athena/ChipObject/tBIST.h b/hal/lib/Athena/ChipObject/tBIST.h index 45efb780dc..6eff7bcfe2 100644 --- a/hal/lib/Athena/ChipObject/tBIST.h +++ b/hal/lib/Athena/ChipObject/tBIST.h @@ -1,90 +1,90 @@ -// Copyright (c) National Instruments 2008. All Rights Reserved. -// Do Not Edit... this file is generated! - -#ifndef __nFRC_2015_1_0_4_BIST_h__ -#define __nFRC_2015_1_0_4_BIST_h__ - -#include "tSystemInterface.h" - -namespace nFPGA -{ -namespace nFRC_2015_1_0_4 -{ - -class tBIST -{ -public: - tBIST(){} - virtual ~tBIST(){} - - virtual tSystemInterface* getSystemInterface() = 0; - static tBIST* create(tRioStatusCode *status); - - typedef enum - { - kNumSystems = 1, - } tIfaceConstants; - - - - - typedef enum - { - } tDO0SquareTicks_IfaceConstants; - - virtual void writeDO0SquareTicks(unsigned int value, tRioStatusCode *status) = 0; - virtual unsigned int readDO0SquareTicks(tRioStatusCode *status) = 0; - - - typedef enum - { - } tEnable_IfaceConstants; - - virtual void writeEnable(bool value, tRioStatusCode *status) = 0; - virtual bool readEnable(tRioStatusCode *status) = 0; - - - typedef enum - { - } tDO1SquareEnable_IfaceConstants; - - virtual void writeDO1SquareEnable(bool value, tRioStatusCode *status) = 0; - virtual bool readDO1SquareEnable(tRioStatusCode *status) = 0; - - - typedef enum - { - } tDO0SquareEnable_IfaceConstants; - - virtual void writeDO0SquareEnable(bool value, tRioStatusCode *status) = 0; - virtual bool readDO0SquareEnable(tRioStatusCode *status) = 0; - - - typedef enum - { - } tDO1SquareTicks_IfaceConstants; - - virtual void writeDO1SquareTicks(unsigned int value, tRioStatusCode *status) = 0; - virtual unsigned int readDO1SquareTicks(tRioStatusCode *status) = 0; - - - - - typedef enum - { - kNumDORegisters = 2, - } tDO_IfaceConstants; - - virtual void writeDO(unsigned char reg_index, bool value, tRioStatusCode *status) = 0; - virtual bool readDO(unsigned char reg_index, tRioStatusCode *status) = 0; - - -private: - tBIST(const tBIST&); - void operator=(const tBIST&); -}; - -} -} - -#endif // __nFRC_2015_1_0_4_BIST_h__ +// Copyright (c) National Instruments 2008. All Rights Reserved. +// Do Not Edit... this file is generated! + +#ifndef __nFRC_2015_1_0_5_BIST_h__ +#define __nFRC_2015_1_0_5_BIST_h__ + +#include "tSystemInterface.h" + +namespace nFPGA +{ +namespace nFRC_2015_1_0_5 +{ + +class tBIST +{ +public: + tBIST(){} + virtual ~tBIST(){} + + virtual tSystemInterface* getSystemInterface() = 0; + static tBIST* create(tRioStatusCode *status); + + typedef enum + { + kNumSystems = 1, + } tIfaceConstants; + + + + + typedef enum + { + } tDO0SquareTicks_IfaceConstants; + + virtual void writeDO0SquareTicks(unsigned int value, tRioStatusCode *status) = 0; + virtual unsigned int readDO0SquareTicks(tRioStatusCode *status) = 0; + + + typedef enum + { + } tEnable_IfaceConstants; + + virtual void writeEnable(bool value, tRioStatusCode *status) = 0; + virtual bool readEnable(tRioStatusCode *status) = 0; + + + typedef enum + { + } tDO1SquareEnable_IfaceConstants; + + virtual void writeDO1SquareEnable(bool value, tRioStatusCode *status) = 0; + virtual bool readDO1SquareEnable(tRioStatusCode *status) = 0; + + + typedef enum + { + } tDO0SquareEnable_IfaceConstants; + + virtual void writeDO0SquareEnable(bool value, tRioStatusCode *status) = 0; + virtual bool readDO0SquareEnable(tRioStatusCode *status) = 0; + + + typedef enum + { + } tDO1SquareTicks_IfaceConstants; + + virtual void writeDO1SquareTicks(unsigned int value, tRioStatusCode *status) = 0; + virtual unsigned int readDO1SquareTicks(tRioStatusCode *status) = 0; + + + + + typedef enum + { + kNumDORegisters = 2, + } tDO_IfaceConstants; + + virtual void writeDO(unsigned char reg_index, bool value, tRioStatusCode *status) = 0; + virtual bool readDO(unsigned char reg_index, tRioStatusCode *status) = 0; + + +private: + tBIST(const tBIST&); + void operator=(const tBIST&); +}; + +} +} + +#endif // __nFRC_2015_1_0_5_BIST_h__ diff --git a/hal/lib/Athena/ChipObject/tCounter.h b/hal/lib/Athena/ChipObject/tCounter.h index 6192f500f1..72d1f97389 100644 --- a/hal/lib/Athena/ChipObject/tCounter.h +++ b/hal/lib/Athena/ChipObject/tCounter.h @@ -1,219 +1,219 @@ -// Copyright (c) National Instruments 2008. All Rights Reserved. -// Do Not Edit... this file is generated! - -#ifndef __nFRC_2015_1_0_4_Counter_h__ -#define __nFRC_2015_1_0_4_Counter_h__ - -#include "tSystemInterface.h" - -namespace nFPGA -{ -namespace nFRC_2015_1_0_4 -{ - -class tCounter -{ -public: - tCounter(){} - virtual ~tCounter(){} - - virtual tSystemInterface* getSystemInterface() = 0; - static tCounter* create(unsigned char sys_index, tRioStatusCode *status); - virtual unsigned char getSystemIndex() = 0; - - - typedef enum - { - kNumSystems = 8, - } tIfaceConstants; - - typedef - union{ - struct{ -#ifdef __vxworks - unsigned Direction : 1; - signed Value : 31; -#else - signed Value : 31; - unsigned Direction : 1; -#endif - }; - struct{ - unsigned value : 32; - }; - } tOutput; - typedef - union{ - struct{ -#ifdef __vxworks - unsigned UpSource_Channel : 4; - unsigned UpSource_Module : 1; - unsigned UpSource_AnalogTrigger : 1; - unsigned DownSource_Channel : 4; - unsigned DownSource_Module : 1; - unsigned DownSource_AnalogTrigger : 1; - unsigned IndexSource_Channel : 4; - unsigned IndexSource_Module : 1; - unsigned IndexSource_AnalogTrigger : 1; - unsigned IndexActiveHigh : 1; - unsigned UpRisingEdge : 1; - unsigned UpFallingEdge : 1; - unsigned DownRisingEdge : 1; - unsigned DownFallingEdge : 1; - unsigned Mode : 2; - unsigned PulseLengthThreshold : 6; - unsigned Enable : 1; -#else - unsigned Enable : 1; - unsigned PulseLengthThreshold : 6; - unsigned Mode : 2; - unsigned DownFallingEdge : 1; - unsigned DownRisingEdge : 1; - unsigned UpFallingEdge : 1; - unsigned UpRisingEdge : 1; - unsigned IndexActiveHigh : 1; - unsigned IndexSource_AnalogTrigger : 1; - unsigned IndexSource_Module : 1; - unsigned IndexSource_Channel : 4; - unsigned DownSource_AnalogTrigger : 1; - unsigned DownSource_Module : 1; - unsigned DownSource_Channel : 4; - unsigned UpSource_AnalogTrigger : 1; - unsigned UpSource_Module : 1; - unsigned UpSource_Channel : 4; -#endif - }; - struct{ - unsigned value : 32; - }; - } tConfig; - typedef - union{ - struct{ -#ifdef __vxworks - unsigned Period : 23; - signed Count : 8; - unsigned Stalled : 1; -#else - unsigned Stalled : 1; - signed Count : 8; - unsigned Period : 23; -#endif - }; - struct{ - unsigned value : 32; - }; - } tTimerOutput; - typedef - union{ - struct{ -#ifdef __vxworks - unsigned StallPeriod : 24; - unsigned AverageSize : 7; - unsigned UpdateWhenEmpty : 1; -#else - unsigned UpdateWhenEmpty : 1; - unsigned AverageSize : 7; - unsigned StallPeriod : 24; -#endif - }; - struct{ - unsigned value : 32; - }; - } tTimerConfig; - - - typedef enum - { - } tOutput_IfaceConstants; - - virtual tOutput readOutput(tRioStatusCode *status) = 0; - virtual bool readOutput_Direction(tRioStatusCode *status) = 0; - virtual signed int readOutput_Value(tRioStatusCode *status) = 0; - - - typedef enum - { - } tConfig_IfaceConstants; - - virtual void writeConfig(tConfig value, tRioStatusCode *status) = 0; - virtual void writeConfig_UpSource_Channel(unsigned char value, tRioStatusCode *status) = 0; - virtual void writeConfig_UpSource_Module(unsigned char value, tRioStatusCode *status) = 0; - virtual void writeConfig_UpSource_AnalogTrigger(bool value, tRioStatusCode *status) = 0; - virtual void writeConfig_DownSource_Channel(unsigned char value, tRioStatusCode *status) = 0; - virtual void writeConfig_DownSource_Module(unsigned char value, tRioStatusCode *status) = 0; - virtual void writeConfig_DownSource_AnalogTrigger(bool value, tRioStatusCode *status) = 0; - virtual void writeConfig_IndexSource_Channel(unsigned char value, tRioStatusCode *status) = 0; - virtual void writeConfig_IndexSource_Module(unsigned char value, tRioStatusCode *status) = 0; - virtual void writeConfig_IndexSource_AnalogTrigger(bool value, tRioStatusCode *status) = 0; - virtual void writeConfig_IndexActiveHigh(bool value, tRioStatusCode *status) = 0; - virtual void writeConfig_UpRisingEdge(bool value, tRioStatusCode *status) = 0; - virtual void writeConfig_UpFallingEdge(bool value, tRioStatusCode *status) = 0; - virtual void writeConfig_DownRisingEdge(bool value, tRioStatusCode *status) = 0; - virtual void writeConfig_DownFallingEdge(bool value, tRioStatusCode *status) = 0; - virtual void writeConfig_Mode(unsigned char value, tRioStatusCode *status) = 0; - virtual void writeConfig_PulseLengthThreshold(unsigned short value, tRioStatusCode *status) = 0; - virtual void writeConfig_Enable(bool value, tRioStatusCode *status) = 0; - virtual tConfig readConfig(tRioStatusCode *status) = 0; - virtual unsigned char readConfig_UpSource_Channel(tRioStatusCode *status) = 0; - virtual unsigned char readConfig_UpSource_Module(tRioStatusCode *status) = 0; - virtual bool readConfig_UpSource_AnalogTrigger(tRioStatusCode *status) = 0; - virtual unsigned char readConfig_DownSource_Channel(tRioStatusCode *status) = 0; - virtual unsigned char readConfig_DownSource_Module(tRioStatusCode *status) = 0; - virtual bool readConfig_DownSource_AnalogTrigger(tRioStatusCode *status) = 0; - virtual unsigned char readConfig_IndexSource_Channel(tRioStatusCode *status) = 0; - virtual unsigned char readConfig_IndexSource_Module(tRioStatusCode *status) = 0; - virtual bool readConfig_IndexSource_AnalogTrigger(tRioStatusCode *status) = 0; - virtual bool readConfig_IndexActiveHigh(tRioStatusCode *status) = 0; - virtual bool readConfig_UpRisingEdge(tRioStatusCode *status) = 0; - virtual bool readConfig_UpFallingEdge(tRioStatusCode *status) = 0; - virtual bool readConfig_DownRisingEdge(tRioStatusCode *status) = 0; - virtual bool readConfig_DownFallingEdge(tRioStatusCode *status) = 0; - virtual unsigned char readConfig_Mode(tRioStatusCode *status) = 0; - virtual unsigned short readConfig_PulseLengthThreshold(tRioStatusCode *status) = 0; - virtual bool readConfig_Enable(tRioStatusCode *status) = 0; - - - typedef enum - { - } tTimerOutput_IfaceConstants; - - virtual tTimerOutput readTimerOutput(tRioStatusCode *status) = 0; - virtual unsigned int readTimerOutput_Period(tRioStatusCode *status) = 0; - virtual signed char readTimerOutput_Count(tRioStatusCode *status) = 0; - virtual bool readTimerOutput_Stalled(tRioStatusCode *status) = 0; - - - typedef enum - { - } tReset_IfaceConstants; - - virtual void strobeReset(tRioStatusCode *status) = 0; - - - typedef enum - { - } tTimerConfig_IfaceConstants; - - virtual void writeTimerConfig(tTimerConfig value, tRioStatusCode *status) = 0; - virtual void writeTimerConfig_StallPeriod(unsigned int value, tRioStatusCode *status) = 0; - virtual void writeTimerConfig_AverageSize(unsigned char value, tRioStatusCode *status) = 0; - virtual void writeTimerConfig_UpdateWhenEmpty(bool value, tRioStatusCode *status) = 0; - virtual tTimerConfig readTimerConfig(tRioStatusCode *status) = 0; - virtual unsigned int readTimerConfig_StallPeriod(tRioStatusCode *status) = 0; - virtual unsigned char readTimerConfig_AverageSize(tRioStatusCode *status) = 0; - virtual bool readTimerConfig_UpdateWhenEmpty(tRioStatusCode *status) = 0; - - - - - -private: - tCounter(const tCounter&); - void operator=(const tCounter&); -}; - -} -} - -#endif // __nFRC_2015_1_0_4_Counter_h__ +// Copyright (c) National Instruments 2008. All Rights Reserved. +// Do Not Edit... this file is generated! + +#ifndef __nFRC_2015_1_0_5_Counter_h__ +#define __nFRC_2015_1_0_5_Counter_h__ + +#include "tSystemInterface.h" + +namespace nFPGA +{ +namespace nFRC_2015_1_0_5 +{ + +class tCounter +{ +public: + tCounter(){} + virtual ~tCounter(){} + + virtual tSystemInterface* getSystemInterface() = 0; + static tCounter* create(unsigned char sys_index, tRioStatusCode *status); + virtual unsigned char getSystemIndex() = 0; + + + typedef enum + { + kNumSystems = 8, + } tIfaceConstants; + + typedef + union{ + struct{ +#ifdef __vxworks + unsigned Direction : 1; + signed Value : 31; +#else + signed Value : 31; + unsigned Direction : 1; +#endif + }; + struct{ + unsigned value : 32; + }; + } tOutput; + typedef + union{ + struct{ +#ifdef __vxworks + unsigned UpSource_Channel : 4; + unsigned UpSource_Module : 1; + unsigned UpSource_AnalogTrigger : 1; + unsigned DownSource_Channel : 4; + unsigned DownSource_Module : 1; + unsigned DownSource_AnalogTrigger : 1; + unsigned IndexSource_Channel : 4; + unsigned IndexSource_Module : 1; + unsigned IndexSource_AnalogTrigger : 1; + unsigned IndexActiveHigh : 1; + unsigned UpRisingEdge : 1; + unsigned UpFallingEdge : 1; + unsigned DownRisingEdge : 1; + unsigned DownFallingEdge : 1; + unsigned Mode : 2; + unsigned PulseLengthThreshold : 6; + unsigned Enable : 1; +#else + unsigned Enable : 1; + unsigned PulseLengthThreshold : 6; + unsigned Mode : 2; + unsigned DownFallingEdge : 1; + unsigned DownRisingEdge : 1; + unsigned UpFallingEdge : 1; + unsigned UpRisingEdge : 1; + unsigned IndexActiveHigh : 1; + unsigned IndexSource_AnalogTrigger : 1; + unsigned IndexSource_Module : 1; + unsigned IndexSource_Channel : 4; + unsigned DownSource_AnalogTrigger : 1; + unsigned DownSource_Module : 1; + unsigned DownSource_Channel : 4; + unsigned UpSource_AnalogTrigger : 1; + unsigned UpSource_Module : 1; + unsigned UpSource_Channel : 4; +#endif + }; + struct{ + unsigned value : 32; + }; + } tConfig; + typedef + union{ + struct{ +#ifdef __vxworks + unsigned Period : 23; + signed Count : 8; + unsigned Stalled : 1; +#else + unsigned Stalled : 1; + signed Count : 8; + unsigned Period : 23; +#endif + }; + struct{ + unsigned value : 32; + }; + } tTimerOutput; + typedef + union{ + struct{ +#ifdef __vxworks + unsigned StallPeriod : 24; + unsigned AverageSize : 7; + unsigned UpdateWhenEmpty : 1; +#else + unsigned UpdateWhenEmpty : 1; + unsigned AverageSize : 7; + unsigned StallPeriod : 24; +#endif + }; + struct{ + unsigned value : 32; + }; + } tTimerConfig; + + + typedef enum + { + } tOutput_IfaceConstants; + + virtual tOutput readOutput(tRioStatusCode *status) = 0; + virtual bool readOutput_Direction(tRioStatusCode *status) = 0; + virtual signed int readOutput_Value(tRioStatusCode *status) = 0; + + + typedef enum + { + } tConfig_IfaceConstants; + + virtual void writeConfig(tConfig value, tRioStatusCode *status) = 0; + virtual void writeConfig_UpSource_Channel(unsigned char value, tRioStatusCode *status) = 0; + virtual void writeConfig_UpSource_Module(unsigned char value, tRioStatusCode *status) = 0; + virtual void writeConfig_UpSource_AnalogTrigger(bool value, tRioStatusCode *status) = 0; + virtual void writeConfig_DownSource_Channel(unsigned char value, tRioStatusCode *status) = 0; + virtual void writeConfig_DownSource_Module(unsigned char value, tRioStatusCode *status) = 0; + virtual void writeConfig_DownSource_AnalogTrigger(bool value, tRioStatusCode *status) = 0; + virtual void writeConfig_IndexSource_Channel(unsigned char value, tRioStatusCode *status) = 0; + virtual void writeConfig_IndexSource_Module(unsigned char value, tRioStatusCode *status) = 0; + virtual void writeConfig_IndexSource_AnalogTrigger(bool value, tRioStatusCode *status) = 0; + virtual void writeConfig_IndexActiveHigh(bool value, tRioStatusCode *status) = 0; + virtual void writeConfig_UpRisingEdge(bool value, tRioStatusCode *status) = 0; + virtual void writeConfig_UpFallingEdge(bool value, tRioStatusCode *status) = 0; + virtual void writeConfig_DownRisingEdge(bool value, tRioStatusCode *status) = 0; + virtual void writeConfig_DownFallingEdge(bool value, tRioStatusCode *status) = 0; + virtual void writeConfig_Mode(unsigned char value, tRioStatusCode *status) = 0; + virtual void writeConfig_PulseLengthThreshold(unsigned short value, tRioStatusCode *status) = 0; + virtual void writeConfig_Enable(bool value, tRioStatusCode *status) = 0; + virtual tConfig readConfig(tRioStatusCode *status) = 0; + virtual unsigned char readConfig_UpSource_Channel(tRioStatusCode *status) = 0; + virtual unsigned char readConfig_UpSource_Module(tRioStatusCode *status) = 0; + virtual bool readConfig_UpSource_AnalogTrigger(tRioStatusCode *status) = 0; + virtual unsigned char readConfig_DownSource_Channel(tRioStatusCode *status) = 0; + virtual unsigned char readConfig_DownSource_Module(tRioStatusCode *status) = 0; + virtual bool readConfig_DownSource_AnalogTrigger(tRioStatusCode *status) = 0; + virtual unsigned char readConfig_IndexSource_Channel(tRioStatusCode *status) = 0; + virtual unsigned char readConfig_IndexSource_Module(tRioStatusCode *status) = 0; + virtual bool readConfig_IndexSource_AnalogTrigger(tRioStatusCode *status) = 0; + virtual bool readConfig_IndexActiveHigh(tRioStatusCode *status) = 0; + virtual bool readConfig_UpRisingEdge(tRioStatusCode *status) = 0; + virtual bool readConfig_UpFallingEdge(tRioStatusCode *status) = 0; + virtual bool readConfig_DownRisingEdge(tRioStatusCode *status) = 0; + virtual bool readConfig_DownFallingEdge(tRioStatusCode *status) = 0; + virtual unsigned char readConfig_Mode(tRioStatusCode *status) = 0; + virtual unsigned short readConfig_PulseLengthThreshold(tRioStatusCode *status) = 0; + virtual bool readConfig_Enable(tRioStatusCode *status) = 0; + + + typedef enum + { + } tTimerOutput_IfaceConstants; + + virtual tTimerOutput readTimerOutput(tRioStatusCode *status) = 0; + virtual unsigned int readTimerOutput_Period(tRioStatusCode *status) = 0; + virtual signed char readTimerOutput_Count(tRioStatusCode *status) = 0; + virtual bool readTimerOutput_Stalled(tRioStatusCode *status) = 0; + + + typedef enum + { + } tReset_IfaceConstants; + + virtual void strobeReset(tRioStatusCode *status) = 0; + + + typedef enum + { + } tTimerConfig_IfaceConstants; + + virtual void writeTimerConfig(tTimerConfig value, tRioStatusCode *status) = 0; + virtual void writeTimerConfig_StallPeriod(unsigned int value, tRioStatusCode *status) = 0; + virtual void writeTimerConfig_AverageSize(unsigned char value, tRioStatusCode *status) = 0; + virtual void writeTimerConfig_UpdateWhenEmpty(bool value, tRioStatusCode *status) = 0; + virtual tTimerConfig readTimerConfig(tRioStatusCode *status) = 0; + virtual unsigned int readTimerConfig_StallPeriod(tRioStatusCode *status) = 0; + virtual unsigned char readTimerConfig_AverageSize(tRioStatusCode *status) = 0; + virtual bool readTimerConfig_UpdateWhenEmpty(tRioStatusCode *status) = 0; + + + + + +private: + tCounter(const tCounter&); + void operator=(const tCounter&); +}; + +} +} + +#endif // __nFRC_2015_1_0_5_Counter_h__ diff --git a/hal/lib/Athena/ChipObject/tDIO.h b/hal/lib/Athena/ChipObject/tDIO.h index 8ba2210cbb..7d85376de2 100644 --- a/hal/lib/Athena/ChipObject/tDIO.h +++ b/hal/lib/Athena/ChipObject/tDIO.h @@ -1,248 +1,248 @@ -// Copyright (c) National Instruments 2008. All Rights Reserved. -// Do Not Edit... this file is generated! - -#ifndef __nFRC_2015_1_0_4_DIO_h__ -#define __nFRC_2015_1_0_4_DIO_h__ - -#include "tSystemInterface.h" - -namespace nFPGA -{ -namespace nFRC_2015_1_0_4 -{ - -class tDIO -{ -public: - tDIO(){} - virtual ~tDIO(){} - - virtual tSystemInterface* getSystemInterface() = 0; - static tDIO* create(tRioStatusCode *status); - - typedef enum - { - kNumSystems = 1, - } tIfaceConstants; - - typedef - union{ - struct{ -#ifdef __vxworks - unsigned Headers : 10; - unsigned Reserved : 6; - unsigned MXP : 16; -#else - unsigned MXP : 16; - unsigned Reserved : 6; - unsigned Headers : 10; -#endif - }; - struct{ - unsigned value : 32; - }; - } tDO; - typedef - union{ - struct{ -#ifdef __vxworks - unsigned Headers : 10; - unsigned Reserved : 6; - unsigned MXP : 16; -#else - unsigned MXP : 16; - unsigned Reserved : 6; - unsigned Headers : 10; -#endif - }; - struct{ - unsigned value : 32; - }; - } tOutputEnable; - typedef - union{ - struct{ -#ifdef __vxworks - unsigned Headers : 10; - unsigned Reserved : 6; - unsigned MXP : 16; -#else - unsigned MXP : 16; - unsigned Reserved : 6; - unsigned Headers : 10; -#endif - }; - struct{ - unsigned value : 32; - }; - } tPulse; - typedef - union{ - struct{ -#ifdef __vxworks - unsigned Headers : 10; - unsigned Reserved : 6; - unsigned MXP : 16; -#else - unsigned MXP : 16; - unsigned Reserved : 6; - unsigned Headers : 10; -#endif - }; - struct{ - unsigned value : 32; - }; - } tDI; - - - - typedef enum - { - } tDO_IfaceConstants; - - virtual void writeDO(tDO value, tRioStatusCode *status) = 0; - virtual void writeDO_Headers(unsigned short value, tRioStatusCode *status) = 0; - virtual void writeDO_Reserved(unsigned char value, tRioStatusCode *status) = 0; - virtual void writeDO_MXP(unsigned short value, tRioStatusCode *status) = 0; - virtual tDO readDO(tRioStatusCode *status) = 0; - virtual unsigned short readDO_Headers(tRioStatusCode *status) = 0; - virtual unsigned char readDO_Reserved(tRioStatusCode *status) = 0; - virtual unsigned short readDO_MXP(tRioStatusCode *status) = 0; - - - typedef enum - { - kNumPWMDutyCycleAElements = 4, - } tPWMDutyCycleA_IfaceConstants; - - virtual void writePWMDutyCycleA(unsigned char bitfield_index, unsigned char value, tRioStatusCode *status) = 0; - virtual unsigned char readPWMDutyCycleA(unsigned char bitfield_index, tRioStatusCode *status) = 0; - - - typedef enum - { - kNumPWMDutyCycleBElements = 2, - } tPWMDutyCycleB_IfaceConstants; - - virtual void writePWMDutyCycleB(unsigned char bitfield_index, unsigned char value, tRioStatusCode *status) = 0; - virtual unsigned char readPWMDutyCycleB(unsigned char bitfield_index, tRioStatusCode *status) = 0; - - - typedef enum - { - kNumFilterSelectHdrElements = 16, - } tFilterSelectHdr_IfaceConstants; - - virtual void writeFilterSelectHdr(unsigned char bitfield_index, unsigned char value, tRioStatusCode *status) = 0; - virtual unsigned char readFilterSelectHdr(unsigned char bitfield_index, tRioStatusCode *status) = 0; - - - typedef enum - { - kNumFilterPeriodMXPElements = 3, - } tFilterPeriodMXP_IfaceConstants; - - virtual void writeFilterPeriodMXP(unsigned char bitfield_index, unsigned char value, tRioStatusCode *status) = 0; - virtual unsigned char readFilterPeriodMXP(unsigned char bitfield_index, tRioStatusCode *status) = 0; - - - typedef enum - { - } tOutputEnable_IfaceConstants; - - virtual void writeOutputEnable(tOutputEnable value, tRioStatusCode *status) = 0; - virtual void writeOutputEnable_Headers(unsigned short value, tRioStatusCode *status) = 0; - virtual void writeOutputEnable_Reserved(unsigned char value, tRioStatusCode *status) = 0; - virtual void writeOutputEnable_MXP(unsigned short value, tRioStatusCode *status) = 0; - virtual tOutputEnable readOutputEnable(tRioStatusCode *status) = 0; - virtual unsigned short readOutputEnable_Headers(tRioStatusCode *status) = 0; - virtual unsigned char readOutputEnable_Reserved(tRioStatusCode *status) = 0; - virtual unsigned short readOutputEnable_MXP(tRioStatusCode *status) = 0; - - - typedef enum - { - kNumPWMOutputSelectElements = 6, - } tPWMOutputSelect_IfaceConstants; - - virtual void writePWMOutputSelect(unsigned char bitfield_index, unsigned char value, tRioStatusCode *status) = 0; - virtual unsigned char readPWMOutputSelect(unsigned char bitfield_index, tRioStatusCode *status) = 0; - - - typedef enum - { - } tPulse_IfaceConstants; - - virtual void writePulse(tPulse value, tRioStatusCode *status) = 0; - virtual void writePulse_Headers(unsigned short value, tRioStatusCode *status) = 0; - virtual void writePulse_Reserved(unsigned char value, tRioStatusCode *status) = 0; - virtual void writePulse_MXP(unsigned short value, tRioStatusCode *status) = 0; - virtual tPulse readPulse(tRioStatusCode *status) = 0; - virtual unsigned short readPulse_Headers(tRioStatusCode *status) = 0; - virtual unsigned char readPulse_Reserved(tRioStatusCode *status) = 0; - virtual unsigned short readPulse_MXP(tRioStatusCode *status) = 0; - - - typedef enum - { - } tDI_IfaceConstants; - - virtual tDI readDI(tRioStatusCode *status) = 0; - virtual unsigned short readDI_Headers(tRioStatusCode *status) = 0; - virtual unsigned char readDI_Reserved(tRioStatusCode *status) = 0; - virtual unsigned short readDI_MXP(tRioStatusCode *status) = 0; - - - typedef enum - { - } tEnableMXPSpecialFunction_IfaceConstants; - - virtual void writeEnableMXPSpecialFunction(unsigned short value, tRioStatusCode *status) = 0; - virtual unsigned short readEnableMXPSpecialFunction(tRioStatusCode *status) = 0; - - - typedef enum - { - kNumFilterSelectMXPElements = 16, - } tFilterSelectMXP_IfaceConstants; - - virtual void writeFilterSelectMXP(unsigned char bitfield_index, unsigned char value, tRioStatusCode *status) = 0; - virtual unsigned char readFilterSelectMXP(unsigned char bitfield_index, tRioStatusCode *status) = 0; - - - typedef enum - { - } tPulseLength_IfaceConstants; - - virtual void writePulseLength(unsigned char value, tRioStatusCode *status) = 0; - virtual unsigned char readPulseLength(tRioStatusCode *status) = 0; - - - typedef enum - { - kNumFilterPeriodHdrElements = 3, - } tFilterPeriodHdr_IfaceConstants; - - virtual void writeFilterPeriodHdr(unsigned char bitfield_index, unsigned char value, tRioStatusCode *status) = 0; - virtual unsigned char readFilterPeriodHdr(unsigned char bitfield_index, tRioStatusCode *status) = 0; - - - typedef enum - { - } tPWMPeriodPower_IfaceConstants; - - virtual void writePWMPeriodPower(unsigned short value, tRioStatusCode *status) = 0; - virtual unsigned short readPWMPeriodPower(tRioStatusCode *status) = 0; - - - - -private: - tDIO(const tDIO&); - void operator=(const tDIO&); -}; - -} -} - -#endif // __nFRC_2015_1_0_4_DIO_h__ +// Copyright (c) National Instruments 2008. All Rights Reserved. +// Do Not Edit... this file is generated! + +#ifndef __nFRC_2015_1_0_5_DIO_h__ +#define __nFRC_2015_1_0_5_DIO_h__ + +#include "tSystemInterface.h" + +namespace nFPGA +{ +namespace nFRC_2015_1_0_5 +{ + +class tDIO +{ +public: + tDIO(){} + virtual ~tDIO(){} + + virtual tSystemInterface* getSystemInterface() = 0; + static tDIO* create(tRioStatusCode *status); + + typedef enum + { + kNumSystems = 1, + } tIfaceConstants; + + typedef + union{ + struct{ +#ifdef __vxworks + unsigned Headers : 10; + unsigned Reserved : 6; + unsigned MXP : 16; +#else + unsigned MXP : 16; + unsigned Reserved : 6; + unsigned Headers : 10; +#endif + }; + struct{ + unsigned value : 32; + }; + } tDO; + typedef + union{ + struct{ +#ifdef __vxworks + unsigned Headers : 10; + unsigned Reserved : 6; + unsigned MXP : 16; +#else + unsigned MXP : 16; + unsigned Reserved : 6; + unsigned Headers : 10; +#endif + }; + struct{ + unsigned value : 32; + }; + } tOutputEnable; + typedef + union{ + struct{ +#ifdef __vxworks + unsigned Headers : 10; + unsigned Reserved : 6; + unsigned MXP : 16; +#else + unsigned MXP : 16; + unsigned Reserved : 6; + unsigned Headers : 10; +#endif + }; + struct{ + unsigned value : 32; + }; + } tPulse; + typedef + union{ + struct{ +#ifdef __vxworks + unsigned Headers : 10; + unsigned Reserved : 6; + unsigned MXP : 16; +#else + unsigned MXP : 16; + unsigned Reserved : 6; + unsigned Headers : 10; +#endif + }; + struct{ + unsigned value : 32; + }; + } tDI; + + + + typedef enum + { + } tDO_IfaceConstants; + + virtual void writeDO(tDO value, tRioStatusCode *status) = 0; + virtual void writeDO_Headers(unsigned short value, tRioStatusCode *status) = 0; + virtual void writeDO_Reserved(unsigned char value, tRioStatusCode *status) = 0; + virtual void writeDO_MXP(unsigned short value, tRioStatusCode *status) = 0; + virtual tDO readDO(tRioStatusCode *status) = 0; + virtual unsigned short readDO_Headers(tRioStatusCode *status) = 0; + virtual unsigned char readDO_Reserved(tRioStatusCode *status) = 0; + virtual unsigned short readDO_MXP(tRioStatusCode *status) = 0; + + + typedef enum + { + kNumPWMDutyCycleAElements = 4, + } tPWMDutyCycleA_IfaceConstants; + + virtual void writePWMDutyCycleA(unsigned char bitfield_index, unsigned char value, tRioStatusCode *status) = 0; + virtual unsigned char readPWMDutyCycleA(unsigned char bitfield_index, tRioStatusCode *status) = 0; + + + typedef enum + { + kNumPWMDutyCycleBElements = 2, + } tPWMDutyCycleB_IfaceConstants; + + virtual void writePWMDutyCycleB(unsigned char bitfield_index, unsigned char value, tRioStatusCode *status) = 0; + virtual unsigned char readPWMDutyCycleB(unsigned char bitfield_index, tRioStatusCode *status) = 0; + + + typedef enum + { + kNumFilterSelectHdrElements = 16, + } tFilterSelectHdr_IfaceConstants; + + virtual void writeFilterSelectHdr(unsigned char bitfield_index, unsigned char value, tRioStatusCode *status) = 0; + virtual unsigned char readFilterSelectHdr(unsigned char bitfield_index, tRioStatusCode *status) = 0; + + + typedef enum + { + kNumFilterPeriodMXPElements = 3, + } tFilterPeriodMXP_IfaceConstants; + + virtual void writeFilterPeriodMXP(unsigned char bitfield_index, unsigned char value, tRioStatusCode *status) = 0; + virtual unsigned char readFilterPeriodMXP(unsigned char bitfield_index, tRioStatusCode *status) = 0; + + + typedef enum + { + } tOutputEnable_IfaceConstants; + + virtual void writeOutputEnable(tOutputEnable value, tRioStatusCode *status) = 0; + virtual void writeOutputEnable_Headers(unsigned short value, tRioStatusCode *status) = 0; + virtual void writeOutputEnable_Reserved(unsigned char value, tRioStatusCode *status) = 0; + virtual void writeOutputEnable_MXP(unsigned short value, tRioStatusCode *status) = 0; + virtual tOutputEnable readOutputEnable(tRioStatusCode *status) = 0; + virtual unsigned short readOutputEnable_Headers(tRioStatusCode *status) = 0; + virtual unsigned char readOutputEnable_Reserved(tRioStatusCode *status) = 0; + virtual unsigned short readOutputEnable_MXP(tRioStatusCode *status) = 0; + + + typedef enum + { + kNumPWMOutputSelectElements = 6, + } tPWMOutputSelect_IfaceConstants; + + virtual void writePWMOutputSelect(unsigned char bitfield_index, unsigned char value, tRioStatusCode *status) = 0; + virtual unsigned char readPWMOutputSelect(unsigned char bitfield_index, tRioStatusCode *status) = 0; + + + typedef enum + { + } tPulse_IfaceConstants; + + virtual void writePulse(tPulse value, tRioStatusCode *status) = 0; + virtual void writePulse_Headers(unsigned short value, tRioStatusCode *status) = 0; + virtual void writePulse_Reserved(unsigned char value, tRioStatusCode *status) = 0; + virtual void writePulse_MXP(unsigned short value, tRioStatusCode *status) = 0; + virtual tPulse readPulse(tRioStatusCode *status) = 0; + virtual unsigned short readPulse_Headers(tRioStatusCode *status) = 0; + virtual unsigned char readPulse_Reserved(tRioStatusCode *status) = 0; + virtual unsigned short readPulse_MXP(tRioStatusCode *status) = 0; + + + typedef enum + { + } tDI_IfaceConstants; + + virtual tDI readDI(tRioStatusCode *status) = 0; + virtual unsigned short readDI_Headers(tRioStatusCode *status) = 0; + virtual unsigned char readDI_Reserved(tRioStatusCode *status) = 0; + virtual unsigned short readDI_MXP(tRioStatusCode *status) = 0; + + + typedef enum + { + } tEnableMXPSpecialFunction_IfaceConstants; + + virtual void writeEnableMXPSpecialFunction(unsigned short value, tRioStatusCode *status) = 0; + virtual unsigned short readEnableMXPSpecialFunction(tRioStatusCode *status) = 0; + + + typedef enum + { + kNumFilterSelectMXPElements = 16, + } tFilterSelectMXP_IfaceConstants; + + virtual void writeFilterSelectMXP(unsigned char bitfield_index, unsigned char value, tRioStatusCode *status) = 0; + virtual unsigned char readFilterSelectMXP(unsigned char bitfield_index, tRioStatusCode *status) = 0; + + + typedef enum + { + } tPulseLength_IfaceConstants; + + virtual void writePulseLength(unsigned char value, tRioStatusCode *status) = 0; + virtual unsigned char readPulseLength(tRioStatusCode *status) = 0; + + + typedef enum + { + kNumFilterPeriodHdrElements = 3, + } tFilterPeriodHdr_IfaceConstants; + + virtual void writeFilterPeriodHdr(unsigned char bitfield_index, unsigned char value, tRioStatusCode *status) = 0; + virtual unsigned char readFilterPeriodHdr(unsigned char bitfield_index, tRioStatusCode *status) = 0; + + + typedef enum + { + } tPWMPeriodPower_IfaceConstants; + + virtual void writePWMPeriodPower(unsigned short value, tRioStatusCode *status) = 0; + virtual unsigned short readPWMPeriodPower(tRioStatusCode *status) = 0; + + + + +private: + tDIO(const tDIO&); + void operator=(const tDIO&); +}; + +} +} + +#endif // __nFRC_2015_1_0_5_DIO_h__ diff --git a/hal/lib/Athena/ChipObject/tDMA.h b/hal/lib/Athena/ChipObject/tDMA.h index f99aece645..623c979f7e 100644 --- a/hal/lib/Athena/ChipObject/tDMA.h +++ b/hal/lib/Athena/ChipObject/tDMA.h @@ -1,188 +1,188 @@ -// Copyright (c) National Instruments 2008. All Rights Reserved. -// Do Not Edit... this file is generated! - -#ifndef __nFRC_2015_1_0_4_DMA_h__ -#define __nFRC_2015_1_0_4_DMA_h__ - -#include "tSystemInterface.h" - -namespace nFPGA -{ -namespace nFRC_2015_1_0_4 -{ - -class tDMA -{ -public: - tDMA(){} - virtual ~tDMA(){} - - virtual tSystemInterface* getSystemInterface() = 0; - static tDMA* create(tRioStatusCode *status); - - typedef enum - { - kNumSystems = 1, - } tIfaceConstants; - - typedef - union{ - struct{ -#ifdef __vxworks - unsigned Pause : 1; - unsigned Enable_AI0_Low : 1; - unsigned Enable_AI0_High : 1; - unsigned Enable_AIAveraged0_Low : 1; - unsigned Enable_AIAveraged0_High : 1; - unsigned Enable_AI1_Low : 1; - unsigned Enable_AI1_High : 1; - unsigned Enable_AIAveraged1_Low : 1; - unsigned Enable_AIAveraged1_High : 1; - unsigned Enable_Accumulator0 : 1; - unsigned Enable_Accumulator1 : 1; - unsigned Enable_DI : 1; - unsigned Enable_AnalogTriggers : 1; - unsigned Enable_Counters_Low : 1; - unsigned Enable_Counters_High : 1; - unsigned Enable_CounterTimers_Low : 1; - unsigned Enable_CounterTimers_High : 1; - unsigned Enable_Encoders : 1; - unsigned Enable_EncoderTimers : 1; - unsigned ExternalClock : 1; -#else - unsigned ExternalClock : 1; - unsigned Enable_EncoderTimers : 1; - unsigned Enable_Encoders : 1; - unsigned Enable_CounterTimers_High : 1; - unsigned Enable_CounterTimers_Low : 1; - unsigned Enable_Counters_High : 1; - unsigned Enable_Counters_Low : 1; - unsigned Enable_AnalogTriggers : 1; - unsigned Enable_DI : 1; - unsigned Enable_Accumulator1 : 1; - unsigned Enable_Accumulator0 : 1; - unsigned Enable_AIAveraged1_High : 1; - unsigned Enable_AIAveraged1_Low : 1; - unsigned Enable_AI1_High : 1; - unsigned Enable_AI1_Low : 1; - unsigned Enable_AIAveraged0_High : 1; - unsigned Enable_AIAveraged0_Low : 1; - unsigned Enable_AI0_High : 1; - unsigned Enable_AI0_Low : 1; - unsigned Pause : 1; -#endif - }; - struct{ - unsigned value : 20; - }; - } tConfig; - typedef - union{ - struct{ -#ifdef __vxworks - unsigned ExternalClockSource_Channel : 4; - unsigned ExternalClockSource_Module : 1; - unsigned ExternalClockSource_AnalogTrigger : 1; - unsigned RisingEdge : 1; - unsigned FallingEdge : 1; -#else - unsigned FallingEdge : 1; - unsigned RisingEdge : 1; - unsigned ExternalClockSource_AnalogTrigger : 1; - unsigned ExternalClockSource_Module : 1; - unsigned ExternalClockSource_Channel : 4; -#endif - }; - struct{ - unsigned value : 8; - }; - } tExternalTriggers; - - - - typedef enum - { - } tRate_IfaceConstants; - - virtual void writeRate(unsigned int value, tRioStatusCode *status) = 0; - virtual unsigned int readRate(tRioStatusCode *status) = 0; - - - typedef enum - { - } tConfig_IfaceConstants; - - virtual void writeConfig(tConfig value, tRioStatusCode *status) = 0; - virtual void writeConfig_Pause(bool value, tRioStatusCode *status) = 0; - virtual void writeConfig_Enable_AI0_Low(bool value, tRioStatusCode *status) = 0; - virtual void writeConfig_Enable_AI0_High(bool value, tRioStatusCode *status) = 0; - virtual void writeConfig_Enable_AIAveraged0_Low(bool value, tRioStatusCode *status) = 0; - virtual void writeConfig_Enable_AIAveraged0_High(bool value, tRioStatusCode *status) = 0; - virtual void writeConfig_Enable_AI1_Low(bool value, tRioStatusCode *status) = 0; - virtual void writeConfig_Enable_AI1_High(bool value, tRioStatusCode *status) = 0; - virtual void writeConfig_Enable_AIAveraged1_Low(bool value, tRioStatusCode *status) = 0; - virtual void writeConfig_Enable_AIAveraged1_High(bool value, tRioStatusCode *status) = 0; - virtual void writeConfig_Enable_Accumulator0(bool value, tRioStatusCode *status) = 0; - virtual void writeConfig_Enable_Accumulator1(bool value, tRioStatusCode *status) = 0; - virtual void writeConfig_Enable_DI(bool value, tRioStatusCode *status) = 0; - virtual void writeConfig_Enable_AnalogTriggers(bool value, tRioStatusCode *status) = 0; - virtual void writeConfig_Enable_Counters_Low(bool value, tRioStatusCode *status) = 0; - virtual void writeConfig_Enable_Counters_High(bool value, tRioStatusCode *status) = 0; - virtual void writeConfig_Enable_CounterTimers_Low(bool value, tRioStatusCode *status) = 0; - virtual void writeConfig_Enable_CounterTimers_High(bool value, tRioStatusCode *status) = 0; - virtual void writeConfig_Enable_Encoders(bool value, tRioStatusCode *status) = 0; - virtual void writeConfig_Enable_EncoderTimers(bool value, tRioStatusCode *status) = 0; - virtual void writeConfig_ExternalClock(bool value, tRioStatusCode *status) = 0; - virtual tConfig readConfig(tRioStatusCode *status) = 0; - virtual bool readConfig_Pause(tRioStatusCode *status) = 0; - virtual bool readConfig_Enable_AI0_Low(tRioStatusCode *status) = 0; - virtual bool readConfig_Enable_AI0_High(tRioStatusCode *status) = 0; - virtual bool readConfig_Enable_AIAveraged0_Low(tRioStatusCode *status) = 0; - virtual bool readConfig_Enable_AIAveraged0_High(tRioStatusCode *status) = 0; - virtual bool readConfig_Enable_AI1_Low(tRioStatusCode *status) = 0; - virtual bool readConfig_Enable_AI1_High(tRioStatusCode *status) = 0; - virtual bool readConfig_Enable_AIAveraged1_Low(tRioStatusCode *status) = 0; - virtual bool readConfig_Enable_AIAveraged1_High(tRioStatusCode *status) = 0; - virtual bool readConfig_Enable_Accumulator0(tRioStatusCode *status) = 0; - virtual bool readConfig_Enable_Accumulator1(tRioStatusCode *status) = 0; - virtual bool readConfig_Enable_DI(tRioStatusCode *status) = 0; - virtual bool readConfig_Enable_AnalogTriggers(tRioStatusCode *status) = 0; - virtual bool readConfig_Enable_Counters_Low(tRioStatusCode *status) = 0; - virtual bool readConfig_Enable_Counters_High(tRioStatusCode *status) = 0; - virtual bool readConfig_Enable_CounterTimers_Low(tRioStatusCode *status) = 0; - virtual bool readConfig_Enable_CounterTimers_High(tRioStatusCode *status) = 0; - virtual bool readConfig_Enable_Encoders(tRioStatusCode *status) = 0; - virtual bool readConfig_Enable_EncoderTimers(tRioStatusCode *status) = 0; - virtual bool readConfig_ExternalClock(tRioStatusCode *status) = 0; - - - typedef enum - { - kNumExternalTriggersElements = 4, - } tExternalTriggers_IfaceConstants; - - virtual void writeExternalTriggers(unsigned char bitfield_index, tExternalTriggers value, tRioStatusCode *status) = 0; - virtual void writeExternalTriggers_ExternalClockSource_Channel(unsigned char bitfield_index, unsigned char value, tRioStatusCode *status) = 0; - virtual void writeExternalTriggers_ExternalClockSource_Module(unsigned char bitfield_index, unsigned char value, tRioStatusCode *status) = 0; - virtual void writeExternalTriggers_ExternalClockSource_AnalogTrigger(unsigned char bitfield_index, bool value, tRioStatusCode *status) = 0; - virtual void writeExternalTriggers_RisingEdge(unsigned char bitfield_index, bool value, tRioStatusCode *status) = 0; - virtual void writeExternalTriggers_FallingEdge(unsigned char bitfield_index, bool value, tRioStatusCode *status) = 0; - virtual tExternalTriggers readExternalTriggers(unsigned char bitfield_index, tRioStatusCode *status) = 0; - virtual unsigned char readExternalTriggers_ExternalClockSource_Channel(unsigned char bitfield_index, tRioStatusCode *status) = 0; - virtual unsigned char readExternalTriggers_ExternalClockSource_Module(unsigned char bitfield_index, tRioStatusCode *status) = 0; - virtual bool readExternalTriggers_ExternalClockSource_AnalogTrigger(unsigned char bitfield_index, tRioStatusCode *status) = 0; - virtual bool readExternalTriggers_RisingEdge(unsigned char bitfield_index, tRioStatusCode *status) = 0; - virtual bool readExternalTriggers_FallingEdge(unsigned char bitfield_index, tRioStatusCode *status) = 0; - - - - -private: - tDMA(const tDMA&); - void operator=(const tDMA&); -}; - -} -} - -#endif // __nFRC_2015_1_0_4_DMA_h__ +// Copyright (c) National Instruments 2008. All Rights Reserved. +// Do Not Edit... this file is generated! + +#ifndef __nFRC_2015_1_0_5_DMA_h__ +#define __nFRC_2015_1_0_5_DMA_h__ + +#include "tSystemInterface.h" + +namespace nFPGA +{ +namespace nFRC_2015_1_0_5 +{ + +class tDMA +{ +public: + tDMA(){} + virtual ~tDMA(){} + + virtual tSystemInterface* getSystemInterface() = 0; + static tDMA* create(tRioStatusCode *status); + + typedef enum + { + kNumSystems = 1, + } tIfaceConstants; + + typedef + union{ + struct{ +#ifdef __vxworks + unsigned Pause : 1; + unsigned Enable_AI0_Low : 1; + unsigned Enable_AI0_High : 1; + unsigned Enable_AIAveraged0_Low : 1; + unsigned Enable_AIAveraged0_High : 1; + unsigned Enable_AI1_Low : 1; + unsigned Enable_AI1_High : 1; + unsigned Enable_AIAveraged1_Low : 1; + unsigned Enable_AIAveraged1_High : 1; + unsigned Enable_Accumulator0 : 1; + unsigned Enable_Accumulator1 : 1; + unsigned Enable_DI : 1; + unsigned Enable_AnalogTriggers : 1; + unsigned Enable_Counters_Low : 1; + unsigned Enable_Counters_High : 1; + unsigned Enable_CounterTimers_Low : 1; + unsigned Enable_CounterTimers_High : 1; + unsigned Enable_Encoders : 1; + unsigned Enable_EncoderTimers : 1; + unsigned ExternalClock : 1; +#else + unsigned ExternalClock : 1; + unsigned Enable_EncoderTimers : 1; + unsigned Enable_Encoders : 1; + unsigned Enable_CounterTimers_High : 1; + unsigned Enable_CounterTimers_Low : 1; + unsigned Enable_Counters_High : 1; + unsigned Enable_Counters_Low : 1; + unsigned Enable_AnalogTriggers : 1; + unsigned Enable_DI : 1; + unsigned Enable_Accumulator1 : 1; + unsigned Enable_Accumulator0 : 1; + unsigned Enable_AIAveraged1_High : 1; + unsigned Enable_AIAveraged1_Low : 1; + unsigned Enable_AI1_High : 1; + unsigned Enable_AI1_Low : 1; + unsigned Enable_AIAveraged0_High : 1; + unsigned Enable_AIAveraged0_Low : 1; + unsigned Enable_AI0_High : 1; + unsigned Enable_AI0_Low : 1; + unsigned Pause : 1; +#endif + }; + struct{ + unsigned value : 20; + }; + } tConfig; + typedef + union{ + struct{ +#ifdef __vxworks + unsigned ExternalClockSource_Channel : 4; + unsigned ExternalClockSource_Module : 1; + unsigned ExternalClockSource_AnalogTrigger : 1; + unsigned RisingEdge : 1; + unsigned FallingEdge : 1; +#else + unsigned FallingEdge : 1; + unsigned RisingEdge : 1; + unsigned ExternalClockSource_AnalogTrigger : 1; + unsigned ExternalClockSource_Module : 1; + unsigned ExternalClockSource_Channel : 4; +#endif + }; + struct{ + unsigned value : 8; + }; + } tExternalTriggers; + + + + typedef enum + { + } tRate_IfaceConstants; + + virtual void writeRate(unsigned int value, tRioStatusCode *status) = 0; + virtual unsigned int readRate(tRioStatusCode *status) = 0; + + + typedef enum + { + } tConfig_IfaceConstants; + + virtual void writeConfig(tConfig value, tRioStatusCode *status) = 0; + virtual void writeConfig_Pause(bool value, tRioStatusCode *status) = 0; + virtual void writeConfig_Enable_AI0_Low(bool value, tRioStatusCode *status) = 0; + virtual void writeConfig_Enable_AI0_High(bool value, tRioStatusCode *status) = 0; + virtual void writeConfig_Enable_AIAveraged0_Low(bool value, tRioStatusCode *status) = 0; + virtual void writeConfig_Enable_AIAveraged0_High(bool value, tRioStatusCode *status) = 0; + virtual void writeConfig_Enable_AI1_Low(bool value, tRioStatusCode *status) = 0; + virtual void writeConfig_Enable_AI1_High(bool value, tRioStatusCode *status) = 0; + virtual void writeConfig_Enable_AIAveraged1_Low(bool value, tRioStatusCode *status) = 0; + virtual void writeConfig_Enable_AIAveraged1_High(bool value, tRioStatusCode *status) = 0; + virtual void writeConfig_Enable_Accumulator0(bool value, tRioStatusCode *status) = 0; + virtual void writeConfig_Enable_Accumulator1(bool value, tRioStatusCode *status) = 0; + virtual void writeConfig_Enable_DI(bool value, tRioStatusCode *status) = 0; + virtual void writeConfig_Enable_AnalogTriggers(bool value, tRioStatusCode *status) = 0; + virtual void writeConfig_Enable_Counters_Low(bool value, tRioStatusCode *status) = 0; + virtual void writeConfig_Enable_Counters_High(bool value, tRioStatusCode *status) = 0; + virtual void writeConfig_Enable_CounterTimers_Low(bool value, tRioStatusCode *status) = 0; + virtual void writeConfig_Enable_CounterTimers_High(bool value, tRioStatusCode *status) = 0; + virtual void writeConfig_Enable_Encoders(bool value, tRioStatusCode *status) = 0; + virtual void writeConfig_Enable_EncoderTimers(bool value, tRioStatusCode *status) = 0; + virtual void writeConfig_ExternalClock(bool value, tRioStatusCode *status) = 0; + virtual tConfig readConfig(tRioStatusCode *status) = 0; + virtual bool readConfig_Pause(tRioStatusCode *status) = 0; + virtual bool readConfig_Enable_AI0_Low(tRioStatusCode *status) = 0; + virtual bool readConfig_Enable_AI0_High(tRioStatusCode *status) = 0; + virtual bool readConfig_Enable_AIAveraged0_Low(tRioStatusCode *status) = 0; + virtual bool readConfig_Enable_AIAveraged0_High(tRioStatusCode *status) = 0; + virtual bool readConfig_Enable_AI1_Low(tRioStatusCode *status) = 0; + virtual bool readConfig_Enable_AI1_High(tRioStatusCode *status) = 0; + virtual bool readConfig_Enable_AIAveraged1_Low(tRioStatusCode *status) = 0; + virtual bool readConfig_Enable_AIAveraged1_High(tRioStatusCode *status) = 0; + virtual bool readConfig_Enable_Accumulator0(tRioStatusCode *status) = 0; + virtual bool readConfig_Enable_Accumulator1(tRioStatusCode *status) = 0; + virtual bool readConfig_Enable_DI(tRioStatusCode *status) = 0; + virtual bool readConfig_Enable_AnalogTriggers(tRioStatusCode *status) = 0; + virtual bool readConfig_Enable_Counters_Low(tRioStatusCode *status) = 0; + virtual bool readConfig_Enable_Counters_High(tRioStatusCode *status) = 0; + virtual bool readConfig_Enable_CounterTimers_Low(tRioStatusCode *status) = 0; + virtual bool readConfig_Enable_CounterTimers_High(tRioStatusCode *status) = 0; + virtual bool readConfig_Enable_Encoders(tRioStatusCode *status) = 0; + virtual bool readConfig_Enable_EncoderTimers(tRioStatusCode *status) = 0; + virtual bool readConfig_ExternalClock(tRioStatusCode *status) = 0; + + + typedef enum + { + kNumExternalTriggersElements = 4, + } tExternalTriggers_IfaceConstants; + + virtual void writeExternalTriggers(unsigned char bitfield_index, tExternalTriggers value, tRioStatusCode *status) = 0; + virtual void writeExternalTriggers_ExternalClockSource_Channel(unsigned char bitfield_index, unsigned char value, tRioStatusCode *status) = 0; + virtual void writeExternalTriggers_ExternalClockSource_Module(unsigned char bitfield_index, unsigned char value, tRioStatusCode *status) = 0; + virtual void writeExternalTriggers_ExternalClockSource_AnalogTrigger(unsigned char bitfield_index, bool value, tRioStatusCode *status) = 0; + virtual void writeExternalTriggers_RisingEdge(unsigned char bitfield_index, bool value, tRioStatusCode *status) = 0; + virtual void writeExternalTriggers_FallingEdge(unsigned char bitfield_index, bool value, tRioStatusCode *status) = 0; + virtual tExternalTriggers readExternalTriggers(unsigned char bitfield_index, tRioStatusCode *status) = 0; + virtual unsigned char readExternalTriggers_ExternalClockSource_Channel(unsigned char bitfield_index, tRioStatusCode *status) = 0; + virtual unsigned char readExternalTriggers_ExternalClockSource_Module(unsigned char bitfield_index, tRioStatusCode *status) = 0; + virtual bool readExternalTriggers_ExternalClockSource_AnalogTrigger(unsigned char bitfield_index, tRioStatusCode *status) = 0; + virtual bool readExternalTriggers_RisingEdge(unsigned char bitfield_index, tRioStatusCode *status) = 0; + virtual bool readExternalTriggers_FallingEdge(unsigned char bitfield_index, tRioStatusCode *status) = 0; + + + + +private: + tDMA(const tDMA&); + void operator=(const tDMA&); +}; + +} +} + +#endif // __nFRC_2015_1_0_5_DMA_h__ diff --git a/hal/lib/Athena/ChipObject/tDMAManager.h b/hal/lib/Athena/ChipObject/tDMAManager.h index ce292b1592..1cc7b2fac3 100644 --- a/hal/lib/Athena/ChipObject/tDMAManager.h +++ b/hal/lib/Athena/ChipObject/tDMAManager.h @@ -1,46 +1,46 @@ -// Class for handling DMA transters. -// Copyright (c) National Instruments 2008. All Rights Reserved. - -#ifndef __tDMAManager_h__ -#define __tDMAManager_h__ - -#include "tSystem.h" - -namespace nFPGA -{ -// TODO: Implement DMA Manager -/* -class tDMAManager : public tSystem -{ -public: - tDMAManager(tNIRIO_u32 dmaChannel, tNIRIO_u32 hostBufferSize, tRioStatusCode *status); - ~tDMAManager(); - void start(tRioStatusCode *status); - void stop(tRioStatusCode *status); - bool isStarted() {return _started;} - void read( - tNIRIO_u32* buf, - tNIRIO_u32 num, - tNIRIO_u32 timeout, - tNIRIO_u32* read, - tNIRIO_u32* remaining, - tRioStatusCode *status); - void write( - tNIRIO_u32* buf, - tNIRIO_u32 num, - tNIRIO_u32 timeout, - tNIRIO_u32* remaining, - tRioStatusCode *status); -private: - bool _started; - tNIRIO_u32 _dmaChannel; - tNIRIO_u32 _hostBufferSize; - tDMAChannelDescriptor const *_dmaChannelDescriptor; - -}; -*/ -} - - -#endif // __tDMAManager_h__ - +// Class for handling DMA transters. +// Copyright (c) National Instruments 2008. All Rights Reserved. + +#ifndef __tDMAManager_h__ +#define __tDMAManager_h__ + +#include "tSystem.h" + +namespace nFPGA +{ +// TODO: Implement DMA Manager +/* +class tDMAManager : public tSystem +{ +public: + tDMAManager(tNIRIO_u32 dmaChannel, tNIRIO_u32 hostBufferSize, tRioStatusCode *status); + ~tDMAManager(); + void start(tRioStatusCode *status); + void stop(tRioStatusCode *status); + bool isStarted() {return _started;} + void read( + tNIRIO_u32* buf, + tNIRIO_u32 num, + tNIRIO_u32 timeout, + tNIRIO_u32* read, + tNIRIO_u32* remaining, + tRioStatusCode *status); + void write( + tNIRIO_u32* buf, + tNIRIO_u32 num, + tNIRIO_u32 timeout, + tNIRIO_u32* remaining, + tRioStatusCode *status); +private: + bool _started; + tNIRIO_u32 _dmaChannel; + tNIRIO_u32 _hostBufferSize; + tDMAChannelDescriptor const *_dmaChannelDescriptor; + +}; +*/ +} + + +#endif // __tDMAManager_h__ + diff --git a/hal/lib/Athena/ChipObject/tEncoder.h b/hal/lib/Athena/ChipObject/tEncoder.h index 7abfc1b926..8a0d806c09 100644 --- a/hal/lib/Athena/ChipObject/tEncoder.h +++ b/hal/lib/Athena/ChipObject/tEncoder.h @@ -1,199 +1,199 @@ -// Copyright (c) National Instruments 2008. All Rights Reserved. -// Do Not Edit... this file is generated! - -#ifndef __nFRC_2015_1_0_4_Encoder_h__ -#define __nFRC_2015_1_0_4_Encoder_h__ - -#include "tSystemInterface.h" - -namespace nFPGA -{ -namespace nFRC_2015_1_0_4 -{ - -class tEncoder -{ -public: - tEncoder(){} - virtual ~tEncoder(){} - - virtual tSystemInterface* getSystemInterface() = 0; - static tEncoder* create(unsigned char sys_index, tRioStatusCode *status); - virtual unsigned char getSystemIndex() = 0; - - - typedef enum - { - kNumSystems = 4, - } tIfaceConstants; - - typedef - union{ - struct{ -#ifdef __vxworks - unsigned Direction : 1; - signed Value : 31; -#else - signed Value : 31; - unsigned Direction : 1; -#endif - }; - struct{ - unsigned value : 32; - }; - } tOutput; - typedef - union{ - struct{ -#ifdef __vxworks - unsigned ASource_Channel : 4; - unsigned ASource_Module : 1; - unsigned ASource_AnalogTrigger : 1; - unsigned BSource_Channel : 4; - unsigned BSource_Module : 1; - unsigned BSource_AnalogTrigger : 1; - unsigned IndexSource_Channel : 4; - unsigned IndexSource_Module : 1; - unsigned IndexSource_AnalogTrigger : 1; - unsigned IndexActiveHigh : 1; - unsigned Reverse : 1; - unsigned Enable : 1; -#else - unsigned Enable : 1; - unsigned Reverse : 1; - unsigned IndexActiveHigh : 1; - unsigned IndexSource_AnalogTrigger : 1; - unsigned IndexSource_Module : 1; - unsigned IndexSource_Channel : 4; - unsigned BSource_AnalogTrigger : 1; - unsigned BSource_Module : 1; - unsigned BSource_Channel : 4; - unsigned ASource_AnalogTrigger : 1; - unsigned ASource_Module : 1; - unsigned ASource_Channel : 4; -#endif - }; - struct{ - unsigned value : 21; - }; - } tConfig; - typedef - union{ - struct{ -#ifdef __vxworks - unsigned Period : 23; - signed Count : 8; - unsigned Stalled : 1; -#else - unsigned Stalled : 1; - signed Count : 8; - unsigned Period : 23; -#endif - }; - struct{ - unsigned value : 32; - }; - } tTimerOutput; - typedef - union{ - struct{ -#ifdef __vxworks - unsigned StallPeriod : 24; - unsigned AverageSize : 7; - unsigned UpdateWhenEmpty : 1; -#else - unsigned UpdateWhenEmpty : 1; - unsigned AverageSize : 7; - unsigned StallPeriod : 24; -#endif - }; - struct{ - unsigned value : 32; - }; - } tTimerConfig; - - - typedef enum - { - } tOutput_IfaceConstants; - - virtual tOutput readOutput(tRioStatusCode *status) = 0; - virtual bool readOutput_Direction(tRioStatusCode *status) = 0; - virtual signed int readOutput_Value(tRioStatusCode *status) = 0; - - - typedef enum - { - } tConfig_IfaceConstants; - - virtual void writeConfig(tConfig value, tRioStatusCode *status) = 0; - virtual void writeConfig_ASource_Channel(unsigned char value, tRioStatusCode *status) = 0; - virtual void writeConfig_ASource_Module(unsigned char value, tRioStatusCode *status) = 0; - virtual void writeConfig_ASource_AnalogTrigger(bool value, tRioStatusCode *status) = 0; - virtual void writeConfig_BSource_Channel(unsigned char value, tRioStatusCode *status) = 0; - virtual void writeConfig_BSource_Module(unsigned char value, tRioStatusCode *status) = 0; - virtual void writeConfig_BSource_AnalogTrigger(bool value, tRioStatusCode *status) = 0; - virtual void writeConfig_IndexSource_Channel(unsigned char value, tRioStatusCode *status) = 0; - virtual void writeConfig_IndexSource_Module(unsigned char value, tRioStatusCode *status) = 0; - virtual void writeConfig_IndexSource_AnalogTrigger(bool value, tRioStatusCode *status) = 0; - virtual void writeConfig_IndexActiveHigh(bool value, tRioStatusCode *status) = 0; - virtual void writeConfig_Reverse(bool value, tRioStatusCode *status) = 0; - virtual void writeConfig_Enable(bool value, tRioStatusCode *status) = 0; - virtual tConfig readConfig(tRioStatusCode *status) = 0; - virtual unsigned char readConfig_ASource_Channel(tRioStatusCode *status) = 0; - virtual unsigned char readConfig_ASource_Module(tRioStatusCode *status) = 0; - virtual bool readConfig_ASource_AnalogTrigger(tRioStatusCode *status) = 0; - virtual unsigned char readConfig_BSource_Channel(tRioStatusCode *status) = 0; - virtual unsigned char readConfig_BSource_Module(tRioStatusCode *status) = 0; - virtual bool readConfig_BSource_AnalogTrigger(tRioStatusCode *status) = 0; - virtual unsigned char readConfig_IndexSource_Channel(tRioStatusCode *status) = 0; - virtual unsigned char readConfig_IndexSource_Module(tRioStatusCode *status) = 0; - virtual bool readConfig_IndexSource_AnalogTrigger(tRioStatusCode *status) = 0; - virtual bool readConfig_IndexActiveHigh(tRioStatusCode *status) = 0; - virtual bool readConfig_Reverse(tRioStatusCode *status) = 0; - virtual bool readConfig_Enable(tRioStatusCode *status) = 0; - - - typedef enum - { - } tTimerOutput_IfaceConstants; - - virtual tTimerOutput readTimerOutput(tRioStatusCode *status) = 0; - virtual unsigned int readTimerOutput_Period(tRioStatusCode *status) = 0; - virtual signed char readTimerOutput_Count(tRioStatusCode *status) = 0; - virtual bool readTimerOutput_Stalled(tRioStatusCode *status) = 0; - - - typedef enum - { - } tReset_IfaceConstants; - - virtual void strobeReset(tRioStatusCode *status) = 0; - - - typedef enum - { - } tTimerConfig_IfaceConstants; - - virtual void writeTimerConfig(tTimerConfig value, tRioStatusCode *status) = 0; - virtual void writeTimerConfig_StallPeriod(unsigned int value, tRioStatusCode *status) = 0; - virtual void writeTimerConfig_AverageSize(unsigned char value, tRioStatusCode *status) = 0; - virtual void writeTimerConfig_UpdateWhenEmpty(bool value, tRioStatusCode *status) = 0; - virtual tTimerConfig readTimerConfig(tRioStatusCode *status) = 0; - virtual unsigned int readTimerConfig_StallPeriod(tRioStatusCode *status) = 0; - virtual unsigned char readTimerConfig_AverageSize(tRioStatusCode *status) = 0; - virtual bool readTimerConfig_UpdateWhenEmpty(tRioStatusCode *status) = 0; - - - - - -private: - tEncoder(const tEncoder&); - void operator=(const tEncoder&); -}; - -} -} - -#endif // __nFRC_2015_1_0_4_Encoder_h__ +// Copyright (c) National Instruments 2008. All Rights Reserved. +// Do Not Edit... this file is generated! + +#ifndef __nFRC_2015_1_0_5_Encoder_h__ +#define __nFRC_2015_1_0_5_Encoder_h__ + +#include "tSystemInterface.h" + +namespace nFPGA +{ +namespace nFRC_2015_1_0_5 +{ + +class tEncoder +{ +public: + tEncoder(){} + virtual ~tEncoder(){} + + virtual tSystemInterface* getSystemInterface() = 0; + static tEncoder* create(unsigned char sys_index, tRioStatusCode *status); + virtual unsigned char getSystemIndex() = 0; + + + typedef enum + { + kNumSystems = 4, + } tIfaceConstants; + + typedef + union{ + struct{ +#ifdef __vxworks + unsigned Direction : 1; + signed Value : 31; +#else + signed Value : 31; + unsigned Direction : 1; +#endif + }; + struct{ + unsigned value : 32; + }; + } tOutput; + typedef + union{ + struct{ +#ifdef __vxworks + unsigned ASource_Channel : 4; + unsigned ASource_Module : 1; + unsigned ASource_AnalogTrigger : 1; + unsigned BSource_Channel : 4; + unsigned BSource_Module : 1; + unsigned BSource_AnalogTrigger : 1; + unsigned IndexSource_Channel : 4; + unsigned IndexSource_Module : 1; + unsigned IndexSource_AnalogTrigger : 1; + unsigned IndexActiveHigh : 1; + unsigned Reverse : 1; + unsigned Enable : 1; +#else + unsigned Enable : 1; + unsigned Reverse : 1; + unsigned IndexActiveHigh : 1; + unsigned IndexSource_AnalogTrigger : 1; + unsigned IndexSource_Module : 1; + unsigned IndexSource_Channel : 4; + unsigned BSource_AnalogTrigger : 1; + unsigned BSource_Module : 1; + unsigned BSource_Channel : 4; + unsigned ASource_AnalogTrigger : 1; + unsigned ASource_Module : 1; + unsigned ASource_Channel : 4; +#endif + }; + struct{ + unsigned value : 21; + }; + } tConfig; + typedef + union{ + struct{ +#ifdef __vxworks + unsigned Period : 23; + signed Count : 8; + unsigned Stalled : 1; +#else + unsigned Stalled : 1; + signed Count : 8; + unsigned Period : 23; +#endif + }; + struct{ + unsigned value : 32; + }; + } tTimerOutput; + typedef + union{ + struct{ +#ifdef __vxworks + unsigned StallPeriod : 24; + unsigned AverageSize : 7; + unsigned UpdateWhenEmpty : 1; +#else + unsigned UpdateWhenEmpty : 1; + unsigned AverageSize : 7; + unsigned StallPeriod : 24; +#endif + }; + struct{ + unsigned value : 32; + }; + } tTimerConfig; + + + typedef enum + { + } tOutput_IfaceConstants; + + virtual tOutput readOutput(tRioStatusCode *status) = 0; + virtual bool readOutput_Direction(tRioStatusCode *status) = 0; + virtual signed int readOutput_Value(tRioStatusCode *status) = 0; + + + typedef enum + { + } tConfig_IfaceConstants; + + virtual void writeConfig(tConfig value, tRioStatusCode *status) = 0; + virtual void writeConfig_ASource_Channel(unsigned char value, tRioStatusCode *status) = 0; + virtual void writeConfig_ASource_Module(unsigned char value, tRioStatusCode *status) = 0; + virtual void writeConfig_ASource_AnalogTrigger(bool value, tRioStatusCode *status) = 0; + virtual void writeConfig_BSource_Channel(unsigned char value, tRioStatusCode *status) = 0; + virtual void writeConfig_BSource_Module(unsigned char value, tRioStatusCode *status) = 0; + virtual void writeConfig_BSource_AnalogTrigger(bool value, tRioStatusCode *status) = 0; + virtual void writeConfig_IndexSource_Channel(unsigned char value, tRioStatusCode *status) = 0; + virtual void writeConfig_IndexSource_Module(unsigned char value, tRioStatusCode *status) = 0; + virtual void writeConfig_IndexSource_AnalogTrigger(bool value, tRioStatusCode *status) = 0; + virtual void writeConfig_IndexActiveHigh(bool value, tRioStatusCode *status) = 0; + virtual void writeConfig_Reverse(bool value, tRioStatusCode *status) = 0; + virtual void writeConfig_Enable(bool value, tRioStatusCode *status) = 0; + virtual tConfig readConfig(tRioStatusCode *status) = 0; + virtual unsigned char readConfig_ASource_Channel(tRioStatusCode *status) = 0; + virtual unsigned char readConfig_ASource_Module(tRioStatusCode *status) = 0; + virtual bool readConfig_ASource_AnalogTrigger(tRioStatusCode *status) = 0; + virtual unsigned char readConfig_BSource_Channel(tRioStatusCode *status) = 0; + virtual unsigned char readConfig_BSource_Module(tRioStatusCode *status) = 0; + virtual bool readConfig_BSource_AnalogTrigger(tRioStatusCode *status) = 0; + virtual unsigned char readConfig_IndexSource_Channel(tRioStatusCode *status) = 0; + virtual unsigned char readConfig_IndexSource_Module(tRioStatusCode *status) = 0; + virtual bool readConfig_IndexSource_AnalogTrigger(tRioStatusCode *status) = 0; + virtual bool readConfig_IndexActiveHigh(tRioStatusCode *status) = 0; + virtual bool readConfig_Reverse(tRioStatusCode *status) = 0; + virtual bool readConfig_Enable(tRioStatusCode *status) = 0; + + + typedef enum + { + } tTimerOutput_IfaceConstants; + + virtual tTimerOutput readTimerOutput(tRioStatusCode *status) = 0; + virtual unsigned int readTimerOutput_Period(tRioStatusCode *status) = 0; + virtual signed char readTimerOutput_Count(tRioStatusCode *status) = 0; + virtual bool readTimerOutput_Stalled(tRioStatusCode *status) = 0; + + + typedef enum + { + } tReset_IfaceConstants; + + virtual void strobeReset(tRioStatusCode *status) = 0; + + + typedef enum + { + } tTimerConfig_IfaceConstants; + + virtual void writeTimerConfig(tTimerConfig value, tRioStatusCode *status) = 0; + virtual void writeTimerConfig_StallPeriod(unsigned int value, tRioStatusCode *status) = 0; + virtual void writeTimerConfig_AverageSize(unsigned char value, tRioStatusCode *status) = 0; + virtual void writeTimerConfig_UpdateWhenEmpty(bool value, tRioStatusCode *status) = 0; + virtual tTimerConfig readTimerConfig(tRioStatusCode *status) = 0; + virtual unsigned int readTimerConfig_StallPeriod(tRioStatusCode *status) = 0; + virtual unsigned char readTimerConfig_AverageSize(tRioStatusCode *status) = 0; + virtual bool readTimerConfig_UpdateWhenEmpty(tRioStatusCode *status) = 0; + + + + + +private: + tEncoder(const tEncoder&); + void operator=(const tEncoder&); +}; + +} +} + +#endif // __nFRC_2015_1_0_5_Encoder_h__ diff --git a/hal/lib/Athena/ChipObject/tGlobal.h b/hal/lib/Athena/ChipObject/tGlobal.h index 03b93b0df5..990d4a30ad 100644 --- a/hal/lib/Athena/ChipObject/tGlobal.h +++ b/hal/lib/Athena/ChipObject/tGlobal.h @@ -1,104 +1,104 @@ -// Copyright (c) National Instruments 2008. All Rights Reserved. -// Do Not Edit... this file is generated! - -#ifndef __nFRC_2015_1_0_4_Global_h__ -#define __nFRC_2015_1_0_4_Global_h__ - -#include "tSystemInterface.h" - -namespace nFPGA -{ -namespace nFRC_2015_1_0_4 -{ - -class tGlobal -{ -public: - tGlobal(){} - virtual ~tGlobal(){} - - virtual tSystemInterface* getSystemInterface() = 0; - static tGlobal* create(tRioStatusCode *status); - - typedef enum - { - kNumSystems = 1, - } tIfaceConstants; - - typedef - union{ - struct{ -#ifdef __vxworks - unsigned Radio : 8; - unsigned Comm : 8; - unsigned Mode : 8; - unsigned RSL : 1; -#else - unsigned RSL : 1; - unsigned Mode : 8; - unsigned Comm : 8; - unsigned Radio : 8; -#endif - }; - struct{ - unsigned value : 25; - }; - } tLEDs; - - - - typedef enum - { - } tLEDs_IfaceConstants; - - virtual void writeLEDs(tLEDs value, tRioStatusCode *status) = 0; - virtual void writeLEDs_Radio(unsigned char value, tRioStatusCode *status) = 0; - virtual void writeLEDs_Comm(unsigned char value, tRioStatusCode *status) = 0; - virtual void writeLEDs_Mode(unsigned char value, tRioStatusCode *status) = 0; - virtual void writeLEDs_RSL(bool value, tRioStatusCode *status) = 0; - virtual tLEDs readLEDs(tRioStatusCode *status) = 0; - virtual unsigned char readLEDs_Radio(tRioStatusCode *status) = 0; - virtual unsigned char readLEDs_Comm(tRioStatusCode *status) = 0; - virtual unsigned char readLEDs_Mode(tRioStatusCode *status) = 0; - virtual bool readLEDs_RSL(tRioStatusCode *status) = 0; - - - typedef enum - { - } tVersion_IfaceConstants; - - virtual unsigned short readVersion(tRioStatusCode *status) = 0; - - - typedef enum - { - } tLocalTime_IfaceConstants; - - virtual unsigned int readLocalTime(tRioStatusCode *status) = 0; - - - typedef enum - { - } tUserButton_IfaceConstants; - - virtual bool readUserButton(tRioStatusCode *status) = 0; - - - typedef enum - { - } tRevision_IfaceConstants; - - virtual unsigned int readRevision(tRioStatusCode *status) = 0; - - - - -private: - tGlobal(const tGlobal&); - void operator=(const tGlobal&); -}; - -} -} - -#endif // __nFRC_2015_1_0_4_Global_h__ +// Copyright (c) National Instruments 2008. All Rights Reserved. +// Do Not Edit... this file is generated! + +#ifndef __nFRC_2015_1_0_5_Global_h__ +#define __nFRC_2015_1_0_5_Global_h__ + +#include "tSystemInterface.h" + +namespace nFPGA +{ +namespace nFRC_2015_1_0_5 +{ + +class tGlobal +{ +public: + tGlobal(){} + virtual ~tGlobal(){} + + virtual tSystemInterface* getSystemInterface() = 0; + static tGlobal* create(tRioStatusCode *status); + + typedef enum + { + kNumSystems = 1, + } tIfaceConstants; + + typedef + union{ + struct{ +#ifdef __vxworks + unsigned Radio : 8; + unsigned Comm : 8; + unsigned Mode : 8; + unsigned RSL : 1; +#else + unsigned RSL : 1; + unsigned Mode : 8; + unsigned Comm : 8; + unsigned Radio : 8; +#endif + }; + struct{ + unsigned value : 25; + }; + } tLEDs; + + + + typedef enum + { + } tLEDs_IfaceConstants; + + virtual void writeLEDs(tLEDs value, tRioStatusCode *status) = 0; + virtual void writeLEDs_Radio(unsigned char value, tRioStatusCode *status) = 0; + virtual void writeLEDs_Comm(unsigned char value, tRioStatusCode *status) = 0; + virtual void writeLEDs_Mode(unsigned char value, tRioStatusCode *status) = 0; + virtual void writeLEDs_RSL(bool value, tRioStatusCode *status) = 0; + virtual tLEDs readLEDs(tRioStatusCode *status) = 0; + virtual unsigned char readLEDs_Radio(tRioStatusCode *status) = 0; + virtual unsigned char readLEDs_Comm(tRioStatusCode *status) = 0; + virtual unsigned char readLEDs_Mode(tRioStatusCode *status) = 0; + virtual bool readLEDs_RSL(tRioStatusCode *status) = 0; + + + typedef enum + { + } tVersion_IfaceConstants; + + virtual unsigned short readVersion(tRioStatusCode *status) = 0; + + + typedef enum + { + } tLocalTime_IfaceConstants; + + virtual unsigned int readLocalTime(tRioStatusCode *status) = 0; + + + typedef enum + { + } tUserButton_IfaceConstants; + + virtual bool readUserButton(tRioStatusCode *status) = 0; + + + typedef enum + { + } tRevision_IfaceConstants; + + virtual unsigned int readRevision(tRioStatusCode *status) = 0; + + + + +private: + tGlobal(const tGlobal&); + void operator=(const tGlobal&); +}; + +} +} + +#endif // __nFRC_2015_1_0_5_Global_h__ diff --git a/hal/lib/Athena/ChipObject/tInterrupt.h b/hal/lib/Athena/ChipObject/tInterrupt.h index a6275b6cf7..be319dd89d 100644 --- a/hal/lib/Athena/ChipObject/tInterrupt.h +++ b/hal/lib/Athena/ChipObject/tInterrupt.h @@ -1,93 +1,93 @@ -// Copyright (c) National Instruments 2008. All Rights Reserved. -// Do Not Edit... this file is generated! - -#ifndef __nFRC_2015_1_0_4_Interrupt_h__ -#define __nFRC_2015_1_0_4_Interrupt_h__ - -#include "tSystemInterface.h" - -namespace nFPGA -{ -namespace nFRC_2015_1_0_4 -{ - -class tInterrupt -{ -public: - tInterrupt(){} - virtual ~tInterrupt(){} - - virtual tSystemInterface* getSystemInterface() = 0; - static tInterrupt* create(unsigned char sys_index, tRioStatusCode *status); - virtual unsigned char getSystemIndex() = 0; - - - typedef enum - { - kNumSystems = 8, - } tIfaceConstants; - - typedef - union{ - struct{ -#ifdef __vxworks - unsigned Source_Channel : 4; - unsigned Source_Module : 1; - unsigned Source_AnalogTrigger : 1; - unsigned RisingEdge : 1; - unsigned FallingEdge : 1; - unsigned WaitForAck : 1; -#else - unsigned WaitForAck : 1; - unsigned FallingEdge : 1; - unsigned RisingEdge : 1; - unsigned Source_AnalogTrigger : 1; - unsigned Source_Module : 1; - unsigned Source_Channel : 4; -#endif - }; - struct{ - unsigned value : 9; - }; - } tConfig; - - - typedef enum - { - } tTimeStamp_IfaceConstants; - - virtual unsigned int readTimeStamp(tRioStatusCode *status) = 0; - - - typedef enum - { - } tConfig_IfaceConstants; - - virtual void writeConfig(tConfig value, tRioStatusCode *status) = 0; - virtual void writeConfig_Source_Channel(unsigned char value, tRioStatusCode *status) = 0; - virtual void writeConfig_Source_Module(unsigned char value, tRioStatusCode *status) = 0; - virtual void writeConfig_Source_AnalogTrigger(bool value, tRioStatusCode *status) = 0; - virtual void writeConfig_RisingEdge(bool value, tRioStatusCode *status) = 0; - virtual void writeConfig_FallingEdge(bool value, tRioStatusCode *status) = 0; - virtual void writeConfig_WaitForAck(bool value, tRioStatusCode *status) = 0; - virtual tConfig readConfig(tRioStatusCode *status) = 0; - virtual unsigned char readConfig_Source_Channel(tRioStatusCode *status) = 0; - virtual unsigned char readConfig_Source_Module(tRioStatusCode *status) = 0; - virtual bool readConfig_Source_AnalogTrigger(tRioStatusCode *status) = 0; - virtual bool readConfig_RisingEdge(tRioStatusCode *status) = 0; - virtual bool readConfig_FallingEdge(tRioStatusCode *status) = 0; - virtual bool readConfig_WaitForAck(tRioStatusCode *status) = 0; - - - - - -private: - tInterrupt(const tInterrupt&); - void operator=(const tInterrupt&); -}; - -} -} - -#endif // __nFRC_2015_1_0_4_Interrupt_h__ +// Copyright (c) National Instruments 2008. All Rights Reserved. +// Do Not Edit... this file is generated! + +#ifndef __nFRC_2015_1_0_5_Interrupt_h__ +#define __nFRC_2015_1_0_5_Interrupt_h__ + +#include "tSystemInterface.h" + +namespace nFPGA +{ +namespace nFRC_2015_1_0_5 +{ + +class tInterrupt +{ +public: + tInterrupt(){} + virtual ~tInterrupt(){} + + virtual tSystemInterface* getSystemInterface() = 0; + static tInterrupt* create(unsigned char sys_index, tRioStatusCode *status); + virtual unsigned char getSystemIndex() = 0; + + + typedef enum + { + kNumSystems = 8, + } tIfaceConstants; + + typedef + union{ + struct{ +#ifdef __vxworks + unsigned Source_Channel : 4; + unsigned Source_Module : 1; + unsigned Source_AnalogTrigger : 1; + unsigned RisingEdge : 1; + unsigned FallingEdge : 1; + unsigned WaitForAck : 1; +#else + unsigned WaitForAck : 1; + unsigned FallingEdge : 1; + unsigned RisingEdge : 1; + unsigned Source_AnalogTrigger : 1; + unsigned Source_Module : 1; + unsigned Source_Channel : 4; +#endif + }; + struct{ + unsigned value : 9; + }; + } tConfig; + + + typedef enum + { + } tTimeStamp_IfaceConstants; + + virtual unsigned int readTimeStamp(tRioStatusCode *status) = 0; + + + typedef enum + { + } tConfig_IfaceConstants; + + virtual void writeConfig(tConfig value, tRioStatusCode *status) = 0; + virtual void writeConfig_Source_Channel(unsigned char value, tRioStatusCode *status) = 0; + virtual void writeConfig_Source_Module(unsigned char value, tRioStatusCode *status) = 0; + virtual void writeConfig_Source_AnalogTrigger(bool value, tRioStatusCode *status) = 0; + virtual void writeConfig_RisingEdge(bool value, tRioStatusCode *status) = 0; + virtual void writeConfig_FallingEdge(bool value, tRioStatusCode *status) = 0; + virtual void writeConfig_WaitForAck(bool value, tRioStatusCode *status) = 0; + virtual tConfig readConfig(tRioStatusCode *status) = 0; + virtual unsigned char readConfig_Source_Channel(tRioStatusCode *status) = 0; + virtual unsigned char readConfig_Source_Module(tRioStatusCode *status) = 0; + virtual bool readConfig_Source_AnalogTrigger(tRioStatusCode *status) = 0; + virtual bool readConfig_RisingEdge(tRioStatusCode *status) = 0; + virtual bool readConfig_FallingEdge(tRioStatusCode *status) = 0; + virtual bool readConfig_WaitForAck(tRioStatusCode *status) = 0; + + + + + +private: + tInterrupt(const tInterrupt&); + void operator=(const tInterrupt&); +}; + +} +} + +#endif // __nFRC_2015_1_0_5_Interrupt_h__ diff --git a/hal/lib/Athena/ChipObject/tInterruptManager.h b/hal/lib/Athena/ChipObject/tInterruptManager.h index b8fb361845..c7d631a0cb 100644 --- a/hal/lib/Athena/ChipObject/tInterruptManager.h +++ b/hal/lib/Athena/ChipObject/tInterruptManager.h @@ -1,61 +1,61 @@ -// Class for handling interrupts. -// Copyright (c) National Instruments 2008. All Rights Reserved. - -#ifndef __tInterruptManager_h__ -#define __tInterruptManager_h__ - -#include "tSystem.h" - -namespace ni -{ - namespace dsc - { - namespace osdep - { - class CriticalSection; - } - } -} - -namespace nFPGA -{ - -typedef void (*tInterruptHandler)(uint32_t interruptAssertedMask, void *param); - -class tInterruptManager : public tSystem -{ -public: - tInterruptManager(uint32_t interruptMask, bool watcher, tRioStatusCode *status); - ~tInterruptManager(); - void registerHandler(tInterruptHandler handler, void *param, tRioStatusCode *status); - uint32_t watch(int32_t timeoutInMs, tRioStatusCode *status); - void enable(tRioStatusCode *status); - void disable(tRioStatusCode *status); - bool isEnabled(tRioStatusCode *status); -private: - class tInterruptThread; - friend class tInterruptThread; - void handler(); - static int handlerWrapper(tInterruptManager *pInterrupt); - - void acknowledge(tRioStatusCode *status); - void reserve(tRioStatusCode *status); - void unreserve(tRioStatusCode *status); - tInterruptHandler _handler; - uint32_t _interruptMask; - tInterruptThread *_thread; - NiFpga_IrqContext _rioContext; - bool _watcher; - bool _enabled; - void *_userParam; - - // maintain the interrupts that are already dealt with. - static uint32_t _globalInterruptMask; - static ni::dsc::osdep::CriticalSection *_globalInterruptMaskSemaphore; -}; - -} - - -#endif // __tInterruptManager_h__ - +// Class for handling interrupts. +// Copyright (c) National Instruments 2008. All Rights Reserved. + +#ifndef __tInterruptManager_h__ +#define __tInterruptManager_h__ + +#include "tSystem.h" + +namespace ni +{ + namespace dsc + { + namespace osdep + { + class CriticalSection; + } + } +} + +namespace nFPGA +{ + +typedef void (*tInterruptHandler)(uint32_t interruptAssertedMask, void *param); + +class tInterruptManager : public tSystem +{ +public: + tInterruptManager(uint32_t interruptMask, bool watcher, tRioStatusCode *status); + ~tInterruptManager(); + void registerHandler(tInterruptHandler handler, void *param, tRioStatusCode *status); + uint32_t watch(int32_t timeoutInMs, tRioStatusCode *status); + void enable(tRioStatusCode *status); + void disable(tRioStatusCode *status); + bool isEnabled(tRioStatusCode *status); +private: + class tInterruptThread; + friend class tInterruptThread; + void handler(); + static int handlerWrapper(tInterruptManager *pInterrupt); + + void acknowledge(tRioStatusCode *status); + void reserve(tRioStatusCode *status); + void unreserve(tRioStatusCode *status); + tInterruptHandler _handler; + uint32_t _interruptMask; + tInterruptThread *_thread; + NiFpga_IrqContext _rioContext; + bool _watcher; + bool _enabled; + void *_userParam; + + // maintain the interrupts that are already dealt with. + static uint32_t _globalInterruptMask; + static ni::dsc::osdep::CriticalSection *_globalInterruptMaskSemaphore; +}; + +} + + +#endif // __tInterruptManager_h__ + diff --git a/hal/lib/Athena/ChipObject/tPWM.h b/hal/lib/Athena/ChipObject/tPWM.h index c0b2e08cb6..1362293a96 100644 --- a/hal/lib/Athena/ChipObject/tPWM.h +++ b/hal/lib/Athena/ChipObject/tPWM.h @@ -1,111 +1,111 @@ -// Copyright (c) National Instruments 2008. All Rights Reserved. -// Do Not Edit... this file is generated! - -#ifndef __nFRC_2015_1_0_4_PWM_h__ -#define __nFRC_2015_1_0_4_PWM_h__ - -#include "tSystemInterface.h" - -namespace nFPGA -{ -namespace nFRC_2015_1_0_4 -{ - -class tPWM -{ -public: - tPWM(){} - virtual ~tPWM(){} - - virtual tSystemInterface* getSystemInterface() = 0; - static tPWM* create(tRioStatusCode *status); - - typedef enum - { - kNumSystems = 1, - } tIfaceConstants; - - typedef - union{ - struct{ -#ifdef __vxworks - unsigned Period : 16; - unsigned MinHigh : 16; -#else - unsigned MinHigh : 16; - unsigned Period : 16; -#endif - }; - struct{ - unsigned value : 32; - }; - } tConfig; - - - - typedef enum - { - } tConfig_IfaceConstants; - - virtual void writeConfig(tConfig value, tRioStatusCode *status) = 0; - virtual void writeConfig_Period(unsigned short value, tRioStatusCode *status) = 0; - virtual void writeConfig_MinHigh(unsigned short value, tRioStatusCode *status) = 0; - virtual tConfig readConfig(tRioStatusCode *status) = 0; - virtual unsigned short readConfig_Period(tRioStatusCode *status) = 0; - virtual unsigned short readConfig_MinHigh(tRioStatusCode *status) = 0; - - - typedef enum - { - } tLoopTiming_IfaceConstants; - - virtual unsigned short readLoopTiming(tRioStatusCode *status) = 0; - - - typedef enum - { - kNumPeriodScaleMXPElements = 10, - } tPeriodScaleMXP_IfaceConstants; - - virtual void writePeriodScaleMXP(unsigned char bitfield_index, unsigned char value, tRioStatusCode *status) = 0; - virtual unsigned char readPeriodScaleMXP(unsigned char bitfield_index, tRioStatusCode *status) = 0; - - - typedef enum - { - kNumPeriodScaleHdrElements = 10, - } tPeriodScaleHdr_IfaceConstants; - - virtual void writePeriodScaleHdr(unsigned char bitfield_index, unsigned char value, tRioStatusCode *status) = 0; - virtual unsigned char readPeriodScaleHdr(unsigned char bitfield_index, tRioStatusCode *status) = 0; - - - - - typedef enum - { - kNumHdrRegisters = 10, - } tHdr_IfaceConstants; - - virtual void writeHdr(unsigned char reg_index, unsigned short value, tRioStatusCode *status) = 0; - virtual unsigned short readHdr(unsigned char reg_index, tRioStatusCode *status) = 0; - - - typedef enum - { - kNumMXPRegisters = 10, - } tMXP_IfaceConstants; - - virtual void writeMXP(unsigned char reg_index, unsigned short value, tRioStatusCode *status) = 0; - virtual unsigned short readMXP(unsigned char reg_index, tRioStatusCode *status) = 0; - - -private: - tPWM(const tPWM&); - void operator=(const tPWM&); -}; - -} -} - -#endif // __nFRC_2015_1_0_4_PWM_h__ +// Copyright (c) National Instruments 2008. All Rights Reserved. +// Do Not Edit... this file is generated! + +#ifndef __nFRC_2015_1_0_5_PWM_h__ +#define __nFRC_2015_1_0_5_PWM_h__ + +#include "tSystemInterface.h" + +namespace nFPGA +{ +namespace nFRC_2015_1_0_5 +{ + +class tPWM +{ +public: + tPWM(){} + virtual ~tPWM(){} + + virtual tSystemInterface* getSystemInterface() = 0; + static tPWM* create(tRioStatusCode *status); + + typedef enum + { + kNumSystems = 1, + } tIfaceConstants; + + typedef + union{ + struct{ +#ifdef __vxworks + unsigned Period : 16; + unsigned MinHigh : 16; +#else + unsigned MinHigh : 16; + unsigned Period : 16; +#endif + }; + struct{ + unsigned value : 32; + }; + } tConfig; + + + + typedef enum + { + } tConfig_IfaceConstants; + + virtual void writeConfig(tConfig value, tRioStatusCode *status) = 0; + virtual void writeConfig_Period(unsigned short value, tRioStatusCode *status) = 0; + virtual void writeConfig_MinHigh(unsigned short value, tRioStatusCode *status) = 0; + virtual tConfig readConfig(tRioStatusCode *status) = 0; + virtual unsigned short readConfig_Period(tRioStatusCode *status) = 0; + virtual unsigned short readConfig_MinHigh(tRioStatusCode *status) = 0; + + + typedef enum + { + } tLoopTiming_IfaceConstants; + + virtual unsigned short readLoopTiming(tRioStatusCode *status) = 0; + + + typedef enum + { + kNumPeriodScaleMXPElements = 10, + } tPeriodScaleMXP_IfaceConstants; + + virtual void writePeriodScaleMXP(unsigned char bitfield_index, unsigned char value, tRioStatusCode *status) = 0; + virtual unsigned char readPeriodScaleMXP(unsigned char bitfield_index, tRioStatusCode *status) = 0; + + + typedef enum + { + kNumPeriodScaleHdrElements = 10, + } tPeriodScaleHdr_IfaceConstants; + + virtual void writePeriodScaleHdr(unsigned char bitfield_index, unsigned char value, tRioStatusCode *status) = 0; + virtual unsigned char readPeriodScaleHdr(unsigned char bitfield_index, tRioStatusCode *status) = 0; + + + + + typedef enum + { + kNumHdrRegisters = 10, + } tHdr_IfaceConstants; + + virtual void writeHdr(unsigned char reg_index, unsigned short value, tRioStatusCode *status) = 0; + virtual unsigned short readHdr(unsigned char reg_index, tRioStatusCode *status) = 0; + + + typedef enum + { + kNumMXPRegisters = 10, + } tMXP_IfaceConstants; + + virtual void writeMXP(unsigned char reg_index, unsigned short value, tRioStatusCode *status) = 0; + virtual unsigned short readMXP(unsigned char reg_index, tRioStatusCode *status) = 0; + + +private: + tPWM(const tPWM&); + void operator=(const tPWM&); +}; + +} +} + +#endif // __nFRC_2015_1_0_5_PWM_h__ diff --git a/hal/lib/Athena/ChipObject/tPower.h b/hal/lib/Athena/ChipObject/tPower.h index f9fc7a8b8e..ad859c9a6b 100644 --- a/hal/lib/Athena/ChipObject/tPower.h +++ b/hal/lib/Athena/ChipObject/tPower.h @@ -1,107 +1,107 @@ -// Copyright (c) National Instruments 2008. All Rights Reserved. -// Do Not Edit... this file is generated! - -#ifndef __nFRC_2015_1_0_4_Power_h__ -#define __nFRC_2015_1_0_4_Power_h__ - -#include "tSystemInterface.h" - -namespace nFPGA -{ -namespace nFRC_2015_1_0_4 -{ - -class tPower -{ -public: - tPower(){} - virtual ~tPower(){} - - virtual tSystemInterface* getSystemInterface() = 0; - static tPower* create(tRioStatusCode *status); - - typedef enum - { - kNumSystems = 1, - } tIfaceConstants; - - typedef - union{ - struct{ -#ifdef __vxworks - unsigned User3V3 : 8; - unsigned User5V : 8; - unsigned User6V : 8; -#else - unsigned User6V : 8; - unsigned User5V : 8; - unsigned User3V3 : 8; -#endif - }; - struct{ - unsigned value : 24; - }; - } tStatus; - typedef - union{ - struct{ -#ifdef __vxworks - unsigned User3V3 : 1; - unsigned User5V : 1; - unsigned User6V : 1; -#else - unsigned User6V : 1; - unsigned User5V : 1; - unsigned User3V3 : 1; -#endif - }; - struct{ - unsigned value : 3; - }; - } tDisable; - - - - typedef enum - { - } tStatus_IfaceConstants; - - virtual tStatus readStatus(tRioStatusCode *status) = 0; - virtual unsigned char readStatus_User3V3(tRioStatusCode *status) = 0; - virtual unsigned char readStatus_User5V(tRioStatusCode *status) = 0; - virtual unsigned char readStatus_User6V(tRioStatusCode *status) = 0; - - - typedef enum - { - } tDisable_IfaceConstants; - - virtual void writeDisable(tDisable value, tRioStatusCode *status) = 0; - virtual void writeDisable_User3V3(bool value, tRioStatusCode *status) = 0; - virtual void writeDisable_User5V(bool value, tRioStatusCode *status) = 0; - virtual void writeDisable_User6V(bool value, tRioStatusCode *status) = 0; - virtual tDisable readDisable(tRioStatusCode *status) = 0; - virtual bool readDisable_User3V3(tRioStatusCode *status) = 0; - virtual bool readDisable_User5V(tRioStatusCode *status) = 0; - virtual bool readDisable_User6V(tRioStatusCode *status) = 0; - - - typedef enum - { - } tIndicateOutOfRange_IfaceConstants; - - virtual void writeIndicateOutOfRange(bool value, tRioStatusCode *status) = 0; - virtual bool readIndicateOutOfRange(tRioStatusCode *status) = 0; - - - - -private: - tPower(const tPower&); - void operator=(const tPower&); -}; - -} -} - -#endif // __nFRC_2015_1_0_4_Power_h__ +// Copyright (c) National Instruments 2008. All Rights Reserved. +// Do Not Edit... this file is generated! + +#ifndef __nFRC_2015_1_0_5_Power_h__ +#define __nFRC_2015_1_0_5_Power_h__ + +#include "tSystemInterface.h" + +namespace nFPGA +{ +namespace nFRC_2015_1_0_5 +{ + +class tPower +{ +public: + tPower(){} + virtual ~tPower(){} + + virtual tSystemInterface* getSystemInterface() = 0; + static tPower* create(tRioStatusCode *status); + + typedef enum + { + kNumSystems = 1, + } tIfaceConstants; + + typedef + union{ + struct{ +#ifdef __vxworks + unsigned User3V3 : 8; + unsigned User5V : 8; + unsigned User6V : 8; +#else + unsigned User6V : 8; + unsigned User5V : 8; + unsigned User3V3 : 8; +#endif + }; + struct{ + unsigned value : 24; + }; + } tStatus; + typedef + union{ + struct{ +#ifdef __vxworks + unsigned User3V3 : 1; + unsigned User5V : 1; + unsigned User6V : 1; +#else + unsigned User6V : 1; + unsigned User5V : 1; + unsigned User3V3 : 1; +#endif + }; + struct{ + unsigned value : 3; + }; + } tDisable; + + + + typedef enum + { + } tStatus_IfaceConstants; + + virtual tStatus readStatus(tRioStatusCode *status) = 0; + virtual unsigned char readStatus_User3V3(tRioStatusCode *status) = 0; + virtual unsigned char readStatus_User5V(tRioStatusCode *status) = 0; + virtual unsigned char readStatus_User6V(tRioStatusCode *status) = 0; + + + typedef enum + { + } tDisable_IfaceConstants; + + virtual void writeDisable(tDisable value, tRioStatusCode *status) = 0; + virtual void writeDisable_User3V3(bool value, tRioStatusCode *status) = 0; + virtual void writeDisable_User5V(bool value, tRioStatusCode *status) = 0; + virtual void writeDisable_User6V(bool value, tRioStatusCode *status) = 0; + virtual tDisable readDisable(tRioStatusCode *status) = 0; + virtual bool readDisable_User3V3(tRioStatusCode *status) = 0; + virtual bool readDisable_User5V(tRioStatusCode *status) = 0; + virtual bool readDisable_User6V(tRioStatusCode *status) = 0; + + + typedef enum + { + } tIndicateOutOfRange_IfaceConstants; + + virtual void writeIndicateOutOfRange(bool value, tRioStatusCode *status) = 0; + virtual bool readIndicateOutOfRange(tRioStatusCode *status) = 0; + + + + +private: + tPower(const tPower&); + void operator=(const tPower&); +}; + +} +} + +#endif // __nFRC_2015_1_0_5_Power_h__ diff --git a/hal/lib/Athena/ChipObject/tRelay.h b/hal/lib/Athena/ChipObject/tRelay.h index 3edfb66b04..a2f72b7f54 100644 --- a/hal/lib/Athena/ChipObject/tRelay.h +++ b/hal/lib/Athena/ChipObject/tRelay.h @@ -1,68 +1,68 @@ -// Copyright (c) National Instruments 2008. All Rights Reserved. -// Do Not Edit... this file is generated! - -#ifndef __nFRC_2015_1_0_4_Relay_h__ -#define __nFRC_2015_1_0_4_Relay_h__ - -#include "tSystemInterface.h" - -namespace nFPGA -{ -namespace nFRC_2015_1_0_4 -{ - -class tRelay -{ -public: - tRelay(){} - virtual ~tRelay(){} - - virtual tSystemInterface* getSystemInterface() = 0; - static tRelay* create(tRioStatusCode *status); - - typedef enum - { - kNumSystems = 1, - } tIfaceConstants; - - typedef - union{ - struct{ -#ifdef __vxworks - unsigned Forward : 4; - unsigned Reverse : 4; -#else - unsigned Reverse : 4; - unsigned Forward : 4; -#endif - }; - struct{ - unsigned value : 8; - }; - } tValue; - - - - typedef enum - { - } tValue_IfaceConstants; - - virtual void writeValue(tValue value, tRioStatusCode *status) = 0; - virtual void writeValue_Forward(unsigned char value, tRioStatusCode *status) = 0; - virtual void writeValue_Reverse(unsigned char value, tRioStatusCode *status) = 0; - virtual tValue readValue(tRioStatusCode *status) = 0; - virtual unsigned char readValue_Forward(tRioStatusCode *status) = 0; - virtual unsigned char readValue_Reverse(tRioStatusCode *status) = 0; - - - - -private: - tRelay(const tRelay&); - void operator=(const tRelay&); -}; - -} -} - -#endif // __nFRC_2015_1_0_4_Relay_h__ +// Copyright (c) National Instruments 2008. All Rights Reserved. +// Do Not Edit... this file is generated! + +#ifndef __nFRC_2015_1_0_5_Relay_h__ +#define __nFRC_2015_1_0_5_Relay_h__ + +#include "tSystemInterface.h" + +namespace nFPGA +{ +namespace nFRC_2015_1_0_5 +{ + +class tRelay +{ +public: + tRelay(){} + virtual ~tRelay(){} + + virtual tSystemInterface* getSystemInterface() = 0; + static tRelay* create(tRioStatusCode *status); + + typedef enum + { + kNumSystems = 1, + } tIfaceConstants; + + typedef + union{ + struct{ +#ifdef __vxworks + unsigned Forward : 4; + unsigned Reverse : 4; +#else + unsigned Reverse : 4; + unsigned Forward : 4; +#endif + }; + struct{ + unsigned value : 8; + }; + } tValue; + + + + typedef enum + { + } tValue_IfaceConstants; + + virtual void writeValue(tValue value, tRioStatusCode *status) = 0; + virtual void writeValue_Forward(unsigned char value, tRioStatusCode *status) = 0; + virtual void writeValue_Reverse(unsigned char value, tRioStatusCode *status) = 0; + virtual tValue readValue(tRioStatusCode *status) = 0; + virtual unsigned char readValue_Forward(tRioStatusCode *status) = 0; + virtual unsigned char readValue_Reverse(tRioStatusCode *status) = 0; + + + + +private: + tRelay(const tRelay&); + void operator=(const tRelay&); +}; + +} +} + +#endif // __nFRC_2015_1_0_5_Relay_h__ diff --git a/hal/lib/Athena/ChipObject/tSPI.h b/hal/lib/Athena/ChipObject/tSPI.h index d8c4e7679e..ce45acfa9b 100644 --- a/hal/lib/Athena/ChipObject/tSPI.h +++ b/hal/lib/Athena/ChipObject/tSPI.h @@ -1,68 +1,68 @@ -// Copyright (c) National Instruments 2008. All Rights Reserved. -// Do Not Edit... this file is generated! - -#ifndef __nFRC_2015_1_0_4_SPI_h__ -#define __nFRC_2015_1_0_4_SPI_h__ - -#include "tSystemInterface.h" - -namespace nFPGA -{ -namespace nFRC_2015_1_0_4 -{ - -class tSPI -{ -public: - tSPI(){} - virtual ~tSPI(){} - - virtual tSystemInterface* getSystemInterface() = 0; - static tSPI* create(tRioStatusCode *status); - - typedef enum - { - kNumSystems = 1, - } tIfaceConstants; - - typedef - union{ - struct{ -#ifdef __vxworks - unsigned Hdr : 4; - unsigned MXP : 1; -#else - unsigned MXP : 1; - unsigned Hdr : 4; -#endif - }; - struct{ - unsigned value : 5; - }; - } tChipSelectActiveHigh; - - - - typedef enum - { - } tChipSelectActiveHigh_IfaceConstants; - - virtual void writeChipSelectActiveHigh(tChipSelectActiveHigh value, tRioStatusCode *status) = 0; - virtual void writeChipSelectActiveHigh_Hdr(unsigned char value, tRioStatusCode *status) = 0; - virtual void writeChipSelectActiveHigh_MXP(unsigned char value, tRioStatusCode *status) = 0; - virtual tChipSelectActiveHigh readChipSelectActiveHigh(tRioStatusCode *status) = 0; - virtual unsigned char readChipSelectActiveHigh_Hdr(tRioStatusCode *status) = 0; - virtual unsigned char readChipSelectActiveHigh_MXP(tRioStatusCode *status) = 0; - - - - -private: - tSPI(const tSPI&); - void operator=(const tSPI&); -}; - -} -} - -#endif // __nFRC_2015_1_0_4_SPI_h__ +// Copyright (c) National Instruments 2008. All Rights Reserved. +// Do Not Edit... this file is generated! + +#ifndef __nFRC_2015_1_0_5_SPI_h__ +#define __nFRC_2015_1_0_5_SPI_h__ + +#include "tSystemInterface.h" + +namespace nFPGA +{ +namespace nFRC_2015_1_0_5 +{ + +class tSPI +{ +public: + tSPI(){} + virtual ~tSPI(){} + + virtual tSystemInterface* getSystemInterface() = 0; + static tSPI* create(tRioStatusCode *status); + + typedef enum + { + kNumSystems = 1, + } tIfaceConstants; + + typedef + union{ + struct{ +#ifdef __vxworks + unsigned Hdr : 4; + unsigned MXP : 1; +#else + unsigned MXP : 1; + unsigned Hdr : 4; +#endif + }; + struct{ + unsigned value : 5; + }; + } tChipSelectActiveHigh; + + + + typedef enum + { + } tChipSelectActiveHigh_IfaceConstants; + + virtual void writeChipSelectActiveHigh(tChipSelectActiveHigh value, tRioStatusCode *status) = 0; + virtual void writeChipSelectActiveHigh_Hdr(unsigned char value, tRioStatusCode *status) = 0; + virtual void writeChipSelectActiveHigh_MXP(unsigned char value, tRioStatusCode *status) = 0; + virtual tChipSelectActiveHigh readChipSelectActiveHigh(tRioStatusCode *status) = 0; + virtual unsigned char readChipSelectActiveHigh_Hdr(tRioStatusCode *status) = 0; + virtual unsigned char readChipSelectActiveHigh_MXP(tRioStatusCode *status) = 0; + + + + +private: + tSPI(const tSPI&); + void operator=(const tSPI&); +}; + +} +} + +#endif // __nFRC_2015_1_0_5_SPI_h__ diff --git a/hal/lib/Athena/ChipObject/tSolenoid.h b/hal/lib/Athena/ChipObject/tSolenoid.h new file mode 100644 index 0000000000..8627eea6cc --- /dev/null +++ b/hal/lib/Athena/ChipObject/tSolenoid.h @@ -0,0 +1,50 @@ +// Copyright (c) National Instruments 2008. All Rights Reserved. +// Do Not Edit... this file is generated! + +#ifndef __nFRC_2012_1_6_4_Solenoid_h__ +#define __nFRC_2012_1_6_4_Solenoid_h__ + +#include "tSystemInterface.h" + +namespace nFPGA +{ +namespace nFRC_2012_1_6_4 +{ + +class tSolenoid +{ +public: + tSolenoid(){} + virtual ~tSolenoid(){} + + virtual tSystemInterface* getSystemInterface() = 0; + static tSolenoid* create(tRioStatusCode *status); + + typedef enum + { + kNumSystems = 1, + } tIfaceConstants; + + + + + typedef enum + { + kNumDO7_0Elements = 2, + } tDO7_0_IfaceConstants; + + virtual void writeDO7_0(unsigned char bitfield_index, unsigned char value, tRioStatusCode *status) = 0; + virtual unsigned char readDO7_0(unsigned char bitfield_index, tRioStatusCode *status) = 0; + + + + +private: + tSolenoid(const tSolenoid&); + void operator=(const tSolenoid&); +}; + +} +} + +#endif // __nFRC_2012_1_6_4_Solenoid_h__ diff --git a/hal/lib/Athena/ChipObject/tSysWatchdog.h b/hal/lib/Athena/ChipObject/tSysWatchdog.h index 1cb207d2f7..abb18158f9 100644 --- a/hal/lib/Athena/ChipObject/tSysWatchdog.h +++ b/hal/lib/Athena/ChipObject/tSysWatchdog.h @@ -1,101 +1,101 @@ -// Copyright (c) National Instruments 2008. All Rights Reserved. -// Do Not Edit... this file is generated! - -#ifndef __nFRC_2015_1_0_4_SysWatchdog_h__ -#define __nFRC_2015_1_0_4_SysWatchdog_h__ - -#include "tSystemInterface.h" - -namespace nFPGA -{ -namespace nFRC_2015_1_0_4 -{ - -class tSysWatchdog -{ -public: - tSysWatchdog(){} - virtual ~tSysWatchdog(){} - - virtual tSystemInterface* getSystemInterface() = 0; - static tSysWatchdog* create(tRioStatusCode *status); - - typedef enum - { - kNumSystems = 1, - } tIfaceConstants; - - typedef - union{ - struct{ -#ifdef __vxworks - unsigned SystemActive : 1; - unsigned PowerAlive : 1; - unsigned SysDisableCount : 15; - unsigned PowerDisableCount : 15; -#else - unsigned PowerDisableCount : 15; - unsigned SysDisableCount : 15; - unsigned PowerAlive : 1; - unsigned SystemActive : 1; -#endif - }; - struct{ - unsigned value : 32; - }; - } tStatus; - - - - typedef enum - { - } tStatus_IfaceConstants; - - virtual tStatus readStatus(tRioStatusCode *status) = 0; - virtual bool readStatus_SystemActive(tRioStatusCode *status) = 0; - virtual bool readStatus_PowerAlive(tRioStatusCode *status) = 0; - virtual unsigned short readStatus_SysDisableCount(tRioStatusCode *status) = 0; - virtual unsigned short readStatus_PowerDisableCount(tRioStatusCode *status) = 0; - - - typedef enum - { - } tCommand_IfaceConstants; - - virtual void writeCommand(unsigned short value, tRioStatusCode *status) = 0; - virtual unsigned short readCommand(tRioStatusCode *status) = 0; - - - typedef enum - { - } tChallenge_IfaceConstants; - - virtual unsigned char readChallenge(tRioStatusCode *status) = 0; - - - typedef enum - { - } tActive_IfaceConstants; - - virtual void writeActive(bool value, tRioStatusCode *status) = 0; - virtual bool readActive(tRioStatusCode *status) = 0; - - - typedef enum - { - } tTimer_IfaceConstants; - - virtual unsigned int readTimer(tRioStatusCode *status) = 0; - - - - -private: - tSysWatchdog(const tSysWatchdog&); - void operator=(const tSysWatchdog&); -}; - -} -} - -#endif // __nFRC_2015_1_0_4_SysWatchdog_h__ +// Copyright (c) National Instruments 2008. All Rights Reserved. +// Do Not Edit... this file is generated! + +#ifndef __nFRC_2015_1_0_5_SysWatchdog_h__ +#define __nFRC_2015_1_0_5_SysWatchdog_h__ + +#include "tSystemInterface.h" + +namespace nFPGA +{ +namespace nFRC_2015_1_0_5 +{ + +class tSysWatchdog +{ +public: + tSysWatchdog(){} + virtual ~tSysWatchdog(){} + + virtual tSystemInterface* getSystemInterface() = 0; + static tSysWatchdog* create(tRioStatusCode *status); + + typedef enum + { + kNumSystems = 1, + } tIfaceConstants; + + typedef + union{ + struct{ +#ifdef __vxworks + unsigned SystemActive : 1; + unsigned PowerAlive : 1; + unsigned SysDisableCount : 15; + unsigned PowerDisableCount : 15; +#else + unsigned PowerDisableCount : 15; + unsigned SysDisableCount : 15; + unsigned PowerAlive : 1; + unsigned SystemActive : 1; +#endif + }; + struct{ + unsigned value : 32; + }; + } tStatus; + + + + typedef enum + { + } tStatus_IfaceConstants; + + virtual tStatus readStatus(tRioStatusCode *status) = 0; + virtual bool readStatus_SystemActive(tRioStatusCode *status) = 0; + virtual bool readStatus_PowerAlive(tRioStatusCode *status) = 0; + virtual unsigned short readStatus_SysDisableCount(tRioStatusCode *status) = 0; + virtual unsigned short readStatus_PowerDisableCount(tRioStatusCode *status) = 0; + + + typedef enum + { + } tCommand_IfaceConstants; + + virtual void writeCommand(unsigned short value, tRioStatusCode *status) = 0; + virtual unsigned short readCommand(tRioStatusCode *status) = 0; + + + typedef enum + { + } tChallenge_IfaceConstants; + + virtual unsigned char readChallenge(tRioStatusCode *status) = 0; + + + typedef enum + { + } tActive_IfaceConstants; + + virtual void writeActive(bool value, tRioStatusCode *status) = 0; + virtual bool readActive(tRioStatusCode *status) = 0; + + + typedef enum + { + } tTimer_IfaceConstants; + + virtual unsigned int readTimer(tRioStatusCode *status) = 0; + + + + +private: + tSysWatchdog(const tSysWatchdog&); + void operator=(const tSysWatchdog&); +}; + +} +} + +#endif // __nFRC_2015_1_0_5_SysWatchdog_h__ diff --git a/hal/lib/Athena/ChipObject/tSystem.h b/hal/lib/Athena/ChipObject/tSystem.h index eb55be1772..412d76d701 100644 --- a/hal/lib/Athena/ChipObject/tSystem.h +++ b/hal/lib/Athena/ChipObject/tSystem.h @@ -1,47 +1,47 @@ -// Base class for generated chip objects -// Copyright (c) National Instruments 2008. All Rights Reserved. - -#ifndef __tSystem_h__ -#define __tSystem_h__ - -#include "fpgainterfacecapi/NiFpga.h" -typedef NiFpga_Status tRioStatusCode; - -#define FRC_FPGA_PRELOAD_BITFILE - -typedef uint32_t NiFpga_Session; - -namespace nFPGA -{ - -class tSystem -{ -public: - tSystem(tRioStatusCode *status); - ~tSystem(); - void getFpgaGuid(uint32_t *guid_ptr, tRioStatusCode *status); - -protected: - static NiFpga_Session _DeviceHandle; - -#ifdef FRC_FPGA_PRELOAD_BITFILE - void NiFpga_SharedOpen_common(const char* bitfile); - NiFpga_Status NiFpga_SharedOpen(const char* bitfile, - const char* signature, - const char* resource, - uint32_t attribute, - NiFpga_Session* session); - NiFpga_Status NiFpgaLv_SharedOpen(const char* const bitfile, - const char* const apiSignature, - const char* const resource, - const uint32_t attribute, - NiFpga_Session* const session); -private: - static char *_FileName; - static char *_Bitfile; -#endif -}; - -} - -#endif // __tSystem_h__ +// Base class for generated chip objects +// Copyright (c) National Instruments 2008. All Rights Reserved. + +#ifndef __tSystem_h__ +#define __tSystem_h__ + +#include "fpgainterfacecapi/NiFpga.h" +typedef NiFpga_Status tRioStatusCode; + +#define FRC_FPGA_PRELOAD_BITFILE + +typedef uint32_t NiFpga_Session; + +namespace nFPGA +{ + +class tSystem +{ +public: + tSystem(tRioStatusCode *status); + ~tSystem(); + void getFpgaGuid(uint32_t *guid_ptr, tRioStatusCode *status); + +protected: + static NiFpga_Session _DeviceHandle; + +#ifdef FRC_FPGA_PRELOAD_BITFILE + void NiFpga_SharedOpen_common(const char* bitfile); + NiFpga_Status NiFpga_SharedOpen(const char* bitfile, + const char* signature, + const char* resource, + uint32_t attribute, + NiFpga_Session* session); + NiFpga_Status NiFpgaLv_SharedOpen(const char* const bitfile, + const char* const apiSignature, + const char* const resource, + const uint32_t attribute, + NiFpga_Session* const session); +private: + static char *_FileName; + static char *_Bitfile; +#endif +}; + +} + +#endif // __tSystem_h__ diff --git a/hal/lib/Athena/ChipObject/tSystemInterface.h b/hal/lib/Athena/ChipObject/tSystemInterface.h index d5008e1f5a..d13e93222b 100644 --- a/hal/lib/Athena/ChipObject/tSystemInterface.h +++ b/hal/lib/Athena/ChipObject/tSystemInterface.h @@ -1,26 +1,26 @@ -// Copyright (c) National Instruments 2008. All Rights Reserved. - -#ifndef __tSystemInterface_h__ -#define __tSystemInterface_h__ - -namespace nFPGA -{ - -class tSystemInterface -{ -public: - tSystemInterface(){} - virtual ~tSystemInterface(){} - - virtual uint16_t getExpectedFPGAVersion()=0; - virtual uint32_t getExpectedFPGARevision()=0; - virtual uint32_t * getExpectedFPGASignature()=0; - virtual void getHardwareFpgaSignature(uint32_t *guid_ptr, tRioStatusCode *status)=0; - virtual uint32_t getLVHandle(tRioStatusCode *status)=0; - virtual uint32_t getHandle()=0; -}; - -} - -#endif // __tSystemInterface_h__ - +// Copyright (c) National Instruments 2008. All Rights Reserved. + +#ifndef __tSystemInterface_h__ +#define __tSystemInterface_h__ + +namespace nFPGA +{ + +class tSystemInterface +{ +public: + tSystemInterface(){} + virtual ~tSystemInterface(){} + + virtual const uint16_t getExpectedFPGAVersion()=0; + virtual const uint32_t getExpectedFPGARevision()=0; + virtual const uint32_t * const getExpectedFPGASignature()=0; + virtual void getHardwareFpgaSignature(uint32_t *guid_ptr, tRioStatusCode *status)=0; + virtual uint32_t getLVHandle(tRioStatusCode *status)=0; + virtual uint32_t getHandle()=0; +}; + +} + +#endif // __tSystemInterface_h__ + diff --git a/hal/lib/Athena/ChipObject/tWatchdog.h b/hal/lib/Athena/ChipObject/tWatchdog.h new file mode 100644 index 0000000000..a589eda553 --- /dev/null +++ b/hal/lib/Athena/ChipObject/tWatchdog.h @@ -0,0 +1,108 @@ +// Copyright (c) National Instruments 2008. All Rights Reserved. +// Do Not Edit... this file is generated! + +#ifndef __nFRC_2012_1_6_4_Watchdog_h__ +#define __nFRC_2012_1_6_4_Watchdog_h__ + +#include "tSystemInterface.h" + +namespace nFPGA +{ +namespace nFRC_2012_1_6_4 +{ + +class tWatchdog +{ +public: + tWatchdog(){} + virtual ~tWatchdog(){} + + virtual tSystemInterface* getSystemInterface() = 0; + static tWatchdog* create(tRioStatusCode *status); + + typedef enum + { + kNumSystems = 1, + } tIfaceConstants; + + typedef + union{ + struct{ +#ifdef __vxworks + unsigned SystemActive : 1; + unsigned Alive : 1; + unsigned SysDisableCount : 15; + unsigned DisableCount : 15; +#else + unsigned DisableCount : 15; + unsigned SysDisableCount : 15; + unsigned Alive : 1; + unsigned SystemActive : 1; +#endif + }; + struct{ + unsigned value : 32; + }; + } tStatus; + + + + typedef enum + { + } tStatus_IfaceConstants; + + virtual tStatus readStatus(tRioStatusCode *status) = 0; + virtual bool readStatus_SystemActive(tRioStatusCode *status) = 0; + virtual bool readStatus_Alive(tRioStatusCode *status) = 0; + virtual unsigned short readStatus_SysDisableCount(tRioStatusCode *status) = 0; + virtual unsigned short readStatus_DisableCount(tRioStatusCode *status) = 0; + + + typedef enum + { + } tKill_IfaceConstants; + + virtual void strobeKill(tRioStatusCode *status) = 0; + + + typedef enum + { + } tFeed_IfaceConstants; + + virtual void strobeFeed(tRioStatusCode *status) = 0; + + + typedef enum + { + } tTimer_IfaceConstants; + + virtual unsigned int readTimer(tRioStatusCode *status) = 0; + + + typedef enum + { + } tExpiration_IfaceConstants; + + virtual void writeExpiration(unsigned int value, tRioStatusCode *status) = 0; + virtual unsigned int readExpiration(tRioStatusCode *status) = 0; + + + typedef enum + { + } tImmortal_IfaceConstants; + + virtual void writeImmortal(bool value, tRioStatusCode *status) = 0; + virtual bool readImmortal(tRioStatusCode *status) = 0; + + + + +private: + tWatchdog(const tWatchdog&); + void operator=(const tWatchdog&); +}; + +} +} + +#endif // __nFRC_2012_1_6_4_Watchdog_h__ diff --git a/hal/lib/Athena/NetworkCommunication/AICalibration.h b/hal/lib/Athena/NetworkCommunication/AICalibration.h index 39755bda89..b2f366c5bd 100644 --- a/hal/lib/Athena/NetworkCommunication/AICalibration.h +++ b/hal/lib/Athena/NetworkCommunication/AICalibration.h @@ -1,19 +1,19 @@ - -#ifndef __AICalibration_h__ -#define __AICalibration_h__ - -#include - -#ifdef __cplusplus -extern "C" -{ -#endif - - uint32_t FRC_NetworkCommunication_nAICalibration_getLSBWeight(const uint32_t aiSystemIndex, const uint32_t channel, int32_t *status); - int32_t FRC_NetworkCommunication_nAICalibration_getOffset(const uint32_t aiSystemIndex, const uint32_t channel, int32_t *status); - -#ifdef __cplusplus -} -#endif - -#endif // __AICalibration_h__ + +#ifndef __AICalibration_h__ +#define __AICalibration_h__ + +#include + +#ifdef __cplusplus +extern "C" +{ +#endif + + uint32_t FRC_NetworkCommunication_nAICalibration_getLSBWeight(const uint32_t aiSystemIndex, const uint32_t channel, int32_t *status); + int32_t FRC_NetworkCommunication_nAICalibration_getOffset(const uint32_t aiSystemIndex, const uint32_t channel, int32_t *status); + +#ifdef __cplusplus +} +#endif + +#endif // __AICalibration_h__ diff --git a/hal/lib/Athena/NetworkCommunication/CANInterfacePlugin.h b/hal/lib/Athena/NetworkCommunication/CANInterfacePlugin.h index a637eb1d9b..a973c31d2a 100644 --- a/hal/lib/Athena/NetworkCommunication/CANInterfacePlugin.h +++ b/hal/lib/Athena/NetworkCommunication/CANInterfacePlugin.h @@ -1,61 +1,61 @@ -// CANInterfacePlugin.h -// -// Defines the API for building a CAN Interface Plugin to support -// PWM-cable-free CAN motor control on FRC robots. This allows you -// to connect any CAN interface to the secure Jaguar CAN driver. -// - -#ifndef __CANInterfacePlugin_h__ -#define __CANInterfacePlugin_h__ - -#include - -#define CAN_IS_FRAME_REMOTE 0x80000000 -#define CAN_MESSAGE_ID_MASK 0x1FFFFFFF - -class CANInterfacePlugin -{ -public: - CANInterfacePlugin() {} - virtual ~CANInterfacePlugin() {} - - /** - * This entry-point of the CANInterfacePlugin is passed a message that the driver needs to send to - * a device on the CAN bus. - * - * This function may be called from multiple contexts and must therefore be reentrant. - * - * @param messageID The 29-bit CAN message ID in the lsbs. The msb can indicate a remote frame. - * @param data A pointer to a buffer containing between 0 and 8 bytes to send with the message. May be NULL if dataSize is 0. - * @param dataSize The number of bytes to send with the message. - * @return Return any error code. On success return 0. - */ - virtual int32_t sendMessage(uint32_t messageID, const uint8_t *data, uint8_t dataSize) = 0; - - /** - * This entry-point of the CANInterfacePlugin is passed buffers which should be populated with - * any received messages from devices on the CAN bus. - * - * This function is always called by a single task in the Jaguar driver, so it need not be reentrant. - * - * This function is expected to block for some period of time waiting for a message from the CAN bus. - * It may timeout periodically (returning non-zero to indicate no message was populated) to allow for - * shutdown and unloading of the plugin. - * - * @param messageID A reference to be populated with a received 29-bit CAN message ID in the lsbs. - * @param data A pointer to a buffer of 8 bytes to be populated with data received with the message. - * @param dataSize A reference to be populated with the size of the data received (0 - 8 bytes). - * @return This should return 0 if a message was populated, non-0 if no message was not populated. - */ - virtual int32_t receiveMessage(uint32_t &messageID, uint8_t *data, uint8_t &dataSize) = 0; -}; - -/** - * This function allows you to register a CANInterfacePlugin to provide access a CAN bus. - * - * @param interface A pointer to an object that inherits from CANInterfacePlugin and implements - * the pure virtual interface. If NULL, unregister the current plugin. - */ -void FRC_NetworkCommunication_JaguarCANDriver_registerInterface(CANInterfacePlugin* interface); - -#endif // __CANInterfacePlugin_h__ +// CANInterfacePlugin.h +// +// Defines the API for building a CAN Interface Plugin to support +// PWM-cable-free CAN motor control on FRC robots. This allows you +// to connect any CAN interface to the secure Jaguar CAN driver. +// + +#ifndef __CANInterfacePlugin_h__ +#define __CANInterfacePlugin_h__ + +#include + +#define CAN_IS_FRAME_REMOTE 0x80000000 +#define CAN_MESSAGE_ID_MASK 0x1FFFFFFF + +class CANInterfacePlugin +{ +public: + CANInterfacePlugin() {} + virtual ~CANInterfacePlugin() {} + + /** + * This entry-point of the CANInterfacePlugin is passed a message that the driver needs to send to + * a device on the CAN bus. + * + * This function may be called from multiple contexts and must therefore be reentrant. + * + * @param messageID The 29-bit CAN message ID in the lsbs. The msb can indicate a remote frame. + * @param data A pointer to a buffer containing between 0 and 8 bytes to send with the message. May be NULL if dataSize is 0. + * @param dataSize The number of bytes to send with the message. + * @return Return any error code. On success return 0. + */ + virtual int32_t sendMessage(uint32_t messageID, const uint8_t *data, uint8_t dataSize) = 0; + + /** + * This entry-point of the CANInterfacePlugin is passed buffers which should be populated with + * any received messages from devices on the CAN bus. + * + * This function is always called by a single task in the Jaguar driver, so it need not be reentrant. + * + * This function is expected to block for some period of time waiting for a message from the CAN bus. + * It may timeout periodically (returning non-zero to indicate no message was populated) to allow for + * shutdown and unloading of the plugin. + * + * @param messageID A reference to be populated with a received 29-bit CAN message ID in the lsbs. + * @param data A pointer to a buffer of 8 bytes to be populated with data received with the message. + * @param dataSize A reference to be populated with the size of the data received (0 - 8 bytes). + * @return This should return 0 if a message was populated, non-0 if no message was not populated. + */ + virtual int32_t receiveMessage(uint32_t &messageID, uint8_t *data, uint8_t &dataSize) = 0; +}; + +/** + * This function allows you to register a CANInterfacePlugin to provide access a CAN bus. + * + * @param interface A pointer to an object that inherits from CANInterfacePlugin and implements + * the pure virtual interface. If NULL, unregister the current plugin. + */ +void FRC_NetworkCommunication_JaguarCANDriver_registerInterface(CANInterfacePlugin* interface); + +#endif // __CANInterfacePlugin_h__ diff --git a/hal/lib/Athena/NetworkCommunication/FRCComm.h b/hal/lib/Athena/NetworkCommunication/FRCComm.h index ae248900ee..4d40d237d4 100644 --- a/hal/lib/Athena/NetworkCommunication/FRCComm.h +++ b/hal/lib/Athena/NetworkCommunication/FRCComm.h @@ -1,201 +1,201 @@ -/************************************************************* - * NOTICE - * - * These are the only externally exposed functions to the - * NetworkCommunication library - * - * This is an implementation of FRC Spec for Comm Protocol - * Revision 4.5, June 30, 2008 - * - * Copyright (c) National Instruments 2008. All Rights Reserved. - * - *************************************************************/ - -#ifndef __FRC_COMM_H__ -#define __FRC_COMM_H__ - -#ifdef SIMULATION -#include -#ifdef USE_THRIFT -#define EXPORT_FUNC -#else -#define EXPORT_FUNC __declspec(dllexport) __cdecl -#endif -#else -#if defined(__vxworks) -#include -#define EXPORT_FUNC -#else -#include -#include -#define EXPORT_FUNC -#endif -#endif - -// Commandeer some bytes at the end for advanced I/O feedback. -#define IO_CONFIG_DATA_SIZE 32 -#define SYS_STATUS_DATA_SIZE 44 -#define USER_STATUS_DATA_SIZE (984 - IO_CONFIG_DATA_SIZE - SYS_STATUS_DATA_SIZE) -#define USER_DS_LCD_DATA_SIZE 128 - -struct FRCCommonControlData{ - uint16_t packetIndex; - union { - uint8_t control; -#ifndef __vxworks - struct { - uint8_t checkVersions :1; - uint8_t test :1; - uint8_t resync : 1; - uint8_t fmsAttached:1; - uint8_t autonomous : 1; - uint8_t enabled : 1; - uint8_t notEStop : 1; - uint8_t reset : 1; - }; -#else - struct { - uint8_t reset : 1; - uint8_t notEStop : 1; - uint8_t enabled : 1; - uint8_t autonomous : 1; - uint8_t fmsAttached:1; - uint8_t resync : 1; - uint8_t test :1; - uint8_t checkVersions :1; - }; -#endif - }; - uint8_t dsDigitalIn; - uint16_t teamID; - - char dsID_Alliance; - char dsID_Position; - - union { - int8_t stick0Axes[6]; - struct { - int8_t stick0Axis1; - int8_t stick0Axis2; - int8_t stick0Axis3; - int8_t stick0Axis4; - int8_t stick0Axis5; - int8_t stick0Axis6; - }; - }; - uint16_t stick0Buttons; // Left-most 4 bits are unused - - union { - int8_t stick1Axes[6]; - struct { - int8_t stick1Axis1; - int8_t stick1Axis2; - int8_t stick1Axis3; - int8_t stick1Axis4; - int8_t stick1Axis5; - int8_t stick1Axis6; - }; - }; - uint16_t stick1Buttons; // Left-most 4 bits are unused - - union { - int8_t stick2Axes[6]; - struct { - int8_t stick2Axis1; - int8_t stick2Axis2; - int8_t stick2Axis3; - int8_t stick2Axis4; - int8_t stick2Axis5; - int8_t stick2Axis6; - }; - }; - uint16_t stick2Buttons; // Left-most 4 bits are unused - - union { - int8_t stick3Axes[6]; - struct { - int8_t stick3Axis1; - int8_t stick3Axis2; - int8_t stick3Axis3; - int8_t stick3Axis4; - int8_t stick3Axis5; - int8_t stick3Axis6; - }; - }; - uint16_t stick3Buttons; // Left-most 4 bits are unused - - //Analog inputs are 10 bit right-justified - uint16_t analog1; - uint16_t analog2; - uint16_t analog3; - uint16_t analog4; - - uint64_t cRIOChecksum; - uint32_t FPGAChecksum0; - uint32_t FPGAChecksum1; - uint32_t FPGAChecksum2; - uint32_t FPGAChecksum3; - - char versionData[8]; -}; - -#define kFRC_NetworkCommunication_DynamicType_DSEnhancedIO_Input 17 -#define kFRC_NetworkCommunication_DynamicType_DSEnhancedIO_Output 18 -#define kFRC_NetworkCommunication_DynamicType_Kinect_Header 19 -#define kFRC_NetworkCommunication_DynamicType_Kinect_Extra1 20 -#define kFRC_NetworkCommunication_DynamicType_Kinect_Vertices1 21 -#define kFRC_NetworkCommunication_DynamicType_Kinect_Extra2 22 -#define kFRC_NetworkCommunication_DynamicType_Kinect_Vertices2 23 -#define kFRC_NetworkCommunication_DynamicType_Kinect_Joystick 24 -#define kFRC_NetworkCommunication_DynamicType_Kinect_Custom 25 - -#ifdef __cplusplus -extern "C" { -#endif -#ifndef SIMULATION - void EXPORT_FUNC getFPGAHardwareVersion(uint16_t *fpgaVersion, uint32_t *fpgaRevision); -#endif - int EXPORT_FUNC getCommonControlData(struct FRCCommonControlData *data, int wait_ms); - int EXPORT_FUNC getRecentCommonControlData(struct FRCCommonControlData *commonData, int wait_ms); - int EXPORT_FUNC getRecentStatusData(uint8_t *batteryInt, uint8_t *batteryDec, uint8_t *dsDigitalOut, int wait_ms); - int EXPORT_FUNC getDynamicControlData(uint8_t type, char *dynamicData, int32_t maxLength, int wait_ms); - int EXPORT_FUNC setStatusData(float battery, uint8_t dsDigitalOut, uint8_t updateNumber, - const char *userDataHigh, int userDataHighLength, - const char *userDataLow, int userDataLowLength, int wait_ms); - int EXPORT_FUNC setStatusDataFloatAsInt(int battery, uint8_t dsDigitalOut, uint8_t updateNumber, - const char *userDataHigh, int userDataHighLength, - const char *userDataLow, int userDataLowLength, int wait_ms); - int EXPORT_FUNC setErrorData(const char *errors, int errorsLength, int wait_ms); - int EXPORT_FUNC setUserDsLcdData(const char *userDsLcdData, int userDsLcdDataLength, int wait_ms); - int EXPORT_FUNC overrideIOConfig(const char *ioConfig, int wait_ms); - -#ifdef SIMULATION - void EXPORT_FUNC setNewDataSem(HANDLE); -#else -# if defined (__vxworks) - void EXPORT_FUNC setNewDataSem(SEM_ID); - void EXPORT_FUNC setResyncSem(SEM_ID); -# else - void EXPORT_FUNC setNewDataSem(pthread_mutex_t *); - void EXPORT_FUNC setResyncSem(pthread_mutex_t *); -# endif - void EXPORT_FUNC signalResyncActionDone(void); -#endif - - // this uint32_t is really a LVRefNum - void EXPORT_FUNC setNewDataOccurRef(uint32_t refnum); -#ifndef SIMULATION - void EXPORT_FUNC setResyncOccurRef(uint32_t refnum); -#endif - - void EXPORT_FUNC FRC_NetworkCommunication_getVersionString(char *version); - void EXPORT_FUNC FRC_NetworkCommunication_observeUserProgramStarting(void); - void EXPORT_FUNC FRC_NetworkCommunication_observeUserProgramDisabled(void); - void EXPORT_FUNC FRC_NetworkCommunication_observeUserProgramAutonomous(void); - void EXPORT_FUNC FRC_NetworkCommunication_observeUserProgramTeleop(void); - void EXPORT_FUNC FRC_NetworkCommunication_observeUserProgramTest(void); -#ifdef __cplusplus -} -#endif - -#endif +/************************************************************* + * NOTICE + * + * These are the only externally exposed functions to the + * NetworkCommunication library + * + * This is an implementation of FRC Spec for Comm Protocol + * Revision 4.5, June 30, 2008 + * + * Copyright (c) National Instruments 2008. All Rights Reserved. + * + *************************************************************/ + +#ifndef __FRC_COMM_H__ +#define __FRC_COMM_H__ + +#ifdef SIMULATION +#include +#ifdef USE_THRIFT +#define EXPORT_FUNC +#else +#define EXPORT_FUNC __declspec(dllexport) __cdecl +#endif +#else +#if defined(__vxworks) +#include +#define EXPORT_FUNC +#else +#include +#include +#define EXPORT_FUNC +#endif +#endif + +// Commandeer some bytes at the end for advanced I/O feedback. +#define IO_CONFIG_DATA_SIZE 32 +#define SYS_STATUS_DATA_SIZE 44 +#define USER_STATUS_DATA_SIZE (984 - IO_CONFIG_DATA_SIZE - SYS_STATUS_DATA_SIZE) +#define USER_DS_LCD_DATA_SIZE 128 + +struct FRCCommonControlData{ + uint16_t packetIndex; + union { + uint8_t control; +#ifndef __vxworks + struct { + uint8_t checkVersions :1; + uint8_t test :1; + uint8_t resync : 1; + uint8_t fmsAttached:1; + uint8_t autonomous : 1; + uint8_t enabled : 1; + uint8_t notEStop : 1; + uint8_t reset : 1; + }; +#else + struct { + uint8_t reset : 1; + uint8_t notEStop : 1; + uint8_t enabled : 1; + uint8_t autonomous : 1; + uint8_t fmsAttached:1; + uint8_t resync : 1; + uint8_t test :1; + uint8_t checkVersions :1; + }; +#endif + }; + uint8_t dsDigitalIn; + uint16_t teamID; + + char dsID_Alliance; + char dsID_Position; + + union { + int8_t stick0Axes[6]; + struct { + int8_t stick0Axis1; + int8_t stick0Axis2; + int8_t stick0Axis3; + int8_t stick0Axis4; + int8_t stick0Axis5; + int8_t stick0Axis6; + }; + }; + uint16_t stick0Buttons; // Left-most 4 bits are unused + + union { + int8_t stick1Axes[6]; + struct { + int8_t stick1Axis1; + int8_t stick1Axis2; + int8_t stick1Axis3; + int8_t stick1Axis4; + int8_t stick1Axis5; + int8_t stick1Axis6; + }; + }; + uint16_t stick1Buttons; // Left-most 4 bits are unused + + union { + int8_t stick2Axes[6]; + struct { + int8_t stick2Axis1; + int8_t stick2Axis2; + int8_t stick2Axis3; + int8_t stick2Axis4; + int8_t stick2Axis5; + int8_t stick2Axis6; + }; + }; + uint16_t stick2Buttons; // Left-most 4 bits are unused + + union { + int8_t stick3Axes[6]; + struct { + int8_t stick3Axis1; + int8_t stick3Axis2; + int8_t stick3Axis3; + int8_t stick3Axis4; + int8_t stick3Axis5; + int8_t stick3Axis6; + }; + }; + uint16_t stick3Buttons; // Left-most 4 bits are unused + + //Analog inputs are 10 bit right-justified + uint16_t analog1; + uint16_t analog2; + uint16_t analog3; + uint16_t analog4; + + uint64_t cRIOChecksum; + uint32_t FPGAChecksum0; + uint32_t FPGAChecksum1; + uint32_t FPGAChecksum2; + uint32_t FPGAChecksum3; + + char versionData[8]; +}; + +#define kFRC_NetworkCommunication_DynamicType_DSEnhancedIO_Input 17 +#define kFRC_NetworkCommunication_DynamicType_DSEnhancedIO_Output 18 +#define kFRC_NetworkCommunication_DynamicType_Kinect_Header 19 +#define kFRC_NetworkCommunication_DynamicType_Kinect_Extra1 20 +#define kFRC_NetworkCommunication_DynamicType_Kinect_Vertices1 21 +#define kFRC_NetworkCommunication_DynamicType_Kinect_Extra2 22 +#define kFRC_NetworkCommunication_DynamicType_Kinect_Vertices2 23 +#define kFRC_NetworkCommunication_DynamicType_Kinect_Joystick 24 +#define kFRC_NetworkCommunication_DynamicType_Kinect_Custom 25 + +#ifdef __cplusplus +extern "C" { +#endif +#ifndef SIMULATION + void EXPORT_FUNC getFPGAHardwareVersion(uint16_t *fpgaVersion, uint32_t *fpgaRevision); +#endif + int EXPORT_FUNC getCommonControlData(struct FRCCommonControlData *data, int wait_ms); + int EXPORT_FUNC getRecentCommonControlData(struct FRCCommonControlData *commonData, int wait_ms); + int EXPORT_FUNC getRecentStatusData(uint8_t *batteryInt, uint8_t *batteryDec, uint8_t *dsDigitalOut, int wait_ms); + int EXPORT_FUNC getDynamicControlData(uint8_t type, char *dynamicData, int32_t maxLength, int wait_ms); + int EXPORT_FUNC setStatusData(float battery, uint8_t dsDigitalOut, uint8_t updateNumber, + const char *userDataHigh, int userDataHighLength, + const char *userDataLow, int userDataLowLength, int wait_ms); + int EXPORT_FUNC setStatusDataFloatAsInt(int battery, uint8_t dsDigitalOut, uint8_t updateNumber, + const char *userDataHigh, int userDataHighLength, + const char *userDataLow, int userDataLowLength, int wait_ms); + int EXPORT_FUNC setErrorData(const char *errors, int errorsLength, int wait_ms); + int EXPORT_FUNC setUserDsLcdData(const char *userDsLcdData, int userDsLcdDataLength, int wait_ms); + int EXPORT_FUNC overrideIOConfig(const char *ioConfig, int wait_ms); + +#ifdef SIMULATION + void EXPORT_FUNC setNewDataSem(HANDLE); +#else +# if defined (__vxworks) + void EXPORT_FUNC setNewDataSem(SEM_ID); + void EXPORT_FUNC setResyncSem(SEM_ID); +# else + void EXPORT_FUNC setNewDataSem(pthread_mutex_t *); + void EXPORT_FUNC setResyncSem(pthread_mutex_t *); +# endif + void EXPORT_FUNC signalResyncActionDone(void); +#endif + + // this uint32_t is really a LVRefNum + void EXPORT_FUNC setNewDataOccurRef(uint32_t refnum); +#ifndef SIMULATION + void EXPORT_FUNC setResyncOccurRef(uint32_t refnum); +#endif + + void EXPORT_FUNC FRC_NetworkCommunication_getVersionString(char *version); + void EXPORT_FUNC FRC_NetworkCommunication_observeUserProgramStarting(void); + void EXPORT_FUNC FRC_NetworkCommunication_observeUserProgramDisabled(void); + void EXPORT_FUNC FRC_NetworkCommunication_observeUserProgramAutonomous(void); + void EXPORT_FUNC FRC_NetworkCommunication_observeUserProgramTeleop(void); + void EXPORT_FUNC FRC_NetworkCommunication_observeUserProgramTest(void); +#ifdef __cplusplus +} +#endif + +#endif diff --git a/hal/lib/Athena/NetworkCommunication/JaguarCANDriver.h b/hal/lib/Athena/NetworkCommunication/JaguarCANDriver.h index 67797e6063..c7ded49749 100644 --- a/hal/lib/Athena/NetworkCommunication/JaguarCANDriver.h +++ b/hal/lib/Athena/NetworkCommunication/JaguarCANDriver.h @@ -1,56 +1,56 @@ -// JaguarCANDriver.h -// -// Defines the API for building a CAN Interface Plugin to support -// PWM-cable-free CAN motor control on FRC robots. This allows you -// to connect any CAN interface to the secure Jaguar CAN driver. -// - -#ifndef __JaguarCANDriver_h__ -#define __JaguarCANDriver_h__ - -#if defined(__vxworks) -#include -#else -#include -#include -#endif -#ifdef USE_THRIFT -#include "NetCommRPCComm.h" -#include -#endif -namespace nJaguarCANDriver -{ - void sendMessage_wrapper(uint32_t messageID, const uint8_t *data, uint8_t dataSize, int32_t *status); - void receiveMessage_wrapper(uint32_t *messageID, uint8_t *data, uint8_t *dataSize, uint32_t timeoutMs, int32_t *status); - int32_t receiveMessageStart_wrapper(uint32_t messageID, uint32_t occurRefNum, uint32_t timeoutMs, int32_t *status); -#if defined (__vxworks) - int32_t receiveMessageStart_sem_wrapper(uint32_t messageID, uint32_t semaphoreID, uint32_t timeoutMs, int32_t *status); -#else - int32_t receiveMessageStart_mutex_wrapper(uint32_t messageID, pthread_mutex_t *mutex, uint32_t timeoutMs, int32_t *status); -#endif - void receiveMessageComplete_wrapper(uint32_t *messageID, uint8_t *data, uint8_t *dataSize, int32_t *status); -#ifdef USE_THRIFT - void checkEvent_CAN(std::vector< CANEvent >& events); -#endif -} - -#ifdef __cplusplus -extern "C" -{ -#endif - - void FRC_NetworkCommunication_JaguarCANDriver_sendMessage(uint32_t messageID, const uint8_t *data, uint8_t dataSize, int32_t *status); - void FRC_NetworkCommunication_JaguarCANDriver_receiveMessage(uint32_t *messageID, uint8_t *data, uint8_t *dataSize, uint32_t timeoutMs, int32_t *status); - int32_t FRC_NetworkCommunication_JaguarCANDriver_receiveMessageStart(uint32_t messageID, uint32_t occurRefNum, uint32_t timeoutMs, int32_t *status); -#if defined (__vxworks) - int32_t FRC_NetworkCommunication_JaguarCANDriver_receiveMessageStart_sem(uint32_t messageID, uint32_t semaphoreID, uint32_t timeoutMs, int32_t *status); -#else - int32_t FRC_NetworkCommunication_JaguarCANDriver_receiveMessageStart_mutex(uint32_t messageID, pthread_mutex_t *mutex, uint32_t timeoutMs, int32_t *status); -#endif - void FRC_NetworkCommunication_JaguarCANDriver_receiveMessageComplete(uint32_t *messageID, uint8_t *data, uint8_t *dataSize, int32_t *status); - -#ifdef __cplusplus -} -#endif - -#endif // __JaguarCANDriver_h__ +// JaguarCANDriver.h +// +// Defines the API for building a CAN Interface Plugin to support +// PWM-cable-free CAN motor control on FRC robots. This allows you +// to connect any CAN interface to the secure Jaguar CAN driver. +// + +#ifndef __JaguarCANDriver_h__ +#define __JaguarCANDriver_h__ + +#if defined(__vxworks) +#include +#else +#include +#include +#endif +#ifdef USE_THRIFT +#include "NetCommRPCComm.h" +#include +#endif +namespace nJaguarCANDriver +{ + void sendMessage_wrapper(uint32_t messageID, const uint8_t *data, uint8_t dataSize, int32_t *status); + void receiveMessage_wrapper(uint32_t *messageID, uint8_t *data, uint8_t *dataSize, uint32_t timeoutMs, int32_t *status); + int32_t receiveMessageStart_wrapper(uint32_t messageID, uint32_t occurRefNum, uint32_t timeoutMs, int32_t *status); +#if defined (__vxworks) + int32_t receiveMessageStart_sem_wrapper(uint32_t messageID, uint32_t semaphoreID, uint32_t timeoutMs, int32_t *status); +#else + int32_t receiveMessageStart_mutex_wrapper(uint32_t messageID, pthread_mutex_t *mutex, uint32_t timeoutMs, int32_t *status); +#endif + void receiveMessageComplete_wrapper(uint32_t *messageID, uint8_t *data, uint8_t *dataSize, int32_t *status); +#ifdef USE_THRIFT + void checkEvent_CAN(std::vector< CANEvent >& events); +#endif +} + +#ifdef __cplusplus +extern "C" +{ +#endif + + void FRC_NetworkCommunication_JaguarCANDriver_sendMessage(uint32_t messageID, const uint8_t *data, uint8_t dataSize, int32_t *status); + void FRC_NetworkCommunication_JaguarCANDriver_receiveMessage(uint32_t *messageID, uint8_t *data, uint8_t *dataSize, uint32_t timeoutMs, int32_t *status); + int32_t FRC_NetworkCommunication_JaguarCANDriver_receiveMessageStart(uint32_t messageID, uint32_t occurRefNum, uint32_t timeoutMs, int32_t *status); +#if defined (__vxworks) + int32_t FRC_NetworkCommunication_JaguarCANDriver_receiveMessageStart_sem(uint32_t messageID, uint32_t semaphoreID, uint32_t timeoutMs, int32_t *status); +#else + int32_t FRC_NetworkCommunication_JaguarCANDriver_receiveMessageStart_mutex(uint32_t messageID, pthread_mutex_t *mutex, uint32_t timeoutMs, int32_t *status); +#endif + void FRC_NetworkCommunication_JaguarCANDriver_receiveMessageComplete(uint32_t *messageID, uint8_t *data, uint8_t *dataSize, int32_t *status); + +#ifdef __cplusplus +} +#endif + +#endif // __JaguarCANDriver_h__ diff --git a/hal/lib/Athena/NetworkCommunication/LoadOut.h b/hal/lib/Athena/NetworkCommunication/LoadOut.h index 0304b30665..2433b0cc71 100644 --- a/hal/lib/Athena/NetworkCommunication/LoadOut.h +++ b/hal/lib/Athena/NetworkCommunication/LoadOut.h @@ -1,52 +1,52 @@ - -#ifndef __LoadOut_h__ -#define __LoadOut_h__ - -#ifdef SIMULATION -#include -#define EXPORT_FUNC __declspec(dllexport) __cdecl -#elif defined (__vxworks) -#include -#define EXPORT_FUNC -#else -#include -#define EXPORT_FUNC -#endif - -#define kMaxModuleNumber 2 -namespace nLoadOut -{ - typedef enum { - kModuleType_Unknown = 0x00, - kModuleType_Analog = 0x01, - kModuleType_Digital = 0x02, - kModuleType_Solenoid = 0x03, - } tModuleType; - bool EXPORT_FUNC getModulePresence(tModuleType moduleType, uint8_t moduleNumber); - typedef enum { - kTargetClass_Unknown = 0x00, - kTargetClass_FRC1 = 0x10, - kTargetClass_FRC2 = 0x20, - kTargetClass_FRC3 = 0x30, - kTargetClass_RoboRIO = 0x40, - kTargetClass_FRC2_Analog = kTargetClass_FRC2 | kModuleType_Analog, - kTargetClass_FRC2_Digital = kTargetClass_FRC2 | kModuleType_Digital, - kTargetClass_FRC2_Solenoid = kTargetClass_FRC2 | kModuleType_Solenoid, - kTargetClass_FamilyMask = 0xF0, - kTargetClass_ModuleMask = 0x0F, - } tTargetClass; - tTargetClass EXPORT_FUNC getTargetClass(); -} - -#ifdef __cplusplus -extern "C" { -#endif - - uint32_t EXPORT_FUNC FRC_NetworkCommunication_nLoadOut_getModulePresence(uint32_t moduleType, uint8_t moduleNumber); - uint32_t EXPORT_FUNC FRC_NetworkCommunication_nLoadOut_getTargetClass(); - -#ifdef __cplusplus -} -#endif - -#endif // __LoadOut_h__ + +#ifndef __LoadOut_h__ +#define __LoadOut_h__ + +#ifdef SIMULATION +#include +#define EXPORT_FUNC __declspec(dllexport) __cdecl +#elif defined (__vxworks) +#include +#define EXPORT_FUNC +#else +#include +#define EXPORT_FUNC +#endif + +#define kMaxModuleNumber 2 +namespace nLoadOut +{ + typedef enum { + kModuleType_Unknown = 0x00, + kModuleType_Analog = 0x01, + kModuleType_Digital = 0x02, + kModuleType_Solenoid = 0x03, + } tModuleType; + bool EXPORT_FUNC getModulePresence(tModuleType moduleType, uint8_t moduleNumber); + typedef enum { + kTargetClass_Unknown = 0x00, + kTargetClass_FRC1 = 0x10, + kTargetClass_FRC2 = 0x20, + kTargetClass_FRC3 = 0x30, + kTargetClass_RoboRIO = 0x40, + kTargetClass_FRC2_Analog = kTargetClass_FRC2 | kModuleType_Analog, + kTargetClass_FRC2_Digital = kTargetClass_FRC2 | kModuleType_Digital, + kTargetClass_FRC2_Solenoid = kTargetClass_FRC2 | kModuleType_Solenoid, + kTargetClass_FamilyMask = 0xF0, + kTargetClass_ModuleMask = 0x0F, + } tTargetClass; + tTargetClass EXPORT_FUNC getTargetClass(); +} + +#ifdef __cplusplus +extern "C" { +#endif + + uint32_t EXPORT_FUNC FRC_NetworkCommunication_nLoadOut_getModulePresence(uint32_t moduleType, uint8_t moduleNumber); + uint32_t EXPORT_FUNC FRC_NetworkCommunication_nLoadOut_getTargetClass(); + +#ifdef __cplusplus +} +#endif + +#endif // __LoadOut_h__ diff --git a/hal/lib/Athena/NetworkCommunication/UsageReporting.h b/hal/lib/Athena/NetworkCommunication/UsageReporting.h index 2c7499ea61..918ac5ae63 100644 --- a/hal/lib/Athena/NetworkCommunication/UsageReporting.h +++ b/hal/lib/Athena/NetworkCommunication/UsageReporting.h @@ -1,139 +1,139 @@ - -#ifndef __UsageReporting_h__ -#define __UsageReporting_h__ - -#ifdef SIMULATION -#include -#define EXPORT_FUNC __declspec(dllexport) __cdecl -#elif defined (__vxworks) -#include -#define EXPORT_FUNC -#else -#include -#include -#define EXPORT_FUNC -#endif - -#define kUsageReporting_version 1 - -namespace nUsageReporting -{ - typedef enum - { - kResourceType_Controller, - kResourceType_Module, - kResourceType_Language, - kResourceType_CANPlugin, - kResourceType_Accelerometer, - kResourceType_ADXL345, - kResourceType_AnalogChannel, - kResourceType_AnalogTrigger, - kResourceType_AnalogTriggerOutput, - kResourceType_CANJaguar, - kResourceType_Compressor, - kResourceType_Counter, - kResourceType_Dashboard, - kResourceType_DigitalInput, - kResourceType_DigitalOutput, - kResourceType_DriverStationCIO, - kResourceType_DriverStationEIO, - kResourceType_DriverStationLCD, - kResourceType_Encoder, - kResourceType_GearTooth, - kResourceType_Gyro, - kResourceType_I2C, - kResourceType_Framework, - kResourceType_Jaguar, - kResourceType_Joystick, - kResourceType_Kinect, - kResourceType_KinectStick, - kResourceType_PIDController, - kResourceType_Preferences, - kResourceType_PWM, - kResourceType_Relay, - kResourceType_RobotDrive, - kResourceType_SerialPort, - kResourceType_Servo, - kResourceType_Solenoid, - kResourceType_SPI, - kResourceType_Task, - kResourceType_Ultrasonic, - kResourceType_Victor, - kResourceType_Button, - kResourceType_Command, - kResourceType_AxisCamera, - kResourceType_PCVideoServer, - kResourceType_SmartDashboard, - kResourceType_Talon, - kResourceType_HiTechnicColorSensor, - kResourceType_HiTechnicAccel, - kResourceType_HiTechnicCompass, - kResourceType_SRF08, - } tResourceType; - - typedef enum - { - kLanguage_LabVIEW = 1, - kLanguage_CPlusPlus = 2, - kLanguage_Java = 3, - kLanguage_Python = 4, - - kCANPlugin_BlackJagBridge = 1, - kCANPlugin_2CAN = 2, - - kFramework_Iterative = 1, - kFramework_Simple = 2, - - kRobotDrive_ArcadeStandard = 1, - kRobotDrive_ArcadeButtonSpin = 2, - kRobotDrive_ArcadeRatioCurve = 3, - kRobotDrive_Tank = 4, - kRobotDrive_MecanumPolar = 5, - kRobotDrive_MecanumCartesian = 6, - - kDriverStationCIO_Analog = 1, - kDriverStationCIO_DigitalIn = 2, - kDriverStationCIO_DigitalOut = 3, - - kDriverStationEIO_Acceleration = 1, - kDriverStationEIO_AnalogIn = 2, - kDriverStationEIO_AnalogOut = 3, - kDriverStationEIO_Button = 4, - kDriverStationEIO_LED = 5, - kDriverStationEIO_DigitalIn = 6, - kDriverStationEIO_DigitalOut = 7, - kDriverStationEIO_FixedDigitalOut = 8, - kDriverStationEIO_PWM = 9, - kDriverStationEIO_Encoder = 10, - kDriverStationEIO_TouchSlider = 11, - - kADXL345_SPI = 1, - kADXL345_I2C = 2, - - kCommand_Scheduler = 1, - - kSmartDashboard_Instance = 1, - } tInstances; - - /** - * Report the usage of a resource of interest. - * - * @param resource one of the values in the tResourceType above (max value 51). - * @param instanceNumber an index that identifies the resource instance. - * @param context an optional additional context number for some cases (such as module number). Set to 0 to omit. - * @param feature a string to be included describing features in use on a specific resource. Setting the same resource more than once allows you to change the feature string. - */ - uint32_t EXPORT_FUNC report(tResourceType resource, uint8_t instanceNumber, uint8_t context = 0, const char *feature = NULL); -} - -#ifdef __cplusplus -extern "C" { -#endif - - uint32_t EXPORT_FUNC FRC_NetworkCommunication_nUsageReporting_report(uint8_t resource, uint8_t instanceNumber, uint8_t context, const char *feature); - -#ifdef __cplusplus -} -#endif - -#endif // __UsageReporting_h__ + +#ifndef __UsageReporting_h__ +#define __UsageReporting_h__ + +#ifdef SIMULATION +#include +#define EXPORT_FUNC __declspec(dllexport) __cdecl +#elif defined (__vxworks) +#include +#define EXPORT_FUNC +#else +#include +#include +#define EXPORT_FUNC +#endif + +#define kUsageReporting_version 1 + +namespace nUsageReporting +{ + typedef enum + { + kResourceType_Controller, + kResourceType_Module, + kResourceType_Language, + kResourceType_CANPlugin, + kResourceType_Accelerometer, + kResourceType_ADXL345, + kResourceType_AnalogChannel, + kResourceType_AnalogTrigger, + kResourceType_AnalogTriggerOutput, + kResourceType_CANJaguar, + kResourceType_Compressor, + kResourceType_Counter, + kResourceType_Dashboard, + kResourceType_DigitalInput, + kResourceType_DigitalOutput, + kResourceType_DriverStationCIO, + kResourceType_DriverStationEIO, + kResourceType_DriverStationLCD, + kResourceType_Encoder, + kResourceType_GearTooth, + kResourceType_Gyro, + kResourceType_I2C, + kResourceType_Framework, + kResourceType_Jaguar, + kResourceType_Joystick, + kResourceType_Kinect, + kResourceType_KinectStick, + kResourceType_PIDController, + kResourceType_Preferences, + kResourceType_PWM, + kResourceType_Relay, + kResourceType_RobotDrive, + kResourceType_SerialPort, + kResourceType_Servo, + kResourceType_Solenoid, + kResourceType_SPI, + kResourceType_Task, + kResourceType_Ultrasonic, + kResourceType_Victor, + kResourceType_Button, + kResourceType_Command, + kResourceType_AxisCamera, + kResourceType_PCVideoServer, + kResourceType_SmartDashboard, + kResourceType_Talon, + kResourceType_HiTechnicColorSensor, + kResourceType_HiTechnicAccel, + kResourceType_HiTechnicCompass, + kResourceType_SRF08, + } tResourceType; + + typedef enum + { + kLanguage_LabVIEW = 1, + kLanguage_CPlusPlus = 2, + kLanguage_Java = 3, + kLanguage_Python = 4, + + kCANPlugin_BlackJagBridge = 1, + kCANPlugin_2CAN = 2, + + kFramework_Iterative = 1, + kFramework_Simple = 2, + + kRobotDrive_ArcadeStandard = 1, + kRobotDrive_ArcadeButtonSpin = 2, + kRobotDrive_ArcadeRatioCurve = 3, + kRobotDrive_Tank = 4, + kRobotDrive_MecanumPolar = 5, + kRobotDrive_MecanumCartesian = 6, + + kDriverStationCIO_Analog = 1, + kDriverStationCIO_DigitalIn = 2, + kDriverStationCIO_DigitalOut = 3, + + kDriverStationEIO_Acceleration = 1, + kDriverStationEIO_AnalogIn = 2, + kDriverStationEIO_AnalogOut = 3, + kDriverStationEIO_Button = 4, + kDriverStationEIO_LED = 5, + kDriverStationEIO_DigitalIn = 6, + kDriverStationEIO_DigitalOut = 7, + kDriverStationEIO_FixedDigitalOut = 8, + kDriverStationEIO_PWM = 9, + kDriverStationEIO_Encoder = 10, + kDriverStationEIO_TouchSlider = 11, + + kADXL345_SPI = 1, + kADXL345_I2C = 2, + + kCommand_Scheduler = 1, + + kSmartDashboard_Instance = 1, + } tInstances; + + /** + * Report the usage of a resource of interest. + * + * @param resource one of the values in the tResourceType above (max value 51). + * @param instanceNumber an index that identifies the resource instance. + * @param context an optional additional context number for some cases (such as module number). Set to 0 to omit. + * @param feature a string to be included describing features in use on a specific resource. Setting the same resource more than once allows you to change the feature string. + */ + uint32_t EXPORT_FUNC report(tResourceType resource, uint8_t instanceNumber, uint8_t context = 0, const char *feature = NULL); +} + +#ifdef __cplusplus +extern "C" { +#endif + + uint32_t EXPORT_FUNC FRC_NetworkCommunication_nUsageReporting_report(uint8_t resource, uint8_t instanceNumber, uint8_t context, const char *feature); + +#ifdef __cplusplus +} +#endif + +#endif // __UsageReporting_h__ diff --git a/hal/lib/Athena/i2clib/i2c-lib.h b/hal/lib/Athena/i2clib/i2c-lib.h index 9d095ec219..d379765e13 100644 --- a/hal/lib/Athena/i2clib/i2c-lib.h +++ b/hal/lib/Athena/i2clib/i2c-lib.h @@ -1,10 +1,10 @@ -#ifndef __I2C_LIB_H__ -#define __I2C_LIB_H__ - -int i2clib_open(const char *device); -void i2clib_close(int handle); -int i2clib_read(int handle, uint8_t dev_addr, char *recv_buf, int32_t recv_size); -int i2clib_write(int handle, uint8_t dev_addr, const char *send_buf, int32_t send_size); -int i2clib_writeread(int handle, uint8_t dev_addr, const char *send_buf, int32_t send_size, char *recv_buf, int32_t recv_size); - +#ifndef __I2C_LIB_H__ +#define __I2C_LIB_H__ + +int i2clib_open(const char *device); +void i2clib_close(int handle); +int i2clib_read(int handle, uint8_t dev_addr, char *recv_buf, int32_t recv_size); +int i2clib_write(int handle, uint8_t dev_addr, const char *send_buf, int32_t send_size); +int i2clib_writeread(int handle, uint8_t dev_addr, const char *send_buf, int32_t send_size, char *recv_buf, int32_t recv_size); + #endif /* __I2C_LIB_H__ */ \ No newline at end of file diff --git a/hal/lib/Athena/i2clib/i2clib/environs.h b/hal/lib/Athena/i2clib/i2clib/environs.h index 518a991713..d250585223 100644 --- a/hal/lib/Athena/i2clib/i2clib/environs.h +++ b/hal/lib/Athena/i2clib/i2clib/environs.h @@ -1,66 +1,66 @@ -/*! - \file environs.h - \brief Defines export symbols and namespace aliases -*/ -/* - Copyright (c) 2014, - National Instruments Corporation. - All rights reserved. - - File: $Id: //lvaddon/FIRST/FRC/trunk/2015/tools/frcrti/export/1.0/1.0.0a5/includes/wpilib/i2clib/i2clib/environs.h#1 $ - Author: nipg.pl - Originated: Mon Feb 10 10:39:42 2014 -*/ - -#ifndef ___i2clib_environs_h___ -#define ___i2clib_environs_h___ - -#include - -/* - * kI2CLIBExportSymbols directs the build to export symbols modified by - * the kI2CLIBExport keyword. kI2CLIBNoExportSymbols directs the build to not - * import or export symbols modified by the kI2CLIBExport keyword. If - * neither of these are defined, the symbols modified by kI2CLIBExport are - * imported. These should be defined only when building the component, - * so clients do not need to trouble themselves with it. - */ -#if defined(kI2CLIBExportSymbols) - #define kI2CLIBExport kNIExport - #define kI2CLIBExportPre kNIExportPre - #define kI2CLIBExportPost kNIExportPost - #define kI2CLIBExportInline kNIExportInline - #define kI2CLIBExportData kNIExportData -#elif defined(kI2CLIBNoExportSymbols) - #define kI2CLIBExport - #define kI2CLIBExportPre - #define kI2CLIBExportPost - #define kI2CLIBExportInline - #define kI2CLIBExportData -#else - #define kI2CLIBExport kNIImport - #define kI2CLIBExportPre kNIImportPre - #define kI2CLIBExportPost kNIImportPost - #define kI2CLIBExportInline kNIImportInline - #define kI2CLIBExportData kNIImportData -#endif - -// namespace declarations for aliasing ... - -#ifdef __cplusplus - - -/*! - \namespace nI2CLIB_1_0 - \brief i2c user-mode library Release 1.0 -*/ -namespace nI2CLIB_1_0 -{ - // current versioned namespace aliases used by this package - -} - -#endif // __cplusplus - -#endif // ___i2clib_environs_h___ - +/*! + \file environs.h + \brief Defines export symbols and namespace aliases +*/ +/* + Copyright (c) 2014, + National Instruments Corporation. + All rights reserved. + + File: $Id: //lvaddon/FIRST/FRC/trunk/2015/tools/frcrti/export/1.0/1.0.0a6/includes/wpilib/i2clib/i2clib/environs.h#1 $ + Author: nipg.pl + Originated: Mon Feb 10 10:39:42 2014 +*/ + +#ifndef ___i2clib_environs_h___ +#define ___i2clib_environs_h___ + +#include + +/* + * kI2CLIBExportSymbols directs the build to export symbols modified by + * the kI2CLIBExport keyword. kI2CLIBNoExportSymbols directs the build to not + * import or export symbols modified by the kI2CLIBExport keyword. If + * neither of these are defined, the symbols modified by kI2CLIBExport are + * imported. These should be defined only when building the component, + * so clients do not need to trouble themselves with it. + */ +#if defined(kI2CLIBExportSymbols) + #define kI2CLIBExport kNIExport + #define kI2CLIBExportPre kNIExportPre + #define kI2CLIBExportPost kNIExportPost + #define kI2CLIBExportInline kNIExportInline + #define kI2CLIBExportData kNIExportData +#elif defined(kI2CLIBNoExportSymbols) + #define kI2CLIBExport + #define kI2CLIBExportPre + #define kI2CLIBExportPost + #define kI2CLIBExportInline + #define kI2CLIBExportData +#else + #define kI2CLIBExport kNIImport + #define kI2CLIBExportPre kNIImportPre + #define kI2CLIBExportPost kNIImportPost + #define kI2CLIBExportInline kNIImportInline + #define kI2CLIBExportData kNIImportData +#endif + +// namespace declarations for aliasing ... + +#ifdef __cplusplus + + +/*! + \namespace nI2CLIB_1_0 + \brief i2c user-mode library Release 1.0 +*/ +namespace nI2CLIB_1_0 +{ + // current versioned namespace aliases used by this package + +} + +#endif // __cplusplus + +#endif // ___i2clib_environs_h___ + diff --git a/hal/lib/Athena/spilib/spi-lib.h b/hal/lib/Athena/spilib/spi-lib.h index 4b4389510e..57dc10f509 100644 --- a/hal/lib/Athena/spilib/spi-lib.h +++ b/hal/lib/Athena/spilib/spi-lib.h @@ -1,13 +1,13 @@ -#ifndef __SPI_LIB_H__ -#define __SPI_LIB_H__ - -int spilib_open(const char *device); -void spilib_close(int handle); -int spilib_setspeed(int handle, uint32_t speed); -int spilib_setbitsperword(int handle, uint8_t bpw); -int spilib_setopts(int handle, int msb_first, int sample_on_trailing, int clk_idle_high); -int spilib_read(int handle, char *recv_buf, int32_t size); -int spilib_write(int handle, const char *send_buf, int32_t size); -int spilib_writeread(int handle, const char *send_buf, char *recv_buf, int32_t size); - +#ifndef __SPI_LIB_H__ +#define __SPI_LIB_H__ + +int spilib_open(const char *device); +void spilib_close(int handle); +int spilib_setspeed(int handle, uint32_t speed); +int spilib_setbitsperword(int handle, uint8_t bpw); +int spilib_setopts(int handle, int msb_first, int sample_on_trailing, int clk_idle_high); +int spilib_read(int handle, char *recv_buf, int32_t size); +int spilib_write(int handle, const char *send_buf, int32_t size); +int spilib_writeread(int handle, const char *send_buf, char *recv_buf, int32_t size); + #endif /* __SPI_LIB_H__ */ \ No newline at end of file diff --git a/ni-libraries/libFRC_FPGA_ChipObject.so.1 b/ni-libraries/libFRC_FPGA_ChipObject.so.1 old mode 100644 new mode 100755 index fe5260f9e4..51f6d195ae Binary files a/ni-libraries/libFRC_FPGA_ChipObject.so.1 and b/ni-libraries/libFRC_FPGA_ChipObject.so.1 differ diff --git a/ni-libraries/libFRC_NetworkCommunication.so.1 b/ni-libraries/libFRC_NetworkCommunication.so.1 old mode 100644 new mode 100755 index bb8dc8a0a3..7aa74fe26b Binary files a/ni-libraries/libFRC_NetworkCommunication.so.1 and b/ni-libraries/libFRC_NetworkCommunication.so.1 differ diff --git a/ni-libraries/libRoboRIO_FRC_ChipObject.so.1 b/ni-libraries/libRoboRIO_FRC_ChipObject.so.1 old mode 100644 new mode 100755 index cf57cca526..5281f6379b Binary files a/ni-libraries/libRoboRIO_FRC_ChipObject.so.1 and b/ni-libraries/libRoboRIO_FRC_ChipObject.so.1 differ diff --git a/ni-libraries/libi2c.so.1 b/ni-libraries/libi2c.so.1 old mode 100644 new mode 100755 diff --git a/ni-libraries/libspi.so.1 b/ni-libraries/libspi.so.1 old mode 100644 new mode 100755 diff --git a/wpilibc/include/CAN/JaguarCANDriver.h b/wpilibc/include/CAN/JaguarCANDriver.h index 66588c4eb1..c7ded49749 100644 --- a/wpilibc/include/CAN/JaguarCANDriver.h +++ b/wpilibc/include/CAN/JaguarCANDriver.h @@ -1,31 +1,56 @@ -/*----------------------------------------------------------------------------*/ -/* Copyright (c) FIRST 2009. All Rights Reserved. */ -/* Open Source Software - may be modified and shared by FRC teams. The code */ -/* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib. */ -/*----------------------------------------------------------------------------*/ - -// JaguarCANDriver.h -// -// Defines the API for building a CAN Interface Plugin to support -// PWM-cable-free CAN motor control on FRC robots. This allows you -// to connect any CAN interface to the secure Jaguar CAN driver. -// - -#ifndef __JaguarCANDriver_h__ -#define __JaguarCANDriver_h__ - -#include "HAL/HAL.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - - void FRC_NetworkCommunication_JaguarCANDriver_sendMessage(uint32_t messageID, const uint8_t *data, uint8_t dataSize, int32_t *status); - void FRC_NetworkCommunication_JaguarCANDriver_receiveMessage(uint32_t *messageID, uint8_t *data, uint8_t *dataSize, uint32_t timeoutMs, int32_t *status); - -#ifdef __cplusplus -} -#endif - -#endif // __JaguarCANDriver_h__ +// JaguarCANDriver.h +// +// Defines the API for building a CAN Interface Plugin to support +// PWM-cable-free CAN motor control on FRC robots. This allows you +// to connect any CAN interface to the secure Jaguar CAN driver. +// + +#ifndef __JaguarCANDriver_h__ +#define __JaguarCANDriver_h__ + +#if defined(__vxworks) +#include +#else +#include +#include +#endif +#ifdef USE_THRIFT +#include "NetCommRPCComm.h" +#include +#endif +namespace nJaguarCANDriver +{ + void sendMessage_wrapper(uint32_t messageID, const uint8_t *data, uint8_t dataSize, int32_t *status); + void receiveMessage_wrapper(uint32_t *messageID, uint8_t *data, uint8_t *dataSize, uint32_t timeoutMs, int32_t *status); + int32_t receiveMessageStart_wrapper(uint32_t messageID, uint32_t occurRefNum, uint32_t timeoutMs, int32_t *status); +#if defined (__vxworks) + int32_t receiveMessageStart_sem_wrapper(uint32_t messageID, uint32_t semaphoreID, uint32_t timeoutMs, int32_t *status); +#else + int32_t receiveMessageStart_mutex_wrapper(uint32_t messageID, pthread_mutex_t *mutex, uint32_t timeoutMs, int32_t *status); +#endif + void receiveMessageComplete_wrapper(uint32_t *messageID, uint8_t *data, uint8_t *dataSize, int32_t *status); +#ifdef USE_THRIFT + void checkEvent_CAN(std::vector< CANEvent >& events); +#endif +} + +#ifdef __cplusplus +extern "C" +{ +#endif + + void FRC_NetworkCommunication_JaguarCANDriver_sendMessage(uint32_t messageID, const uint8_t *data, uint8_t dataSize, int32_t *status); + void FRC_NetworkCommunication_JaguarCANDriver_receiveMessage(uint32_t *messageID, uint8_t *data, uint8_t *dataSize, uint32_t timeoutMs, int32_t *status); + int32_t FRC_NetworkCommunication_JaguarCANDriver_receiveMessageStart(uint32_t messageID, uint32_t occurRefNum, uint32_t timeoutMs, int32_t *status); +#if defined (__vxworks) + int32_t FRC_NetworkCommunication_JaguarCANDriver_receiveMessageStart_sem(uint32_t messageID, uint32_t semaphoreID, uint32_t timeoutMs, int32_t *status); +#else + int32_t FRC_NetworkCommunication_JaguarCANDriver_receiveMessageStart_mutex(uint32_t messageID, pthread_mutex_t *mutex, uint32_t timeoutMs, int32_t *status); +#endif + void FRC_NetworkCommunication_JaguarCANDriver_receiveMessageComplete(uint32_t *messageID, uint8_t *data, uint8_t *dataSize, int32_t *status); + +#ifdef __cplusplus +} +#endif + +#endif // __JaguarCANDriver_h__ diff --git a/wpilibc/include/NetworkCommunication/AICalibration.h b/wpilibc/include/NetworkCommunication/AICalibration.h index 8d84864c76..b2f366c5bd 100644 --- a/wpilibc/include/NetworkCommunication/AICalibration.h +++ b/wpilibc/include/NetworkCommunication/AICalibration.h @@ -1,19 +1,19 @@ - -#ifndef __AICalibration_h__ -#define __AICalibration_h__ - -#include "HAL/HAL.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - - uint32_t FRC_NetworkCommunication_nAICalibration_getLSBWeight(const uint32_t aiSystemIndex, const uint32_t channel, int32_t *status); - int32_t FRC_NetworkCommunication_nAICalibration_getOffset(const uint32_t aiSystemIndex, const uint32_t channel, int32_t *status); - -#ifdef __cplusplus -} -#endif - -#endif // __AICalibration_h__ + +#ifndef __AICalibration_h__ +#define __AICalibration_h__ + +#include + +#ifdef __cplusplus +extern "C" +{ +#endif + + uint32_t FRC_NetworkCommunication_nAICalibration_getLSBWeight(const uint32_t aiSystemIndex, const uint32_t channel, int32_t *status); + int32_t FRC_NetworkCommunication_nAICalibration_getOffset(const uint32_t aiSystemIndex, const uint32_t channel, int32_t *status); + +#ifdef __cplusplus +} +#endif + +#endif // __AICalibration_h__ diff --git a/wpilibc/include/NetworkCommunication/CANInterfacePlugin.h b/wpilibc/include/NetworkCommunication/CANInterfacePlugin.h new file mode 100644 index 0000000000..a973c31d2a --- /dev/null +++ b/wpilibc/include/NetworkCommunication/CANInterfacePlugin.h @@ -0,0 +1,61 @@ +// CANInterfacePlugin.h +// +// Defines the API for building a CAN Interface Plugin to support +// PWM-cable-free CAN motor control on FRC robots. This allows you +// to connect any CAN interface to the secure Jaguar CAN driver. +// + +#ifndef __CANInterfacePlugin_h__ +#define __CANInterfacePlugin_h__ + +#include + +#define CAN_IS_FRAME_REMOTE 0x80000000 +#define CAN_MESSAGE_ID_MASK 0x1FFFFFFF + +class CANInterfacePlugin +{ +public: + CANInterfacePlugin() {} + virtual ~CANInterfacePlugin() {} + + /** + * This entry-point of the CANInterfacePlugin is passed a message that the driver needs to send to + * a device on the CAN bus. + * + * This function may be called from multiple contexts and must therefore be reentrant. + * + * @param messageID The 29-bit CAN message ID in the lsbs. The msb can indicate a remote frame. + * @param data A pointer to a buffer containing between 0 and 8 bytes to send with the message. May be NULL if dataSize is 0. + * @param dataSize The number of bytes to send with the message. + * @return Return any error code. On success return 0. + */ + virtual int32_t sendMessage(uint32_t messageID, const uint8_t *data, uint8_t dataSize) = 0; + + /** + * This entry-point of the CANInterfacePlugin is passed buffers which should be populated with + * any received messages from devices on the CAN bus. + * + * This function is always called by a single task in the Jaguar driver, so it need not be reentrant. + * + * This function is expected to block for some period of time waiting for a message from the CAN bus. + * It may timeout periodically (returning non-zero to indicate no message was populated) to allow for + * shutdown and unloading of the plugin. + * + * @param messageID A reference to be populated with a received 29-bit CAN message ID in the lsbs. + * @param data A pointer to a buffer of 8 bytes to be populated with data received with the message. + * @param dataSize A reference to be populated with the size of the data received (0 - 8 bytes). + * @return This should return 0 if a message was populated, non-0 if no message was not populated. + */ + virtual int32_t receiveMessage(uint32_t &messageID, uint8_t *data, uint8_t &dataSize) = 0; +}; + +/** + * This function allows you to register a CANInterfacePlugin to provide access a CAN bus. + * + * @param interface A pointer to an object that inherits from CANInterfacePlugin and implements + * the pure virtual interface. If NULL, unregister the current plugin. + */ +void FRC_NetworkCommunication_JaguarCANDriver_registerInterface(CANInterfacePlugin* interface); + +#endif // __CANInterfacePlugin_h__ diff --git a/wpilibc/include/NetworkCommunication/FRCComm.h b/wpilibc/include/NetworkCommunication/FRCComm.h index e971fac1a5..4d40d237d4 100644 --- a/wpilibc/include/NetworkCommunication/FRCComm.h +++ b/wpilibc/include/NetworkCommunication/FRCComm.h @@ -1,193 +1,201 @@ -/************************************************************* - * NOTICE - * - * These are the only externally exposed functions to the - * NetworkCommunication library - * - * This is an implementation of FRC Spec for Comm Protocol - * Revision 4.5, June 30, 2008 - * - * Copyright (c) National Instruments 2008. All Rights Reserved. - * - *************************************************************/ - -#ifndef __FRC_COMM_H__ -#define __FRC_COMM_H__ - -#ifdef SIMULATION -#include -#define EXPORT_FUNC __declspec(dllexport) __cdecl -#else -#if defined(__vxworks) -#include -#define EXPORT_FUNC -#else -#include -#include -#define EXPORT_FUNC -#endif -#endif - -// Commandeer some bytes at the end for advanced I/O feedback. -#define IO_CONFIG_DATA_SIZE 32 -#define SYS_STATUS_DATA_SIZE 44 -#define USER_STATUS_DATA_SIZE (984 - IO_CONFIG_DATA_SIZE - SYS_STATUS_DATA_SIZE) -#define USER_DS_LCD_DATA_SIZE 128 - -struct FRCCommonControlData{ - uint16_t packetIndex; - union { - uint8_t control; -#ifndef __vxworks - struct { - uint8_t checkVersions :1; - uint8_t test :1; - uint8_t resync : 1; - uint8_t fmsAttached:1; - uint8_t autonomous : 1; - uint8_t enabled : 1; - uint8_t notEStop : 1; - uint8_t reset : 1; - }; -#else - struct { - uint8_t reset : 1; - uint8_t notEStop : 1; - uint8_t enabled : 1; - uint8_t autonomous : 1; - uint8_t fmsAttached:1; - uint8_t resync : 1; - uint8_t test :1; - uint8_t checkVersions :1; - }; -#endif - }; - uint8_t dsDigitalIn; - uint16_t teamID; - - char dsID_Alliance; - char dsID_Position; - - union { - int8_t stick0Axes[6]; - struct { - int8_t stick0Axis1; - int8_t stick0Axis2; - int8_t stick0Axis3; - int8_t stick0Axis4; - int8_t stick0Axis5; - int8_t stick0Axis6; - }; - }; - uint16_t stick0Buttons; // Left-most 4 bits are unused - - union { - int8_t stick1Axes[6]; - struct { - int8_t stick1Axis1; - int8_t stick1Axis2; - int8_t stick1Axis3; - int8_t stick1Axis4; - int8_t stick1Axis5; - int8_t stick1Axis6; - }; - }; - uint16_t stick1Buttons; // Left-most 4 bits are unused - - union { - int8_t stick2Axes[6]; - struct { - int8_t stick2Axis1; - int8_t stick2Axis2; - int8_t stick2Axis3; - int8_t stick2Axis4; - int8_t stick2Axis5; - int8_t stick2Axis6; - }; - }; - uint16_t stick2Buttons; // Left-most 4 bits are unused - - union { - int8_t stick3Axes[6]; - struct { - int8_t stick3Axis1; - int8_t stick3Axis2; - int8_t stick3Axis3; - int8_t stick3Axis4; - int8_t stick3Axis5; - int8_t stick3Axis6; - }; - }; - uint16_t stick3Buttons; // Left-most 4 bits are unused - - //Analog inputs are 10 bit right-justified - uint16_t analog1; - uint16_t analog2; - uint16_t analog3; - uint16_t analog4; - - uint64_t cRIOChecksum; - uint32_t FPGAChecksum0; - uint32_t FPGAChecksum1; - uint32_t FPGAChecksum2; - uint32_t FPGAChecksum3; - - char versionData[8]; -}; - -#define kFRC_NetworkCommunication_DynamicType_DSEnhancedIO_Input 17 -#define kFRC_NetworkCommunication_DynamicType_DSEnhancedIO_Output 18 -#define kFRC_NetworkCommunication_DynamicType_Kinect_Header 19 -#define kFRC_NetworkCommunication_DynamicType_Kinect_Extra1 20 -#define kFRC_NetworkCommunication_DynamicType_Kinect_Vertices1 21 -#define kFRC_NetworkCommunication_DynamicType_Kinect_Extra2 22 -#define kFRC_NetworkCommunication_DynamicType_Kinect_Vertices2 23 -#define kFRC_NetworkCommunication_DynamicType_Kinect_Joystick 24 -#define kFRC_NetworkCommunication_DynamicType_Kinect_Custom 25 - -extern "C" { -#ifndef SIMULATION - void EXPORT_FUNC getFPGAHardwareVersion(uint16_t *fpgaVersion, uint32_t *fpgaRevision); -#endif - int EXPORT_FUNC getCommonControlData(FRCCommonControlData *data, int wait_ms); - int EXPORT_FUNC getRecentCommonControlData(FRCCommonControlData *commonData, int wait_ms); - int EXPORT_FUNC getRecentStatusData(uint8_t *batteryInt, uint8_t *batteryDec, uint8_t *dsDigitalOut, int wait_ms); - int EXPORT_FUNC getDynamicControlData(uint8_t type, char *dynamicData, int32_t maxLength, int wait_ms); - int EXPORT_FUNC setStatusData(float battery, uint8_t dsDigitalOut, uint8_t updateNumber, - const char *userDataHigh, int userDataHighLength, - const char *userDataLow, int userDataLowLength, int wait_ms); - int EXPORT_FUNC setStatusDataFloatAsInt(int battery, uint8_t dsDigitalOut, uint8_t updateNumber, - const char *userDataHigh, int userDataHighLength, - const char *userDataLow, int userDataLowLength, int wait_ms); - int EXPORT_FUNC setErrorData(const char *errors, int errorsLength, int wait_ms); - int EXPORT_FUNC setUserDsLcdData(const char *userDsLcdData, int userDsLcdDataLength, int wait_ms); - int EXPORT_FUNC overrideIOConfig(const char *ioConfig, int wait_ms); - -#ifdef SIMULATION - void EXPORT_FUNC setNewDataSem(HANDLE); -#else -# if defined (__vxworks) - void EXPORT_FUNC setNewDataSem(SEM_ID); - void EXPORT_FUNC setResyncSem(SEM_ID); -# else - void EXPORT_FUNC setNewDataSem(pthread_mutex_t *); - void EXPORT_FUNC setResyncSem(pthread_mutex_t *); -# endif - void EXPORT_FUNC signalResyncActionDone(void); -#endif - - // this uint32_t is really a LVRefNum - void EXPORT_FUNC setNewDataOccurRef(uint32_t refnum); -#ifndef SIMULATION - void EXPORT_FUNC setResyncOccurRef(uint32_t refnum); -#endif - - void EXPORT_FUNC FRC_NetworkCommunication_getVersionString(char *version); - void EXPORT_FUNC FRC_NetworkCommunication_observeUserProgramStarting(void); - void EXPORT_FUNC FRC_NetworkCommunication_observeUserProgramDisabled(void); - void EXPORT_FUNC FRC_NetworkCommunication_observeUserProgramAutonomous(void); - void EXPORT_FUNC FRC_NetworkCommunication_observeUserProgramTeleop(void); - void EXPORT_FUNC FRC_NetworkCommunication_observeUserProgramTest(void); -}; - -#endif +/************************************************************* + * NOTICE + * + * These are the only externally exposed functions to the + * NetworkCommunication library + * + * This is an implementation of FRC Spec for Comm Protocol + * Revision 4.5, June 30, 2008 + * + * Copyright (c) National Instruments 2008. All Rights Reserved. + * + *************************************************************/ + +#ifndef __FRC_COMM_H__ +#define __FRC_COMM_H__ + +#ifdef SIMULATION +#include +#ifdef USE_THRIFT +#define EXPORT_FUNC +#else +#define EXPORT_FUNC __declspec(dllexport) __cdecl +#endif +#else +#if defined(__vxworks) +#include +#define EXPORT_FUNC +#else +#include +#include +#define EXPORT_FUNC +#endif +#endif + +// Commandeer some bytes at the end for advanced I/O feedback. +#define IO_CONFIG_DATA_SIZE 32 +#define SYS_STATUS_DATA_SIZE 44 +#define USER_STATUS_DATA_SIZE (984 - IO_CONFIG_DATA_SIZE - SYS_STATUS_DATA_SIZE) +#define USER_DS_LCD_DATA_SIZE 128 + +struct FRCCommonControlData{ + uint16_t packetIndex; + union { + uint8_t control; +#ifndef __vxworks + struct { + uint8_t checkVersions :1; + uint8_t test :1; + uint8_t resync : 1; + uint8_t fmsAttached:1; + uint8_t autonomous : 1; + uint8_t enabled : 1; + uint8_t notEStop : 1; + uint8_t reset : 1; + }; +#else + struct { + uint8_t reset : 1; + uint8_t notEStop : 1; + uint8_t enabled : 1; + uint8_t autonomous : 1; + uint8_t fmsAttached:1; + uint8_t resync : 1; + uint8_t test :1; + uint8_t checkVersions :1; + }; +#endif + }; + uint8_t dsDigitalIn; + uint16_t teamID; + + char dsID_Alliance; + char dsID_Position; + + union { + int8_t stick0Axes[6]; + struct { + int8_t stick0Axis1; + int8_t stick0Axis2; + int8_t stick0Axis3; + int8_t stick0Axis4; + int8_t stick0Axis5; + int8_t stick0Axis6; + }; + }; + uint16_t stick0Buttons; // Left-most 4 bits are unused + + union { + int8_t stick1Axes[6]; + struct { + int8_t stick1Axis1; + int8_t stick1Axis2; + int8_t stick1Axis3; + int8_t stick1Axis4; + int8_t stick1Axis5; + int8_t stick1Axis6; + }; + }; + uint16_t stick1Buttons; // Left-most 4 bits are unused + + union { + int8_t stick2Axes[6]; + struct { + int8_t stick2Axis1; + int8_t stick2Axis2; + int8_t stick2Axis3; + int8_t stick2Axis4; + int8_t stick2Axis5; + int8_t stick2Axis6; + }; + }; + uint16_t stick2Buttons; // Left-most 4 bits are unused + + union { + int8_t stick3Axes[6]; + struct { + int8_t stick3Axis1; + int8_t stick3Axis2; + int8_t stick3Axis3; + int8_t stick3Axis4; + int8_t stick3Axis5; + int8_t stick3Axis6; + }; + }; + uint16_t stick3Buttons; // Left-most 4 bits are unused + + //Analog inputs are 10 bit right-justified + uint16_t analog1; + uint16_t analog2; + uint16_t analog3; + uint16_t analog4; + + uint64_t cRIOChecksum; + uint32_t FPGAChecksum0; + uint32_t FPGAChecksum1; + uint32_t FPGAChecksum2; + uint32_t FPGAChecksum3; + + char versionData[8]; +}; + +#define kFRC_NetworkCommunication_DynamicType_DSEnhancedIO_Input 17 +#define kFRC_NetworkCommunication_DynamicType_DSEnhancedIO_Output 18 +#define kFRC_NetworkCommunication_DynamicType_Kinect_Header 19 +#define kFRC_NetworkCommunication_DynamicType_Kinect_Extra1 20 +#define kFRC_NetworkCommunication_DynamicType_Kinect_Vertices1 21 +#define kFRC_NetworkCommunication_DynamicType_Kinect_Extra2 22 +#define kFRC_NetworkCommunication_DynamicType_Kinect_Vertices2 23 +#define kFRC_NetworkCommunication_DynamicType_Kinect_Joystick 24 +#define kFRC_NetworkCommunication_DynamicType_Kinect_Custom 25 + +#ifdef __cplusplus +extern "C" { +#endif +#ifndef SIMULATION + void EXPORT_FUNC getFPGAHardwareVersion(uint16_t *fpgaVersion, uint32_t *fpgaRevision); +#endif + int EXPORT_FUNC getCommonControlData(struct FRCCommonControlData *data, int wait_ms); + int EXPORT_FUNC getRecentCommonControlData(struct FRCCommonControlData *commonData, int wait_ms); + int EXPORT_FUNC getRecentStatusData(uint8_t *batteryInt, uint8_t *batteryDec, uint8_t *dsDigitalOut, int wait_ms); + int EXPORT_FUNC getDynamicControlData(uint8_t type, char *dynamicData, int32_t maxLength, int wait_ms); + int EXPORT_FUNC setStatusData(float battery, uint8_t dsDigitalOut, uint8_t updateNumber, + const char *userDataHigh, int userDataHighLength, + const char *userDataLow, int userDataLowLength, int wait_ms); + int EXPORT_FUNC setStatusDataFloatAsInt(int battery, uint8_t dsDigitalOut, uint8_t updateNumber, + const char *userDataHigh, int userDataHighLength, + const char *userDataLow, int userDataLowLength, int wait_ms); + int EXPORT_FUNC setErrorData(const char *errors, int errorsLength, int wait_ms); + int EXPORT_FUNC setUserDsLcdData(const char *userDsLcdData, int userDsLcdDataLength, int wait_ms); + int EXPORT_FUNC overrideIOConfig(const char *ioConfig, int wait_ms); + +#ifdef SIMULATION + void EXPORT_FUNC setNewDataSem(HANDLE); +#else +# if defined (__vxworks) + void EXPORT_FUNC setNewDataSem(SEM_ID); + void EXPORT_FUNC setResyncSem(SEM_ID); +# else + void EXPORT_FUNC setNewDataSem(pthread_mutex_t *); + void EXPORT_FUNC setResyncSem(pthread_mutex_t *); +# endif + void EXPORT_FUNC signalResyncActionDone(void); +#endif + + // this uint32_t is really a LVRefNum + void EXPORT_FUNC setNewDataOccurRef(uint32_t refnum); +#ifndef SIMULATION + void EXPORT_FUNC setResyncOccurRef(uint32_t refnum); +#endif + + void EXPORT_FUNC FRC_NetworkCommunication_getVersionString(char *version); + void EXPORT_FUNC FRC_NetworkCommunication_observeUserProgramStarting(void); + void EXPORT_FUNC FRC_NetworkCommunication_observeUserProgramDisabled(void); + void EXPORT_FUNC FRC_NetworkCommunication_observeUserProgramAutonomous(void); + void EXPORT_FUNC FRC_NetworkCommunication_observeUserProgramTeleop(void); + void EXPORT_FUNC FRC_NetworkCommunication_observeUserProgramTest(void); +#ifdef __cplusplus +} +#endif + +#endif diff --git a/wpilibc/include/NetworkCommunication/JaguarCANDriver.h b/wpilibc/include/NetworkCommunication/JaguarCANDriver.h new file mode 100644 index 0000000000..c7ded49749 --- /dev/null +++ b/wpilibc/include/NetworkCommunication/JaguarCANDriver.h @@ -0,0 +1,56 @@ +// JaguarCANDriver.h +// +// Defines the API for building a CAN Interface Plugin to support +// PWM-cable-free CAN motor control on FRC robots. This allows you +// to connect any CAN interface to the secure Jaguar CAN driver. +// + +#ifndef __JaguarCANDriver_h__ +#define __JaguarCANDriver_h__ + +#if defined(__vxworks) +#include +#else +#include +#include +#endif +#ifdef USE_THRIFT +#include "NetCommRPCComm.h" +#include +#endif +namespace nJaguarCANDriver +{ + void sendMessage_wrapper(uint32_t messageID, const uint8_t *data, uint8_t dataSize, int32_t *status); + void receiveMessage_wrapper(uint32_t *messageID, uint8_t *data, uint8_t *dataSize, uint32_t timeoutMs, int32_t *status); + int32_t receiveMessageStart_wrapper(uint32_t messageID, uint32_t occurRefNum, uint32_t timeoutMs, int32_t *status); +#if defined (__vxworks) + int32_t receiveMessageStart_sem_wrapper(uint32_t messageID, uint32_t semaphoreID, uint32_t timeoutMs, int32_t *status); +#else + int32_t receiveMessageStart_mutex_wrapper(uint32_t messageID, pthread_mutex_t *mutex, uint32_t timeoutMs, int32_t *status); +#endif + void receiveMessageComplete_wrapper(uint32_t *messageID, uint8_t *data, uint8_t *dataSize, int32_t *status); +#ifdef USE_THRIFT + void checkEvent_CAN(std::vector< CANEvent >& events); +#endif +} + +#ifdef __cplusplus +extern "C" +{ +#endif + + void FRC_NetworkCommunication_JaguarCANDriver_sendMessage(uint32_t messageID, const uint8_t *data, uint8_t dataSize, int32_t *status); + void FRC_NetworkCommunication_JaguarCANDriver_receiveMessage(uint32_t *messageID, uint8_t *data, uint8_t *dataSize, uint32_t timeoutMs, int32_t *status); + int32_t FRC_NetworkCommunication_JaguarCANDriver_receiveMessageStart(uint32_t messageID, uint32_t occurRefNum, uint32_t timeoutMs, int32_t *status); +#if defined (__vxworks) + int32_t FRC_NetworkCommunication_JaguarCANDriver_receiveMessageStart_sem(uint32_t messageID, uint32_t semaphoreID, uint32_t timeoutMs, int32_t *status); +#else + int32_t FRC_NetworkCommunication_JaguarCANDriver_receiveMessageStart_mutex(uint32_t messageID, pthread_mutex_t *mutex, uint32_t timeoutMs, int32_t *status); +#endif + void FRC_NetworkCommunication_JaguarCANDriver_receiveMessageComplete(uint32_t *messageID, uint8_t *data, uint8_t *dataSize, int32_t *status); + +#ifdef __cplusplus +} +#endif + +#endif // __JaguarCANDriver_h__ diff --git a/wpilibc/include/NetworkCommunication/LoadOut.h b/wpilibc/include/NetworkCommunication/LoadOut.h index f28249e3f1..2433b0cc71 100644 --- a/wpilibc/include/NetworkCommunication/LoadOut.h +++ b/wpilibc/include/NetworkCommunication/LoadOut.h @@ -1,39 +1,52 @@ - -#ifndef __LoadOut_h__ -#define __LoadOut_h__ - -#define kMaxModuleNumber 2 -namespace nLoadOut -{ - typedef enum { - kModuleType_Unknown = 0x00, - kModuleType_Analog = 0x01, - kModuleType_Digital = 0x02, - kModuleType_Solenoid = 0x03, - } tModuleType; - bool getModulePresence(tModuleType moduleType, uint8_t moduleNumber); - typedef enum { - kTargetClass_Unknown = 0x00, - kTargetClass_FRC1 = 0x10, - kTargetClass_FRC2 = 0x20, - kTargetClass_FRC2_Analog = kTargetClass_FRC2 | kModuleType_Analog, - kTargetClass_FRC2_Digital = kTargetClass_FRC2 | kModuleType_Digital, - kTargetClass_FRC2_Solenoid = kTargetClass_FRC2 | kModuleType_Solenoid, - kTargetClass_FamilyMask = 0xF0, - kTargetClass_ModuleMask = 0x0F, - } tTargetClass; - tTargetClass getTargetClass(); -} - -#ifdef __cplusplus -extern "C" { -#endif - - uint32_t FRC_NetworkCommunication_nLoadOut_getModulePresence(uint32_t moduleType, uint8_t moduleNumber); - uint32_t FRC_NetworkCommunication_nLoadOut_getTargetClass(); - -#ifdef __cplusplus -} -#endif - -#endif // __LoadOut_h__ + +#ifndef __LoadOut_h__ +#define __LoadOut_h__ + +#ifdef SIMULATION +#include +#define EXPORT_FUNC __declspec(dllexport) __cdecl +#elif defined (__vxworks) +#include +#define EXPORT_FUNC +#else +#include +#define EXPORT_FUNC +#endif + +#define kMaxModuleNumber 2 +namespace nLoadOut +{ + typedef enum { + kModuleType_Unknown = 0x00, + kModuleType_Analog = 0x01, + kModuleType_Digital = 0x02, + kModuleType_Solenoid = 0x03, + } tModuleType; + bool EXPORT_FUNC getModulePresence(tModuleType moduleType, uint8_t moduleNumber); + typedef enum { + kTargetClass_Unknown = 0x00, + kTargetClass_FRC1 = 0x10, + kTargetClass_FRC2 = 0x20, + kTargetClass_FRC3 = 0x30, + kTargetClass_RoboRIO = 0x40, + kTargetClass_FRC2_Analog = kTargetClass_FRC2 | kModuleType_Analog, + kTargetClass_FRC2_Digital = kTargetClass_FRC2 | kModuleType_Digital, + kTargetClass_FRC2_Solenoid = kTargetClass_FRC2 | kModuleType_Solenoid, + kTargetClass_FamilyMask = 0xF0, + kTargetClass_ModuleMask = 0x0F, + } tTargetClass; + tTargetClass EXPORT_FUNC getTargetClass(); +} + +#ifdef __cplusplus +extern "C" { +#endif + + uint32_t EXPORT_FUNC FRC_NetworkCommunication_nLoadOut_getModulePresence(uint32_t moduleType, uint8_t moduleNumber); + uint32_t EXPORT_FUNC FRC_NetworkCommunication_nLoadOut_getTargetClass(); + +#ifdef __cplusplus +} +#endif + +#endif // __LoadOut_h__ diff --git a/wpilibc/include/NetworkCommunication/UsageReporting.h b/wpilibc/include/NetworkCommunication/UsageReporting.h index 6827c053c9..918ac5ae63 100644 --- a/wpilibc/include/NetworkCommunication/UsageReporting.h +++ b/wpilibc/include/NetworkCommunication/UsageReporting.h @@ -1,135 +1,139 @@ - -#ifndef __UsageReporting_h__ -#define __UsageReporting_h__ - -#ifdef SIMULATION -#include -#define EXPORT_FUNC __declspec(dllexport) __cdecl -#else -#include "HAL/HAL.h" -#define EXPORT_FUNC -#endif - -#define kUsageReporting_version 1 - -namespace nUsageReporting -{ - typedef enum - { - kResourceType_Controller, - kResourceType_Module, - kResourceType_Language, - kResourceType_CANPlugin, - kResourceType_Accelerometer, - kResourceType_ADXL345, - kResourceType_AnalogChannel, - kResourceType_AnalogTrigger, - kResourceType_AnalogTriggerOutput, - kResourceType_CANJaguar, - kResourceType_Compressor, - kResourceType_Counter, - kResourceType_Dashboard, - kResourceType_DigitalInput, - kResourceType_DigitalOutput, - kResourceType_DriverStationCIO, - kResourceType_DriverStationEIO, - kResourceType_DriverStationLCD, - kResourceType_Encoder, - kResourceType_GearTooth, - kResourceType_Gyro, - kResourceType_I2C, - kResourceType_Framework, - kResourceType_Jaguar, - kResourceType_Joystick, - kResourceType_Kinect, - kResourceType_KinectStick, - kResourceType_PIDController, - kResourceType_Preferences, - kResourceType_PWM, - kResourceType_Relay, - kResourceType_RobotDrive, - kResourceType_SerialPort, - kResourceType_Servo, - kResourceType_Solenoid, - kResourceType_SPI, - kResourceType_Task, - kResourceType_Ultrasonic, - kResourceType_Victor, - kResourceType_Button, - kResourceType_Command, - kResourceType_AxisCamera, - kResourceType_PCVideoServer, - kResourceType_SmartDashboard, - kResourceType_Talon, - kResourceType_HiTechnicColorSensor, - kResourceType_HiTechnicAccel, - kResourceType_HiTechnicCompass, - kResourceType_SRF08, - } tResourceType; - - typedef enum - { - kLanguage_LabVIEW = 1, - kLanguage_CPlusPlus = 2, - kLanguage_Java = 3, - kLanguage_Python = 4, - - kCANPlugin_BlackJagBridge = 1, - kCANPlugin_2CAN = 2, - - kFramework_Iterative = 1, - kFramework_Simple = 2, - - kRobotDrive_ArcadeStandard = 1, - kRobotDrive_ArcadeButtonSpin = 2, - kRobotDrive_ArcadeRatioCurve = 3, - kRobotDrive_Tank = 4, - kRobotDrive_MecanumPolar = 5, - kRobotDrive_MecanumCartesian = 6, - - kDriverStationCIO_Analog = 1, - kDriverStationCIO_DigitalIn = 2, - kDriverStationCIO_DigitalOut = 3, - - kDriverStationEIO_Acceleration = 1, - kDriverStationEIO_AnalogIn = 2, - kDriverStationEIO_AnalogOut = 3, - kDriverStationEIO_Button = 4, - kDriverStationEIO_LED = 5, - kDriverStationEIO_DigitalIn = 6, - kDriverStationEIO_DigitalOut = 7, - kDriverStationEIO_FixedDigitalOut = 8, - kDriverStationEIO_PWM = 9, - kDriverStationEIO_Encoder = 10, - kDriverStationEIO_TouchSlider = 11, - - kADXL345_SPI = 1, - kADXL345_I2C = 2, - - kCommand_Scheduler = 1, - - kSmartDashboard_Instance = 1, - } tInstances; - - /** - * Report the usage of a resource of interest. - * - * @param resource one of the values in the tResourceType above (max value 51). - * @param instanceNumber an index that identifies the resource instance. - * @param context an optional additional context number for some cases (such as module number). Set to 0 to omit. - * @param feature a string to be included describing features in use on a specific resource. Setting the same resource more than once allows you to change the feature string. - */ - uint32_t EXPORT_FUNC report(tResourceType resource, uint8_t instanceNumber, uint8_t context = 0, const char *feature = NULL); -} - -#ifdef __cplusplus -extern "C" { -#endif - - uint32_t EXPORT_FUNC FRC_NetworkCommunication_nUsageReporting_report(uint8_t resource, uint8_t instanceNumber, uint8_t context, const char *feature); - -#ifdef __cplusplus -} -#endif - -#endif // __UsageReporting_h__ + +#ifndef __UsageReporting_h__ +#define __UsageReporting_h__ + +#ifdef SIMULATION +#include +#define EXPORT_FUNC __declspec(dllexport) __cdecl +#elif defined (__vxworks) +#include +#define EXPORT_FUNC +#else +#include +#include +#define EXPORT_FUNC +#endif + +#define kUsageReporting_version 1 + +namespace nUsageReporting +{ + typedef enum + { + kResourceType_Controller, + kResourceType_Module, + kResourceType_Language, + kResourceType_CANPlugin, + kResourceType_Accelerometer, + kResourceType_ADXL345, + kResourceType_AnalogChannel, + kResourceType_AnalogTrigger, + kResourceType_AnalogTriggerOutput, + kResourceType_CANJaguar, + kResourceType_Compressor, + kResourceType_Counter, + kResourceType_Dashboard, + kResourceType_DigitalInput, + kResourceType_DigitalOutput, + kResourceType_DriverStationCIO, + kResourceType_DriverStationEIO, + kResourceType_DriverStationLCD, + kResourceType_Encoder, + kResourceType_GearTooth, + kResourceType_Gyro, + kResourceType_I2C, + kResourceType_Framework, + kResourceType_Jaguar, + kResourceType_Joystick, + kResourceType_Kinect, + kResourceType_KinectStick, + kResourceType_PIDController, + kResourceType_Preferences, + kResourceType_PWM, + kResourceType_Relay, + kResourceType_RobotDrive, + kResourceType_SerialPort, + kResourceType_Servo, + kResourceType_Solenoid, + kResourceType_SPI, + kResourceType_Task, + kResourceType_Ultrasonic, + kResourceType_Victor, + kResourceType_Button, + kResourceType_Command, + kResourceType_AxisCamera, + kResourceType_PCVideoServer, + kResourceType_SmartDashboard, + kResourceType_Talon, + kResourceType_HiTechnicColorSensor, + kResourceType_HiTechnicAccel, + kResourceType_HiTechnicCompass, + kResourceType_SRF08, + } tResourceType; + + typedef enum + { + kLanguage_LabVIEW = 1, + kLanguage_CPlusPlus = 2, + kLanguage_Java = 3, + kLanguage_Python = 4, + + kCANPlugin_BlackJagBridge = 1, + kCANPlugin_2CAN = 2, + + kFramework_Iterative = 1, + kFramework_Simple = 2, + + kRobotDrive_ArcadeStandard = 1, + kRobotDrive_ArcadeButtonSpin = 2, + kRobotDrive_ArcadeRatioCurve = 3, + kRobotDrive_Tank = 4, + kRobotDrive_MecanumPolar = 5, + kRobotDrive_MecanumCartesian = 6, + + kDriverStationCIO_Analog = 1, + kDriverStationCIO_DigitalIn = 2, + kDriverStationCIO_DigitalOut = 3, + + kDriverStationEIO_Acceleration = 1, + kDriverStationEIO_AnalogIn = 2, + kDriverStationEIO_AnalogOut = 3, + kDriverStationEIO_Button = 4, + kDriverStationEIO_LED = 5, + kDriverStationEIO_DigitalIn = 6, + kDriverStationEIO_DigitalOut = 7, + kDriverStationEIO_FixedDigitalOut = 8, + kDriverStationEIO_PWM = 9, + kDriverStationEIO_Encoder = 10, + kDriverStationEIO_TouchSlider = 11, + + kADXL345_SPI = 1, + kADXL345_I2C = 2, + + kCommand_Scheduler = 1, + + kSmartDashboard_Instance = 1, + } tInstances; + + /** + * Report the usage of a resource of interest. + * + * @param resource one of the values in the tResourceType above (max value 51). + * @param instanceNumber an index that identifies the resource instance. + * @param context an optional additional context number for some cases (such as module number). Set to 0 to omit. + * @param feature a string to be included describing features in use on a specific resource. Setting the same resource more than once allows you to change the feature string. + */ + uint32_t EXPORT_FUNC report(tResourceType resource, uint8_t instanceNumber, uint8_t context = 0, const char *feature = NULL); +} + +#ifdef __cplusplus +extern "C" { +#endif + + uint32_t EXPORT_FUNC FRC_NetworkCommunication_nUsageReporting_report(uint8_t resource, uint8_t instanceNumber, uint8_t context, const char *feature); + +#ifdef __cplusplus +} +#endif + +#endif // __UsageReporting_h__