Now you can download a copy of these docs so you can use them offline! Download now

#include <DriverStationLCD.h>

Inheritance diagram for DriverStationLCD:
Collaboration diagram for DriverStationLCD:

Public Types

enum  Line {
  kMain_Line6 =0, kUser_Line1 =0, kUser_Line2 =1, kUser_Line3 =2,
  kUser_Line4 =3, kUser_Line5 =4, kUser_Line6 =5
}
 

Public Member Functions

void UpdateLCD ()
 
void Printf (Line line, int32_t startingColumn, const char *writeFmt,...)
 
void VPrintf (Line line, int32_t startingColumn, const char *writeFmt, va_list args)
 
void PrintfLine (Line line, const char *writeFmt,...)
 
void VPrintfLine (Line line, const char *writeFmt, va_list args)
 
void Clear ()
 
- Public Member Functions inherited from SensorBase
 SensorBase ()
 
virtual ~SensorBase ()
 
- Public Member Functions inherited from ErrorBase
virtual ErrorGetError ()
 Retrieve the current error. Get the current error information associated with this sensor.
 
virtual const ErrorGetError () const
 
virtual void SetErrnoError (const char *contextMessage, const char *filename, const char *function, uint32_t lineNumber) const
 Set error information associated with a C library call that set an error to the "errno" global variable. More...
 
virtual void SetImaqError (int success, const char *contextMessage, const char *filename, const char *function, uint32_t lineNumber) const
 Set the current error information associated from the nivision Imaq API. More...
 
virtual void SetError (Error::Code code, const char *contextMessage, const char *filename, const char *function, uint32_t lineNumber) const
 Set the current error information associated with this sensor. More...
 
virtual void SetWPIError (const char *errorMessage, const char *contextMessage, const char *filename, const char *function, uint32_t lineNumber) const
 Set the current error information associated with this sensor. More...
 
virtual void CloneError (ErrorBase *rhs) const
 
virtual void ClearError () const
 Clear the current error information associated with this sensor.
 
virtual bool StatusIsFatal () const
 Check if the current error code represents a fatal error. More...
 

Static Public Member Functions

static DriverStationLCDGetInstance ()
 
- Static Public Member Functions inherited from SensorBase
static void DeleteSingletons ()
 
static uint32_t GetDefaultAnalogModule ()
 
static uint32_t GetDefaultDigitalModule ()
 
static uint32_t GetDefaultSolenoidModule ()
 
static bool CheckAnalogModule (uint8_t moduleNumber)
 
static bool CheckDigitalModule (uint8_t moduleNumber)
 
static bool CheckPWMModule (uint8_t moduleNumber)
 
static bool CheckRelayModule (uint8_t moduleNumber)
 
static bool CheckSolenoidModule (uint8_t moduleNumber)
 
static bool CheckDigitalChannel (uint32_t channel)
 
static bool CheckRelayChannel (uint32_t channel)
 
static bool CheckPWMChannel (uint32_t channel)
 
static bool CheckAnalogChannel (uint32_t channel)
 
static bool CheckSolenoidChannel (uint32_t channel)
 
- Static Public Member Functions inherited from ErrorBase
static void SetGlobalError (Error::Code code, const char *contextMessage, const char *filename, const char *function, uint32_t lineNumber)
 
static void SetGlobalWPIError (const char *errorMessage, const char *contextMessage, const char *filename, const char *function, uint32_t lineNumber)
 
static ErrorGetGlobalError ()
 

Static Public Attributes

static const uint32_t kSyncTimeout_ms = 20
 
static const uint16_t kFullDisplayTextCommand = 0x9FFF
 
static const int32_t kLineLength = 21
 
static const int32_t kNumLines = 6
 
- Static Public Attributes inherited from SensorBase
static const uint32_t kSystemClockTicksPerMicrosecond = 40
 
static const uint32_t kDigitalChannels = 14
 
static const uint32_t kAnalogChannels = 8
 
static const uint32_t kAnalogModules = 2
 
static const uint32_t kDigitalModules = 2
 
static const uint32_t kSolenoidChannels = 8
 
static const uint32_t kSolenoidModules = 2
 
static const uint32_t kPwmChannels = 10
 
static const uint32_t kRelayChannels = 8
 
static const uint32_t kChassisSlots = 8
 

Protected Member Functions

 DriverStationLCD ()
 
- Protected Member Functions inherited from SensorBase
void AddToSingletonList ()
 
- Protected Member Functions inherited from ErrorBase
 ErrorBase ()
 Initialize the instance status to 0 for now.
 

Additional Inherited Members

- Protected Attributes inherited from ErrorBase
Error m_error
 
- Static Protected Attributes inherited from ErrorBase
static SEM_ID _globalErrorMutex = semMCreate(SEM_Q_PRIORITY | SEM_DELETE_SAFE | SEM_INVERSION_SAFE)
 
static Error _globalError
 

Detailed Description

Provide access to "LCD" on the Driver Station. This is the Messages box on the DS Operation tab.

Buffer the printed data locally and then send it when UpdateLCD is called.

Definition at line 19 of file DriverStationLCD.h.

Constructor & Destructor Documentation

DriverStationLCD::DriverStationLCD ( )
protected

DriverStationLCD contructor.

This is only called once the first time GetInstance() is called

Definition at line 25 of file DriverStationLCD.cpp.

Member Function Documentation

void DriverStationLCD::Clear ( )

Clear all lines on the LCD.

Definition at line 160 of file DriverStationLCD.cpp.

DriverStationLCD * DriverStationLCD::GetInstance ( )
static

Return a pointer to the singleton DriverStationLCD.

Definition at line 51 of file DriverStationLCD.cpp.

void DriverStationLCD::Printf ( Line  line,
int32_t  startingColumn,
const char *  writeFmt,
  ... 
)

Print formatted text to the Driver Station LCD text bufer.

Use UpdateLCD() periodically to actually send the text to the Driver Station.

Parameters
lineThe line on the LCD to print to.
startingColumnThe column to start printing to. This is a 1-based number.
writeFmtThe printf format string describing how to print.

Definition at line 78 of file DriverStationLCD.cpp.

void DriverStationLCD::PrintfLine ( Line  line,
const char *  writeFmt,
  ... 
)

Print formatted text to the Driver Station LCD text bufer. This function pads the line with empty spaces.

Use UpdateLCD() periodically to actually send the text to the Driver Station.

Parameters
lineThe line on the LCD to print to.
writeFmtThe printf format string describing how to print.

Definition at line 123 of file DriverStationLCD.cpp.

void DriverStationLCD::UpdateLCD ( )

Send the text data to the Driver Station.

Definition at line 63 of file DriverStationLCD.cpp.


The documentation for this class was generated from the following files:

Generated on Sat Apr 26 2014 12:26:46 for WPILibC++ by doxygen 1.8.6