Produkt prisen 2009
- Winner in the IT category

SStream

The Stream Toolbox contains a wide variety of tools usable for working with streams of different sorts. These streams can be used on their own, or in combination with other tools that uses streams, e.g. the Modbus tool.

Stream menu

By using a general stream "concept" it is possible to e.g simulate a serial port by feeding data from a file.

FileStream IconFile Stream

Represents a file on disk, either for reading or writing, but never both.

SerialStream IconSerial Stream

A serial port (usually RS-232) is a very common interface to use for talking to embedded devices, either directly or using some standard protocol such as a Modbus.

StringStream IconString Stream

Sometimes it is usable to stream data to a receiver (or read from a sender) without having to rely on an existing resource, here the string stream can be very usable by provding a stream interface for an input string and an output string.

BufferStream IconBuffer Stream

A buffer supports both reading and writing, data written to it can be read from it again in a FIFO (first-in-first-out) manner. This makes it look slightly like a String Stream, but without any need to fiddle with too many strings.

Methods

Read String IconRead String

Reads a number of characters from a stream and stores them in a string.

Read Until IconRead Until

Read a string terminated by a number of characters from a stream, e.g. to read a string terminated by a ":" character.

Read Line IconRead Line

A specialisation of the Read Until method, but where the string is terminated by one or more new line character. Using this method is usually easier because you do not have to remember how a particular newline combination looks on a specific operating system.

Write String IconWrite String

Writes a string to a stream.

Write String Element Setup

Optionally you can tell the tool to automatically add a newline at the end of the string to write.

Errors

All read/write tool methods in the stream tool can report the following errors back.

TimeoutExecutionError

The operation timed out.

StreamNotOpenExecutionError

Reported when trying to read/write to a stream that is not yet open.

OperationNotSupportedError

If you try to write to a stream that does not support writing (e.g. a file opened in read mode) - or reading from a stream that does not support reading.