Module control_strings

Source
Expand description

Control Strings.

A control string is a string of bit combinations which may occur in the data stream as a logical entity for control purposes. A control string consists of an opening delimiter, a command string or a character string, and a terminating delimiter, the STRING TERMINATOR (ST).

A command string is a sequence of bit combinations in the range 00/08 to 00/13 and 02/00 to 07/14.

A character string is a sequence of any bit combination, except those representing START OF STRING (SOS) or STRING TERMINATOR (ST).

The low-level ansi control codes for control strings are defined in the module c1.

  • APPLICATION PROGRAM COMMAND (APC)
  • DEVICE CONTROL STRING (DCS)
  • OPERATING SYSTEM COMMAND (OSC)
  • PRIVACY MESSAGE (PM)
  • START OF STRING (SOS)
  • STRING TERMINATOR (ST)

This module contains higher level functions to invoke these low-level ansi control codes.

§Usage

Invoke one of the available functions to create new control strings.

For example, create a new operating system command to halt the operating system (this is operating system specific and will most likely not work on your operating system).

use ansi_control_codes::control_strings::operating_system_command;
let halt_command = operating_system_command("HALT");
println!("{}", halt_command);

Functions§

application_program_command
Creates a new Application Program Command.
control_string
Creates a new Control String.
device_control_string
Creates a new Device Control String.
operating_system_command
Creates a new Operating System Command.
privacy_message
Creates a new Privacy Message.