ControlString

  • Base type OctetString
  • Range 0 — 255

This data type is used to communicate with a modem or a serial data switch. A ControlString contains embedded commands to control how the device will interact with the remote device through the serial interface. Commands are represented as two-character sequences beginning with the '^' character. The following commands are recognized by the device (note that command characters are case sensitive): ^s Send string that follows, which is terminated by the next command or the end of string. ^c Delay for the number of seconds that follows. Toss out any data received rather than store it in a buffer for parsing. ^t Set timeout to the value represented by the decimal digits that follow. The default timeout is 20 seconds. Note that this timeout may be overridden by a smaller serialTimeout configured for the associated serial interface (see serialConfigTable). ^w Wait for the reply string that follows, which is terminated by the next command or the end of string. Partial and case-insensitive matching is applied, i.e., if the reply string (any case combination) is found anywhere in the received string, then the a match is found. If the current timeout elapses without a match, then the remaining control string is ignored. ^! The ^ character. ^d Delay the number of seconds specified by the decimal digits that follow. ^b Send break for the number of milliseconds specified by the decimal digits that follow. If no digits follow, break will be enforced for 250 milliseconds by default. The following ASCII control characters may be inserted into the '^s' send string or the '^w' reply string: ^@ 0x00 ^A 0x01 .. ^M 0x0D .. ^Z 0x1A ^[ 0x1B ^ 0x1C ^] 0x1D ^^ 0x1E ^_ 0x1F Binary data may also be inserted into the data stream. The control sequence for each byte of binary data is ^0x##, where ## is the hexadecimal representation of the data byte. Two ASCII characters (0-9, a-f, A-F) must follow the '^0x' control prefix. For example, '^0x0D^0x0A' is interpreted as a carriage return followed by a line feed.