PixelLightAPI  .
Public Types | Public Member Functions
PLInput::WiiMote Class Reference

WiiMote input device. More...

#include <WiiMote.h>

Inheritance diagram for PLInput::WiiMote:
Inheritance graph
[legend]

List of all members.

Public Types

enum  EProductID {
  VendorID = 0x057e, ProductID = 0x0306, DeviceClass0 = 0x04, DeviceClass1 = 0x25,
  DeviceClass2 = 0x00
}
enum  EReport {
  ReportStatus = 0x20, ReportReadMemory = 0x21, ReportButtons = 0x30, ReportButtonsAccel = 0x31,
  ReportButtonsAccelIR = 0x33, ReportButtonsAccelExt = 0x35, ReportButtonsAccelIRExt = 0x37
}
 Report type. More...
enum  EIRMode { IROff = 0x00, IRBasic = 0x01, IRExtended = 0x03, IRFull = 0x05 }
 Infrared sensor mode. More...
enum  EExtension { ExtNone = 0x0000, ExtNunchuk = 0xfefe, ExtClassic = 0xfdfd, ExtPartiallyInserted = 0xffff }
 WiiMote extension. More...

Public Member Functions

PLINPUT_API WiiMote (const PLCore::String &sName, DeviceImpl *pImpl)
 Constructor.
virtual PLINPUT_API ~WiiMote ()
 Destructor.
PLINPUT_API EReport GetReportMode () const
 Get report mode.
PLINPUT_API void SetReportMode (EReport nReportMode, bool bContinuous=false)
 Set report mode.
PLINPUT_API EIRMode GetIRMode () const
 Get infrared mode.
PLINPUT_API void SetIRMode (EIRMode nIRMode)
 Set infrared mode.
PLINPUT_API EExtension GetExtension () const
 Get extension.
PLINPUT_API PLCore::uint8 GetBattery () const
 Get battery state.
PLINPUT_API void Calibrate ()
 Calibrate device.
virtual PLINPUT_API void UpdateOutputControl (Control *pControl) override
 Update output controls (LEDs, effects etc.)

Detailed Description

WiiMote input device.

Remarks:
This class supports the following device backend types:
  • ConnectionDevice

Member Enumeration Documentation

Enumerator:
VendorID 

'Nintendo'

ProductID 

'Wiimote'

DeviceClass0 
DeviceClass1 
DeviceClass2 

Report type.

Enumerator:
ReportStatus 

Status report

ReportReadMemory 

Data from memory

ReportButtons 

Buttons

ReportButtonsAccel 

Buttons and acceleration

ReportButtonsAccelIR 

Buttons, acceleration and IR (extended)

ReportButtonsAccelExt 

Buttons, acceleration and extension

ReportButtonsAccelIRExt 

Buttons, acceleration, IR (basic) and extension

Infrared sensor mode.

Enumerator:
IROff 

IR off

IRBasic 

Basic IR mode

IRExtended 

Extended IR mode

IRFull 

Full IR mode

WiiMote extension.

Enumerator:
ExtNone 

No extension

ExtNunchuk 

Nunchuk

ExtClassic 

Classic controller

ExtPartiallyInserted 

Extension not inserted correctly


Constructor & Destructor Documentation

PLINPUT_API PLInput::WiiMote::WiiMote ( const PLCore::String sName,
DeviceImpl *  pImpl 
)

Constructor.

Parameters:
[in]sNameDevice name
[in]pImplSystem specific device implementation, must be valid!
virtual PLINPUT_API PLInput::WiiMote::~WiiMote ( ) [virtual]

Destructor.


Member Function Documentation

Get report mode.

Returns:
Report mode
PLINPUT_API void PLInput::WiiMote::SetReportMode ( EReport  nReportMode,
bool  bContinuous = false 
)

Set report mode.

Parameters:
[in]nReportModeReport mode
[in]bContinuousContinuous updates?
PLINPUT_API EIRMode PLInput::WiiMote::GetIRMode ( ) const

Get infrared mode.

Returns:
Infrared mode
PLINPUT_API void PLInput::WiiMote::SetIRMode ( EIRMode  nIRMode)

Set infrared mode.

Parameters:
[in]nIRModeInfrared mode

Get extension.

Returns:
Extension type
PLINPUT_API PLCore::uint8 PLInput::WiiMote::GetBattery ( ) const

Get battery state.

Returns:
Battery state
PLINPUT_API void PLInput::WiiMote::Calibrate ( )

Calibrate device.

virtual PLINPUT_API void PLInput::WiiMote::UpdateOutputControl ( Control pControl) [override, virtual]

Update output controls (LEDs, effects etc.)

Parameters:
[in]pControlOutput control that has been changed, must be valid!
Remarks:
This function is called whenever an output control such as LED or Effect has been changed. A device should use this function to update the specific control state on the device (or update all output controls at the same time)
Note:
  • The default implementation is empty

Reimplemented from PLInput::Controller.


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


PixelLight PixelLight 0.9.10-R1
Copyright (C) 2002-2011 by The PixelLight Team
Last modified Fri Dec 23 2011 15:51:19
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported