Ejemplo n.º 1
0
 public static I2CEvint EvintI2C(this ArduinoSession session)
 {
     return(session.GetEvint(() => new I2CEvint(session)));
 }
Ejemplo n.º 2
0
        ///// <inheritdoc cref="IStringProtocol.ReadLine"/>
        //public static string ReadLine(this ArduinoSession session)
        //{
        //    return session.messageHeader.GetStringFromQueue(StringRequest.CreateReadLineRequest());
        //}

        ///// <inheritdoc cref="IStringProtocol.ReadLineAsync"/>
        //public static async Task<string> ReadLineAsync(this ArduinoSession session)
        //{
        //    return await Task.Run(() => session.messageHeader.GetStringFromQueue(StringRequest.CreateReadLineRequest()));
        //}

        ///// <inheritdoc cref="IStringProtocol.Read"/>
        //public static string Read(this ArduinoSession session, int length = 1)
        //{
        //    if (length < 0)
        //        throw new ArgumentOutOfRangeException(nameof(length), Messages.ArgumentEx_PositiveValue);

        //    return session.messageHeader.GetStringFromQueue(StringRequest.CreateReadRequest(length));
        //}

        ///// <inheritdoc cref="IStringProtocol.ReadAsync"/>
        //public static async Task<string> ReadAsync(this ArduinoSession session, int length = 1)
        //{
        //    if (length < 0)
        //        throw new ArgumentOutOfRangeException(nameof(length), Messages.ArgumentEx_PositiveValue);

        //    return await Task.Run(() => session.messageHeader.GetStringFromQueue(StringRequest.CreateReadRequest(length)));
        //}

        ///// <inheritdoc cref="IStringProtocol.ReadTo"/>
        //public static string ReadTo(this ArduinoSession session, char terminator = char.MinValue)
        //{
        //    return session.messageHeader.GetStringFromQueue(StringRequest.CreateReadRequest(terminator));
        //}

        ///// <inheritdoc cref="IStringProtocol.ReadToAsync"/>
        //public static async Task<string> ReadToAsync(this ArduinoSession session, char terminator = char.MinValue)
        //{
        //    return await Task.Run(() => session.messageHeader.GetStringFromQueue(StringRequest.CreateReadRequest(terminator)));
        //}


        public static StringEvint EvintString(this ArduinoSession session)
        {
            return(session.GetEvint(() => new StringEvint(session)));
        }
Ejemplo n.º 3
0
 public static FirmataEvint EvintFirmata(this ArduinoSession session)
 {
     return(session.GetEvint(() => new FirmataEvint(session)));
 }
Ejemplo n.º 4
0
 public static AccelStepperEvint EvintAccelStepper(this ArduinoSession session)
 {
     return(session.GetEvint(() => new AccelStepperEvint(session)));
 }
Ejemplo n.º 5
0
 public static SerialEvint EvintSerial(this ArduinoSession session)
 {
     return(session.GetEvint(() => new SerialEvint(session)));
 }