aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino/Stream.h
AgeCommit message (Collapse)Author
2022-03-07rename arduino core dir to xinputHEADmasterHampusM
2021-05-26Correct typos in comments and documentationper1234
2017-07-07Update comments to reflect Stream functions changed from private to protectedper1234
These functions were changed from private to protected in https://github.com/arduino/Arduino/commit/99f2a2755349784835130147e46cb61659b85893 but the comments were not updated at that time. In conjunction with equivalent pull requests to Arduino SAM Boards and Arduino SAMD Boards, solves https://github.com/arduino/Arduino/issues/6146.
2017-05-23Move the flush method from Stream to PrintMatthijs Kooijman
This method originally flushed pending input bytes, which makes sense in Stream. At some point it was changed to flush output bytes instead, but it was never moved to Print to reflect this. Since Stream inherits from Print, this should not really affect any users of the Stream or Print classes. However to prevent problems with existing implementations of the Print class that do not provide a flush() implementation, a default implementation is provided. We should probably remove this at some point in the future, though.
2016-03-18Add getTimeout accessor method.mattb5906
2015-11-23Make protected Stream::parseInt/Float overloads public.Chris--A
Stream::parseInt & Stream::parseFloat previously had protected overloads which allowed skipping a custom character. This commit brings this feature to the public interface. To keep the public API simpler, the single paramter overload remains protected. However its functionality is available in the public interface using the two parameter overload.
2015-11-23This adds control of Stream::parseInt/float lookahead.Chris--A
Its default is SKIP_ALL which reflects previous versions. However SKIP_NONE, and SKIP_WHITESPACE can refine this behaviour. A parameter used in the protected overloads of parseInt/Float has been changed from `skipChar` to `ignore`.
2015-11-23This commit improves the parsing capability by allowing decimals onlyChris--A
prefixed by an '.' character. Previously the preceeding zero must be present: '0.'
2015-06-01Add a Stream::find(char) methodMartino Facchin
2015-03-24Stream: set findMulti function as protectedMartino Facchin
let's not expose it until the API is not accepted widely by the dev mailing list
2015-03-24Fix findUntil in Stream libraryJim Leonard (Xuth)
PR #2696 without timeout-related changes
2013-12-24Add uint8_t* versions of methods in StreamMatthijs Kooijman
The new functions just call their char* equivalents, but this allows reading bytes into a buffer of uint8_t as well as chars.
2013-05-06Stream "_timeout" field and related methods are now protected instead of ↵Cristian Maglie
private. This allows better optimization on classes that extends Stream without losing timeout capabilities.
2012-05-16Adding readString() and readStringUntil() to Stream (Adrian McEwen).David A. Mellis
This isn't necessarily a particularly efficient implementation (it allocates memory one character at a time and so may lead to fragmentation) but it seems to work. http://code.google.com/p/arduino/issues/detail?id=454
2011-11-19readBytes() and readBytesUntil() handle zero bytes and return # of bytes read.David A. Mellis
http://code.google.com/p/arduino/issues/detail?id=586
2011-10-29Protecting the version of parseInt() and parseFloat(). (Paul Stoffregen)David A. Mellis
This should allow us more flexibility in determining how to handle these functions later. For example, in specifying that initial characters shouldn't be skipped. http://code.google.com/p/arduino/issues/detail?id=698
2011-10-02Fixing warnings in Stream (Paul Stoffregen)David A. Mellis
http://code.google.com/p/arduino/issues/detail?id=208
2011-09-09Don't consume trailing char in parseInt() and parseFloat (Paul Stoffregen).David A. Mellis
http://code.google.com/p/arduino/issues/detail?id=624
2011-08-17A few API changes to new Stream parsing functions.David A. Mellis
Renamed readChars() -> readBytes(), readCharsUntil() -> readBytesUntil(). Changed timeouts to milliseconds from seconds; default from 5 to 1 seconds. Removed readCharsBetween().
2011-08-17Integrating Stream searching & parsing (Michael Margolis)David A. Mellis
This from Michael's TextFinder library, incorporated into the Stream class: find(), findUntil(), parseInt(), parseFloat(), readChars(), readCharsUntil(), readCharsBetween(), setTimeout().
2010-11-20SD File object implements Stream.David A. Mellis
Added peak() and available() using a single byte buffer. Added flush().
2010-08-11Making Client inherit from Stream, which unforunately means taking peek() ↵David A. Mellis
out of Stream for now, since there's no immediate implementation for Client.
2010-08-02changing available() to return an int (because the Ethernet Client class or ↵David A. Mellis
another stream might need more than 255 bytes).
2010-07-04Adding a peek() function to Stream and HardwareSerial (Serial).David A. Mellis
2010-05-28Adding a basic Stream interface and modifying HardwareSerial to inherit from it.David A. Mellis