JoyCon.NET
Public Types | Public Member Functions | Static Public Member Functions | Properties
InputSimple Class Reference

Simple input report from the Joy-Con controller. More...

Inheritance diagram for InputSimple:
Inheritance graph
[legend]
Collaboration diagram for InputSimple:
Collaboration graph
[legend]

Public Types

enum class  HatPosition : byte {
  Up = 0x00 , UpRight = 0x01 , Right = 0x02 , DownRight = 0x03 ,
  Down = 0x04 , DownLeft = 0x05 , Left = 0x06 , UpLeft = 0x07 ,
  Center = 0x08
}
 The possible positions of the stick. More...
 

Public Member Functions

override string ToString ()
 

Static Public Member Functions

static InputSimple FromBytes (byte[] data)
 Creates an InputSimple object from raw data. More...
 

Properties

byte ReportId [get]
 Gets the HID report ID. More...
 
ButtonsSimple Buttons [get]
 Gets the simple button data. More...
 
HatPosition StickHatPosition [get]
 Gets the simple stick hat data as when controller is held sideways. More...
 
IStickPosition ProConLeftStick [get]
 Gets the left stick data of the Pro Controller. More...
 
IStickPosition ProConRightStick [get]
 Gets the right stick data of the Pro Controller. More...
 
- Properties inherited from IJoyConReport
byte ReportId [get]
 HID report ID. More...
 

Detailed Description

Simple input report from the Joy-Con controller.

Member Enumeration Documentation

◆ HatPosition

enum InputSimple.HatPosition : byte
strong

The possible positions of the stick.

Enumerator
Up 

Stick is in the up position.

UpRight 

Stick is in the up-right position.

Right 

Stick is in the right position.

DownRight 

Stick is in the down-right position.

Down 

Stick is in the down position.

DownLeft 

Stick is in the down-left position.

Left 

Stick is in the left position.

UpLeft 

Stick is in the up-left position.

Center 

Stick is in the center position.

Member Function Documentation

◆ FromBytes()

static InputSimple InputSimple.FromBytes ( byte[]  data)
inlinestatic

Creates an InputSimple object from raw data.

Parameters
dataThe raw data.
Returns
The created InputSimple object.
Exceptions
InvalidDataExceptionThrown when there is not enough data to fill the InputSimple class.

Property Documentation

◆ ReportId

byte InputSimple.ReportId
get

Gets the HID report ID.

◆ Buttons

ButtonsSimple InputSimple.Buttons
get

Gets the simple button data.

◆ StickHatPosition

HatPosition InputSimple.StickHatPosition
get

Gets the simple stick hat data as when controller is held sideways.

◆ ProConLeftStick

IStickPosition InputSimple.ProConLeftStick
get

Gets the left stick data of the Pro Controller.

◆ ProConRightStick

IStickPosition InputSimple.ProConRightStick
get

Gets the right stick data of the Pro Controller.