/// <summary>
 /// Initializes a new instance of the <see cref="SerialPortDevice" /> class.
 /// </summary>
 /// <param name="parser">Parser used for incoming messages</param>
 /// <param name="device">The serial port.</param>
 /// <exception cref="System.ArgumentNullException">port</exception>
 public SerialPortDevice(IIncomingMessageParser parser, SerialDevice device) : base(parser)
 {
     if (device == null)
     {
         throw new ArgumentNullException("device");
     }
     m_port = device;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="InterfaceDevice"/> class.
 /// </summary>
 /// <param name="parser">Parser used for incoming messages</param>
 protected InterfaceDevice(IIncomingMessageParser parser)
 {
     this.m_parser = parser;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BufferedStreamDevice"/> class.
 /// </summary>
 /// <param name="readSpeed">The time to wait between each group of lines being read in milliseconds</param>
 /// <param name="parser">Parser used for incoming messages</param>
 ///
 protected BufferedStreamDevice(IIncomingMessageParser parser, int readSpeed) : base(parser)
 {
     m_readSpeed = readSpeed;
 }
Exemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BluetoothDevice"/> class.
 /// </summary>
 /// <param name="peer">The peer information device.</param>
 /// <param name="parser">Parser used for incoming messages</param>
 public BluetoothDevice(IIncomingMessageParser parser, Windows.Networking.Proximity.PeerInformation peer) : base(parser)
 {
     m_devicePeer = peer;
 }
Exemplo n.º 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BufferedStreamDevice"/> class.
 /// </summary>
 /// <param name="parser">Parser used for incoming messages</param>
 protected BufferedStreamDevice(IIncomingMessageParser parser) : this(parser, 1000)
 {
 }
Exemplo n.º 6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="StreamDevice"/> class.
 /// </summary>
 /// <param name="stream">The stream.</param>
 /// <param name="parser">Incoming message parser</param>
 public StreamDevice(Stream stream, IIncomingMessageParser parser) : base(parser)
 {
     m_stream = stream;
 }
Exemplo n.º 7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BluetoothDevice"/> class.
 /// </summary>
 /// <param name="service">The RF Comm Device service.</param>
 /// <param name="parser">Parser used for incoming messages</param>
 /// <param name="disposeService">Whether this devicee should also dispose the RfcommDeviceService provided when this device disposes.</param>
 public BluetoothDevice(IIncomingMessageParser parser, RfcommDeviceService service, bool disposeService = false) : base(parser)
 {
     m_deviceService  = service;
     m_disposeService = disposeService;
 }
Exemplo n.º 8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BluetoothDevice"/> class.
 /// </summary>
 /// <param name="device">The Android Bluetooth Device.</param>
 /// <param name="parser">Parser used for incoming messages</param>
 public BluetoothDevice(IIncomingMessageParser parser, Android.Bluetooth.BluetoothDevice device) : base(parser)
 {
     m_device = device;
 }
Exemplo n.º 9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="InterfaceDevice"/> class.
 /// </summary>
 /// <param name="parser">Parser used for incoming messages</param>
 /// <param name="fileName"></param>
 /// <param name="readSpeed">The time to wait between each group of lines being read in milliseconds</param>
 public FileDevice(IIncomingMessageParser parser, Windows.Storage.IStorageFile fileName, int readSpeed)
     : base(parser, readSpeed)
 {
     m_storageFile = fileName;
 }
Exemplo n.º 10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="InterfaceDevice"/> class.
 /// </summary>
 /// <param name="parser">Parser used for incoming messages</param>
 /// <param name="fileName"></param>
 /// <param name="readSpeed">The time to wait between each group of lines being read in milliseconds</param>
 public FileDevice(IIncomingMessageParser parser, string fileName, int readSpeed) : base(parser, readSpeed)
 {
     m_filename = fileName;
 }
Exemplo n.º 11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="InterfaceDevice"/> class.
 /// </summary>
 /// <param name="parser">Parser used for incoming messages</param>
 /// <param name="fileName"></param>
 public FileDevice(IIncomingMessageParser parser, Windows.Storage.IStorageFile fileName) : this(parser, fileName, 1000)
 {
 }
Exemplo n.º 12
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FileDevice"/> class.
 /// </summary>
 /// <param name="parser">Parser used for incoming messages</param>
 /// <param name="fileName"></param>
 public FileDevice(IIncomingMessageParser parser, string fileName) : this(parser, fileName, 1000)
 {
 }