mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Add all of the most recent headers and .SOs Also make DriverStation work with the new FRC comm protocol, using the new functions for getting status data Change-Id: I1c7fc5f90e72c5fbebf87d9923ce0967ed0ef3bc Initial HAL support for v13 ds Change-Id: I9a7f37ef8e24241598fa3981cb3df30c07c52e0f New ds stuff in the HAL Change-Id: I025910625453baf63f79f49bbc70ba8b2f093f50 New ds stuff in C++ Joysticks are still todo Driver station IO is pulled out Change-Id: I1bb59037c097713bd943e7bef00e12f67f13c3ac New ds works in C++ and Java. Joysticks still todo Change-Id: Ic93f8686856761badc592eceaf05964f52355578 Make joysticks work again with the v13 image protocol Change-Id: Ief7ee95d3398c2262ca07ab7d60499af3c8f60f7
200 lines
6.4 KiB
C++
200 lines
6.4 KiB
C++
// Copyright (c) National Instruments 2008. All Rights Reserved.
|
|
// Do Not Edit... this file is generated!
|
|
|
|
#ifndef __nFRC_2015_1_0_7_Encoder_h__
|
|
#define __nFRC_2015_1_0_7_Encoder_h__
|
|
|
|
#include "tSystemInterface.h"
|
|
|
|
namespace nFPGA
|
|
{
|
|
namespace nFRC_2015_1_0_7
|
|
{
|
|
|
|
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_7_Encoder_h__
|