WPILibC++  unspecified
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Pages
LoadOut.h
1 
2 #ifndef __LoadOut_h__
3 #define __LoadOut_h__
4 
5 #ifdef SIMULATION
6 #include <vxWorks_compat.h>
7 #define EXPORT_FUNC __declspec(dllexport) __cdecl
8 #else
9 #include <stdint.h>
10 #define EXPORT_FUNC
11 #endif
12 
13 #define kMaxModuleNumber 2
14 namespace nLoadOut {
15 #if defined(SIMULATION)
16 typedef enum {
17  kModuleType_Unknown = 0x00,
18  kModuleType_Analog = 0x01,
19  kModuleType_Digital = 0x02,
20  kModuleType_Solenoid = 0x03,
21 } tModuleType;
22 bool EXPORT_FUNC
23 getModulePresence(tModuleType moduleType, uint8_t moduleNumber);
24 #endif
25 typedef enum {
26  kTargetClass_Unknown = 0x00,
27  kTargetClass_FRC1 = 0x10,
28  kTargetClass_FRC2 = 0x20,
29  kTargetClass_FRC3 = 0x30,
30  kTargetClass_RoboRIO = 0x40,
31 #if defined(SIMULATION)
32  kTargetClass_FRC2_Analog = kTargetClass_FRC2 | kModuleType_Analog,
33  kTargetClass_FRC2_Digital = kTargetClass_FRC2 | kModuleType_Digital,
34  kTargetClass_FRC2_Solenoid = kTargetClass_FRC2 | kModuleType_Solenoid,
35 #endif
36  kTargetClass_FamilyMask = 0xF0,
37  kTargetClass_ModuleMask = 0x0F,
38 } tTargetClass;
39 tTargetClass EXPORT_FUNC getTargetClass();
40 }
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
46 #if defined(SIMULATION)
47 uint32_t EXPORT_FUNC
48 FRC_NetworkCommunication_nLoadOut_getModulePresence(uint32_t moduleType,
49  uint8_t moduleNumber);
50 #endif
51 uint32_t EXPORT_FUNC FRC_NetworkCommunication_nLoadOut_getTargetClass();
52 
53 #ifdef __cplusplus
54 }
55 #endif
56 
57 #endif // __LoadOut_h__