C# Class HouseOfTheFuture.RF24Communicator.SerialCommunicationModule

显示文件 Open project: HouseOfTheFuture/IoT-Device

Public Methods

Method Description
ListAvailablePorts ( ) : Task>

ListAvailablePorts - Use SerialDevice.GetDeviceSelector to enumerate all serial devices - Attaches the DeviceInformation to the ListBox source so that DeviceIds are displayed

SelectDevice ( DeviceInformation device ) : void

comPortInput_Click: Action to take when 'Connect' button is clicked - Get the selected device index and use Id to create the SerialDevice object - Configure default settings for the serial port - Create the ReadCancellationTokenSource token - Start listening on the serial port input

SerialCommunicationModule ( ) : System

Private Methods

Method Description
OnLineRead ( object sender, string e ) : void

Method Details

ListAvailablePorts() public method

ListAvailablePorts - Use SerialDevice.GetDeviceSelector to enumerate all serial devices - Attaches the DeviceInformation to the ListBox source so that DeviceIds are displayed
public ListAvailablePorts ( ) : Task>
return Task>

SelectDevice() public method

comPortInput_Click: Action to take when 'Connect' button is clicked - Get the selected device index and use Id to create the SerialDevice object - Configure default settings for the serial port - Create the ReadCancellationTokenSource token - Start listening on the serial port input
public SelectDevice ( DeviceInformation device ) : void
device Windows.Devices.Enumeration.DeviceInformation
return void

SerialCommunicationModule() public method

public SerialCommunicationModule ( ) : System
return System