Ascii character escape sequences streamnet macros, Ascii character escape sequences, Streamnet macros – ClearOne StreamNet Integration User Manual
Page 23
Chapter 3: ASCII Overview
17
ASCII CHARACTER ESCAPE SEqUENCES
Sometimes characters which have a special meaning in an ASCII-based protocol will occur within text strings;
therefore, there must be a way to indicate that the character in a particular instance does NOT convey its
special meaning. This situation arises for StreamNet menu responses and status reports which have an XML
style format. The double quotation mark cannot occur within a string of characters without being confused with
the double quotation marks meant to enclose the string.
World Wide Web protocols use several methods for escaping characters and unfortunately all of these methods
have been used by StreamNet drivers in the past. Henceforth, the StreamNet ASCII protocol shall use only the
HTML style “nnnn;” format for escaping characters within literal strings (nnnn represents a decimal number
of multiple digits). There should not be a need to escape any characters besides the double quotation mark
but parsers should be prepared for any character to be escaped.
For historical purposes the various methods previously used for escaping the double quotation mark (“) are
listed here.
The double quotation mark, “, has been represented variously as:
"
"
"
%22
\”
STREAmNET mACROS
During configuration of the StreamNet system the integrator may define a quantity of “macros”. Macros are
a list of StreamNet commands that when invoked get executed in order. Variable time delays maybe added
between the execution of the commands. It is usually a StreamNet Root service which executes a macro.
When a macro is defined the integrator must give the macro a unique name. This name is later used to invoke
execution of the macro. Macros are very simple. Once a macro is invoked it continues until completion. There
are no conditional commands.
Macros can be invoked by third party controllers using the ASCII command, #mACRO.
Some system events may have macros attached to them. For example, the integrator may define a macro
to be executed when a GPIO input detects a contact closure. Another macro may be defined for when the
contact closure ends.