Skip to content

Commit 12cc97d

Browse files
authored
Merge pull request RobTillaart#159 from RobTillaart/develop
0.2.2 major updates XMLWriter
2 parents 6680ecd + 5b156b7 commit 12cc97d

File tree

17 files changed

+1204
-150
lines changed

17 files changed

+1204
-150
lines changed

libraries/XMLWriter/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2013-2020 Rob Tillaart
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

libraries/XMLWriter/README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# XMLWriter
2+
3+
Arduino Library to create simple XML (messages, files, print, ...)
4+
5+
## Description
6+
7+
The XMLWriter class supports generating XML files and send these over a stream
8+
like Ethernet SD.File or Serial.
9+
10+
When instantiating an XMLWriter one can define the internal buffer size.
11+
This buffering makes the output faster, especially for Ethernet and SD.File.
12+
The buffer size should be at least 2 bytes.
13+
A bigger buffer is often faster but it also depends on the properties of the
14+
stream to see real performance gains.
15+
E.g. the baudrate and internal buffer of Serial, packet behaviour of Ethernet,
16+
or paging of SD cards.
17+
So if performance is an issue one should do some testruns with different sizes
18+
for the buffer and choose one that is appropriate.
19+
20+
Indicative sizes based upon the examples.
21+
Run your tests to find your application optimum.
22+
23+
| STREAM | SIZE |
24+
|:------------|:----------|
25+
| Ethernet | 20-30 |
26+
| Serial | 5 |
27+
| SD File | 10-16 |
28+
29+
Important to know when usinig buffering is that your code should always include
30+
a call to **XML.flush()** at the end of the XML generation to flush the buffer.
31+
32+
## Operation
33+
34+
See examples
35+

0 commit comments

Comments
 (0)