C# Class SirenOfShame.Lib.Device.SirenOfShameDevice

Inheritance: ISirenOfShameDevice
Show file Open project: AutomatedArchitecture/SirenOfShame Class Usage Examples

Public Methods

Method Description
Disconnect ( ) : void
ManualControl ( SirenOfShame.Lib.Device.ManualControlData manualControlData ) : void
PerformFirmwareUpgrade ( Stream hexFileStream, Action progressFunc ) : void
PlayAudioPattern ( SirenOfShame.Lib.Device.AudioPattern audioPattern, System.TimeSpan durationTimeSpan ) : void
PlayLightPattern ( SirenOfShame.Lib.Device.LedPattern lightPattern, System.TimeSpan durationTimeSpan ) : void
ReadDeviceInfo ( ) : SirenOfShame.Lib.Device.SirenOfShameInfo
SirenOfShameDevice ( ) : System
StopAudioPattern ( ) : void
StopLightPattern ( ) : void
TryConnect ( ) : bool
UploadCustomPatterns ( IEnumerable audioPatterns, IEnumerable ledPatterns, Action progressFunc ) : void
WndProc ( Message &message ) : void

Private Methods

Method Description
BeginAsyncRead ( ) : void
CalculateDurationFromTimeSpan ( System.TimeSpan durationTimeSpan ) : UInt16
CheckConnection ( ) : void
EnsureConnected ( ) : void
FindDevice ( ) : UsbLib.DeviceInterface
OnConnected ( ) : void
OnDisconnected ( ) : void
OnRead ( IAsyncResult ar ) : void
ReadAudioPatterns ( ) : void
ReadLedPatterns ( ) : void
SendControlPacket ( ControlByte1Flags controlByte = ControlByte1Flags.Ignore, byte audioMode = (byte)0xff, UInt16 audioDuration = (UInt16)0xffff, byte ledMode = (byte)0xff, UInt16 ledDuration = (UInt16)0xffff, byte readAudioIndex = (byte)0xff, byte readLedIndex = (byte)0xff, byte manualLeds0 = (byte)0xff, byte manualLeds1 = (byte)0xff, byte manualLeds2 = (byte)0xff, byte manualLeds3 = (byte)0xff, byte manualLeds4 = (byte)0xff ) : void
SendData ( int address, Stream stream ) : void
_usbDeviceNotification_UsbDeviceArrived ( object sender, EventArgs e ) : void

Method Details

Disconnect() public method

public Disconnect ( ) : void
return void

ManualControl() public method

public ManualControl ( SirenOfShame.Lib.Device.ManualControlData manualControlData ) : void
manualControlData SirenOfShame.Lib.Device.ManualControlData
return void

PerformFirmwareUpgrade() public method

public PerformFirmwareUpgrade ( Stream hexFileStream, Action progressFunc ) : void
hexFileStream Stream
progressFunc Action
return void

PlayAudioPattern() public method

public PlayAudioPattern ( SirenOfShame.Lib.Device.AudioPattern audioPattern, System.TimeSpan durationTimeSpan ) : void
audioPattern SirenOfShame.Lib.Device.AudioPattern
durationTimeSpan System.TimeSpan
return void

PlayLightPattern() public method

public PlayLightPattern ( SirenOfShame.Lib.Device.LedPattern lightPattern, System.TimeSpan durationTimeSpan ) : void
lightPattern SirenOfShame.Lib.Device.LedPattern
durationTimeSpan System.TimeSpan
return void

ReadDeviceInfo() public method

public ReadDeviceInfo ( ) : SirenOfShame.Lib.Device.SirenOfShameInfo
return SirenOfShame.Lib.Device.SirenOfShameInfo

SirenOfShameDevice() public method

public SirenOfShameDevice ( ) : System
return System

StopAudioPattern() public method

public StopAudioPattern ( ) : void
return void

StopLightPattern() public method

public StopLightPattern ( ) : void
return void

TryConnect() public method

public TryConnect ( ) : bool
return bool

UploadCustomPatterns() public method

public UploadCustomPatterns ( IEnumerable audioPatterns, IEnumerable ledPatterns, Action progressFunc ) : void
audioPatterns IEnumerable
ledPatterns IEnumerable
progressFunc Action
return void

WndProc() public method

public WndProc ( Message &message ) : void
message Message
return void