Rudiments: serialportprofile Class Reference

Rudiments

Public Types | Public Member Functions | List of all members
serialportprofile Class Reference

## Public Types
enum | inputmode_t { cannonical =0 , raw }
enum | flowcontrol_t { fc_none =0 , fc_software , fc_hardware }
enum | baudrate_t { baud_0 =0 , baud_50 , baud_75 , baud_110 , baud_134 , baud_150 , baud_200 , baud_300 , baud_600 , baud_1200 , baud_1800 , baud_2400 , baud_4800 , baud_9600 , baud_19200 , exta , baud_38400 , extb , baud_57600 , baud_76800 , baud_115200 , baud_230400 , baud_460800 , baud_500000 , baud_576000 , baud_921600 , baud_1000000 , baud_1152000 , baud_1500000 , baud_2000000 , baud_2500000 , baud_3000000 , baud_3500000 , baud_4000000 }
enum | charsize_t { cs_5 =0 , cs_6 , cs_7 , cs_8 }
enum | newlinedelay_t { nl_none =0 , nl_100 }
enum | carriagereturndelay_t { cr_none =0 , cr_depends , cr_100 , cr_150 }
enum | tabdelay_t { td_0 =0 , td_1 , td_2 , td_xtabs }
enum | backspacedelay_t { bs_none =0 , bs_50 }
enum | verticaltabdelay_t { vt_none =0 , vt_2 }
enum | formfeeddelay_t { ff_none =0 , ff_2 }

## Public Member Functions
| serialportprofile ()
| ~serialportprofile ()
void | defaultControlOptions ()
void | defaultLocalOptions ()
void | defaultInputOptions ()
void | defaultOutputOptions ()
void | defaultControlCharacters ()
void | defaultOptions ()
void | setControlCharacters (const unsigned char *c_cc)
void | evalOptionsString (const char *string)
void | inputMode (inputmode_t inputmode)
inputmode_t | inputMode ()
void | flowControl (flowcontrol_t flowcontrol)
flowcontrol_t | flowControl ()
void | baud (const char *baudrate)
void | baud (baudrate_t baudrate)
bool | inputBaud (const char *baudrate)
bool | inputBaud (baudrate_t baudrate)
bool | outputBaud (const char *baudrate)
bool | outputBaud (baudrate_t baudrate)
void | characterSize (charsize_t size)
void | twoStopBits (bool truefalse)
void | receiverOn (bool truefalse)
void | parityCheck (bool truefalse)
void | oddParity (bool truefalse)
void | hangupOnClose (bool truefalse)
void | ignoreModemControlLines (bool truefalse)
void | blockJobControlOutput (bool truefalse)
void | hardwareFlowControl (bool truefalse)
baudrate_t | baud ()
baudrate_t | inputBaud ()
baudrate_t | outputBaud ()
charsize_t | characterSize ()
bool | twoStopBits ()
bool | receiverOn ()
bool | parityCheck ()
bool | oddParity ()
bool | hangupOnClose ()
bool | ignoreModemControlLines ()
bool | blockJobControlOutput ()
bool | hardwareFlowControl ()
void | generateSignals (bool truefalse)
void | canonicalInput (bool truefalse)
void | escapedUpperCase (bool truefalse)
void | echoInput (bool truefalse)
void | eraseCharactersOn (bool truefalse)
void | killCharacterOn (bool truefalse)
void | echoNewLine (bool truefalse)
void | extendedFunctions (bool truefalse)
void | echoControlCharacters (bool truefalse)
void | echoErasedCharacter (bool truefalse)
void | emulateKill (bool truefalse)
void | noFlushAfterInterruptOrQuit (bool truefalse)
void | retypePendingCharacters (bool truefalse)
void | sendSignalForBackgroundOutput (bool truefalse)
bool | generateSignals ()
bool | canonicalInput ()
bool | escapedUpperCase ()
bool | echoInput ()
bool | eraseCharactersOn ()
bool | killCharacterOn ()
bool | echoNewLine ()
bool | extendedFunctions ()
bool | echoControlCharacters ()
bool | echoErasedCharacter ()
bool | emulateKill ()
bool | noFlushAfterInterruptOrQuit ()
bool | retypePendingCharacters ()
bool | sendSignalForBackgroundOutput ()
void | inputParityCheck (bool truefalse)
void | ignoreParityErrors (bool truefalse)
void | markParityErrors (bool truefalse)
void | stripParityBits (bool truefalse)
void | softwareFlowControlOnOutput (bool truefalse)
void | softwareFlowControlOnInput (bool truefalse)
void | anyCharacterStartsFlow (bool truefalse)
void | ignoreBreak (bool truefalse)
void | sendSignalOnBreak (bool truefalse)
void | mapNewLineToCarriageReturnOnInput (bool truefalse)
void | discardEndOfTransmission (bool truefalse)
void | ignoreCarriageReturn (bool truefalse)
void | mapCarriageReturnToNewLineOnInput (bool truefalse)
void | lowerCase (bool truefalse)
void | bellIfLineTooLong (bool truefalse)
bool | inputParityCheck ()
bool | ignoreParityErrors ()
bool | markParityErrors ()
bool | stripParityBits ()
bool | softwareFlowControlOnOutput ()
bool | softwareFlowControlOnInput ()
bool | anyCharacterStartsFlow ()
bool | ignoreBreak ()
bool | sendSignalOnBreak ()
bool | mapNewLineToCarriageReturnOnInput ()
bool | discardEndOfTransmission ()
bool | ignoreCarriageReturn ()
bool | mapCarriageReturnToNewLineOnInput ()
bool | lowerCase ()
bool | bellIfLineTooLong ()
void | postProcessOutput (bool truefalse)
void | outputUpperCase (bool truefalse)
void | mapNewLineToCarriageReturnNewLineOnOutput (bool truefalse)
void | mapCarriageReturnToNewLineOnOutput (bool truefalse)
void | dontOutputCarriageReturnAtColumnZero (bool truefalse)
void | mapNewLineToCarriageReturnOnOutput (bool truefalse)
void | useFillCharactersForDelay (bool truefalse)
void | useDelForFill (bool truefalse)
void | expandTabToSpaces (bool truefalse)
void | delayAfterNewLine (newlinedelay_t nldelay)
void | delayAfterCarriageReturn (carriagereturndelay_t crdelay)
void | delayAfterTab (tabdelay_t tabdelay)
void | delayAfterBackSpace (backspacedelay_t bsdelay)
void | delayAfterVerticalTab (verticaltabdelay_t vtdelay)
void | delayAfterFormFeed (formfeeddelay_t ffdelay)
bool | postProcessOutput ()
bool | outputUpperCase ()
bool | mapNewLineToCarriageReturnNewLineOnOutput ()
bool | mapCarriageReturnToNewLineOnOutput ()
bool | dontOutputCarriageReturnAtColumnZero ()
bool | mapNewLineToCarriageReturnOnOutput ()
bool | useFillCharactersForDelay ()
bool | useDelForFill ()
bool | expandTabToSpaces ()
newlinedelay_t | delayAfterNewLine ()
carriagereturndelay_t | delayAfterCarriageReturn ()
tabdelay_t | delayAfterTab ()
backspacedelay_t | delayAfterBackSpace ()
verticaltabdelay_t | delayAfterVerticalTab ()
formfeeddelay_t | delayAfterFormFeed ()
void | interruptCharacter (unsigned char character)
void | quitCharacter (unsigned char character)
void | eraseCharacter (unsigned char character)
void | killCharacter (unsigned char character)
void | endOfFileCharacter (unsigned char character)
void | endOfLineCharacter (unsigned char character)
void | secondEndOfLineCharacter (unsigned char character)
void | switchCharacer (unsigned char character)
void | startCharacter (unsigned char character)
void | stopCharacter (unsigned char character)
void | suspendCharacter (unsigned char character)
void | delayedSuspendCharacter (unsigned char character)
void | literalNextCharcter (unsigned char character)
void | wordEraseCharcter (unsigned char character)
void | reprintCharacter (unsigned char character)
void | discardPendingOutputCharacter (unsigned char character)
void | statusRequestCharacter (unsigned char character)
void | readThreshold (unsigned char count)
void | readTimeout (unsigned char deciseconds)
unsigned char | interruptCharacter ()
unsigned char | quitCharacter ()
unsigned char | eraseCharacter ()
unsigned char | killCharacter ()
unsigned char | endOfFileCharacter ()
unsigned char | endOfLineCharacter ()
unsigned char | secondEndOfLineCharacter ()
unsigned char | switchCharacer ()
unsigned char | startCharacter ()
unsigned char | stopCharacter ()
unsigned char | suspendCharacter ()
unsigned char | delayedSuspendCharacter ()
unsigned char | literalNextCharcter ()
unsigned char | wordEraseCharcter ()
unsigned char | reprintCharacter ()
unsigned char | discardPendingOutputCharacter ()
unsigned char | statusRequestCharacter ()
unsigned char | readThreshold ()
unsigned char | readTimeout ()

## Detailed Description

A serialportprofile is a set of parameters for a serial port such as baud rate, parity, bits-per character and lots of other settings. On some systems, these are referred to as "termios".

In antiquity, teletypes and dumb terminals were the most common serial-attached devices and they required these to be set to very specific values. These days serial ports are more often used for talking to peripherals on embedded systems but many of the same concepts still apply.

## Constructor & Destructor Documentation

## ◆ serialportprofile()

serialportprofile::serialportprofile | ( |  | ) |

Creates an instance of the serialportprofile class.

## ◆ ~serialportprofile()

serialportprofile::~serialportprofile | ( |  | ) |

Deletes this instance of the serialportprofile class.

## Member Function Documentation

## ◆ anyCharacterStartsFlow() [1/2]

bool serialportprofile::anyCharacterStartsFlow | ( |  | ) |

Returns true if any character will restart output.

## ◆ anyCharacterStartsFlow() [2/2]

void serialportprofile::anyCharacterStartsFlow | ( | bool | truefalse | ) |

Enable any character to restart output. Corresponding termios flag: IXANY.

## ◆ baud() [1/3]

baudrate_t serialportprofile::baud | ( |  | ) |

Returns current (input and output) baud.

## ◆ baud() [2/3]

void serialportprofile::baud | ( | baudrate_t | baudrate | ) |

Sets the (input and output) baud rate. Default is 0.

## ◆ baud() [3/3]

void serialportprofile::baud | ( | const char * | baudrate | ) |

Sets the (input and output) baud rate. Default is 0.

## ◆ bellIfLineTooLong() [1/2]

bool serialportprofile::bellIfLineTooLong | ( |  | ) |

Returns true if the bell will be rung when the input queue is full.

## ◆ bellIfLineTooLong() [2/2]

void serialportprofile::bellIfLineTooLong | ( | bool | truefalse | ) |

Ring bell when input queue is full. Corresponding termios flag: IMAXBEL.

## ◆ blockJobControlOutput() [1/2]

bool serialportprofile::blockJobControlOutput | ( |  | ) |

Returns true if output from a nonconcurrent shell layer is being blocked.

## ◆ blockJobControlOutput() [2/2]

void serialportprofile::blockJobControlOutput | ( | bool | truefalse | ) |

Block output from a nonconcurrent shell layer. Default is not to block. Corresponding termios flag: LOBLK.

## ◆ canonicalInput() [1/2]

bool serialportprofile::canonicalInput | ( |  | ) |

Returns true if special characters EOF, EOL, EOL2, ERASE, KILL, LNEXT, REPRINT, STATUS and WERASE are enabled and buffering is being done by lines.

## ◆ canonicalInput() [2/2]

void serialportprofile::canonicalInput | ( | bool | truefalse | ) |

Enable special characters EOF, EOL, EOL2, ERASE, KILL, LNEXT, REPRINT, STATUS and WERASE, buffer by lines. Default is not to enable the special characters and not buffer by lines. Corresponding termios flag: ICANON.

## ◆ characterSize() [1/2]

charsize_t serialportprofile::characterSize | ( |  | ) |

Returns current character size.

## ◆ characterSize() [2/2]

void serialportprofile::characterSize | ( | charsize_t | size | ) |

Set the character size. Default is 5 bits. Corresponding termios flag: CSIZE.

## ◆ defaultControlCharacters()

void serialportprofile::defaultControlCharacters | ( |  | ) |

Sets the control characters to system defaults.

## ◆ defaultControlOptions()

void serialportprofile::defaultControlOptions | ( |  | ) |

Sets the control options to system defaults.

## ◆ defaultInputOptions()

void serialportprofile::defaultInputOptions | ( |  | ) |

Sets the input options to system defaults.

## ◆ defaultLocalOptions()

void serialportprofile::defaultLocalOptions | ( |  | ) |

Sets the local options to system defaults.

## ◆ defaultOptions()

void serialportprofile::defaultOptions | ( |  | ) |

Sets all options and control characters to system defaults.

## ◆ defaultOutputOptions()

void serialportprofile::defaultOutputOptions | ( |  | ) |

Sets the output options to system defaults.

## ◆ delayAfterBackSpace() [1/2]

backspacedelay_t serialportprofile::delayAfterBackSpace | ( |  | ) |

Returns the delay that is sent after backspace characters.

## ◆ delayAfterBackSpace() [2/2]

void serialportprofile::delayAfterBackSpace | ( | backspacedelay_t | bsdelay | ) |

Send a delay after each backspace character Corresponding termios flag: BSDLY.

## ◆ delayAfterCarriageReturn() [1/2]

carriagereturndelay_t serialportprofile::delayAfterCarriageReturn | ( |  | ) |

Returns the delay that is sent after carriage return characters.

## ◆ delayAfterCarriageReturn() [2/2]

void serialportprofile::delayAfterCarriageReturn | ( | carriagereturndelay_t | crdelay | ) |

Send a delay after each carriage return character. Corresponding termios flag: CRDLY.

## ◆ delayAfterFormFeed() [1/2]

formfeeddelay_t serialportprofile::delayAfterFormFeed | ( |  | ) |

Returns the delay that is sent after form feed characters.

## ◆ delayAfterFormFeed() [2/2]

void serialportprofile::delayAfterFormFeed | ( | formfeeddelay_t | ffdelay | ) |

Send a delay after each form feed character Corresponding termios flag: FFDLY.

## ◆ delayAfterNewLine() [1/2]

newlinedelay_t serialportprofile::delayAfterNewLine | ( |  | ) |

Returns the delay that is sent after new line characters.

## ◆ delayAfterNewLine() [2/2]

void serialportprofile::delayAfterNewLine | ( | newlinedelay_t | nldelay | ) |

Send a delay after each new line character. Corresponding termios flag: NLDLY.

## ◆ delayAfterTab() [1/2]

tabdelay_t serialportprofile::delayAfterTab | ( |  | ) |

Returns the delay that is sent after tab characters.

## ◆ delayAfterTab() [2/2]

void serialportprofile::delayAfterTab | ( | tabdelay_t | tabdelay | ) |

Send a delay after each tab character Corresponding termios flag: TABDLY.

## ◆ delayAfterVerticalTab() [1/2]

verticaltabdelay_t serialportprofile::delayAfterVerticalTab | ( |  | ) |

Returns the delay that is sent after vertical tab characters.

## ◆ delayAfterVerticalTab() [2/2]

void serialportprofile::delayAfterVerticalTab | ( | verticaltabdelay_t | vtdelay | ) |

Send a delay after each vertical tab character. Corresponding termios flag: VTDLY.

## ◆ delayedSuspendCharacter() [1/2]

unsigned char serialportprofile::delayedSuspendCharacter | ( |  | ) |

Returns the character that will cause a SIGTSTP to be sent to the process when generateSignals() and extendedFunctions() are set true.

## ◆ delayedSuspendCharacter() [2/2]

void serialportprofile::delayedSuspendCharacter | ( | unsigned char | character | ) |

Sets the character that will cause a SIGTSTP to be sent to the process when generateSignals() and extendedFunctions() are set true. Corresponding termios flag: VDSUSP.

## ◆ discardEndOfTransmission() [1/2]

bool serialportprofile::discardEndOfTransmission | ( |  | ) |

???

## ◆ discardEndOfTransmission() [2/2]

void serialportprofile::discardEndOfTransmission | ( | bool | truefalse | ) |

??? Corresponding termios flag: ONOEOT.

## ◆ discardPendingOutputCharacter() [1/2]

unsigned char serialportprofile::discardPendingOutputCharacter | ( |  | ) |

Returns the character that toggles discarding pending output, recognized when extendedFunctions() is set true.

## ◆ discardPendingOutputCharacter() [2/2]

void serialportprofile::discardPendingOutputCharacter | ( | unsigned char | character | ) |

Sets the character that toggles discarding pending output, recognized when extendedFunctions() is set true. Corresponding termios flag: VDISCARD.

## ◆ dontOutputCarriageReturnAtColumnZero() [1/2]

bool serialportprofile::dontOutputCarriageReturnAtColumnZero | ( |  | ) |

Returns true if carriage returns aren't sent at column 0.

## ◆ dontOutputCarriageReturnAtColumnZero() [2/2]

void serialportprofile::dontOutputCarriageReturnAtColumnZero | ( | bool | truefalse | ) |

Don't output carriage return at column 0. Corresponding termios flag: ONOCR.

## ◆ echoControlCharacters() [1/2]

bool serialportprofile::echoControlCharacters | ( |  | ) |

Returns true if control characters are being echoed as ^X where X is the ascii code for the character plus 0x40.

## ◆ echoControlCharacters() [2/2]

void serialportprofile::echoControlCharacters | ( | bool | truefalse | ) |

If echoInput() is also set true, control characters are echoed as ^X where X is the ascii code for the character plus 0x40. Corresponding termios flag: ECHOCTL.

## ◆ echoErasedCharacter() [1/2]

bool serialportprofile::echoErasedCharacter | ( |  | ) |

Returns true if characters are being printed as they are erased.

## ◆ echoErasedCharacter() [2/2]

void serialportprofile::echoErasedCharacter | ( | bool | truefalse | ) |

If cannonicalInput() and echoInput() are also set true, characters are printed as they are erased. Corresponding termios flag: ECHOPRT.

## ◆ echoInput() [1/2]

bool serialportprofile::echoInput | ( |  | ) |

Returns true if input characters are being echoed.

## ◆ echoInput() [2/2]

void serialportprofile::echoInput | ( | bool | truefalse | ) |

If cannonicalInput() is also set true then echo input. Corresponding termios flag: ECHO.

## ◆ echoNewLine() [1/2]

bool serialportprofile::echoNewLine | ( |  | ) |

Returns true if new line characters are being echoed even if echoInput() is set false.

## ◆ echoNewLine() [2/2]

void serialportprofile::echoNewLine | ( | bool | truefalse | ) |

If cannonicalInput() is also set true, new line characters are echoed even if echoInput() is set false. Corresponding termios flag: ECHONL.

## ◆ emulateKill() [1/2]

bool serialportprofile::emulateKill | ( |  | ) |

Returns true if the character set using killCharacter() causes the line to be erased by erasing each character on the line.

## ◆ emulateKill() [2/2]

void serialportprofile::emulateKill | ( | bool | truefalse | ) |

If cannonicalInput() is also set, the character set using killCharacter() causes the line to be erased by erasing each character on the line. (Useful when a terminal doesn't support the KILL character but does support the ERASE character.) Corresponding termios flag: ECHOKE.

## ◆ endOfFileCharacter() [1/2]

unsigned char serialportprofile::endOfFileCharacter | ( |  | ) |

Returns the character that will cause the pending tty buffer to be sent to the program without waiting for end-of-line and read()'s to return 0 when canonicalInput() is set to true.

## ◆ endOfFileCharacter() [2/2]

void serialportprofile::endOfFileCharacter | ( | unsigned char | character | ) |

Sets the character that will cause the pending tty buffer to be sent to the program without waiting for end-of-line and read()'s to return 0 when canonicalInput() is set to true Corresponding termios flag: VEOF.

## ◆ endOfLineCharacter() [1/2]

unsigned char serialportprofile::endOfLineCharacter | ( |  | ) |

Returns the end-of-line character, recognized when canonicalInput() is set to true.

## ◆ endOfLineCharacter() [2/2]

void serialportprofile::endOfLineCharacter | ( | unsigned char | character | ) |

Sets the end-of-line character, recognized when canonicalInput() is set to true Corresponding termios flag: VEOL.

## ◆ eraseCharacter() [1/2]

unsigned char serialportprofile::eraseCharacter | ( |  | ) |

Returns the character that will cause a character erase when canonicalInput() is set to true.

## ◆ eraseCharacter() [2/2]

void serialportprofile::eraseCharacter | ( | unsigned char | character | ) |

Sets the character that will cause a character erase when canonicalInput() is set to true Corresponding termios flag: VERASE.

## ◆ eraseCharactersOn() [1/2]

bool serialportprofile::eraseCharactersOn | ( |  | ) |

Returns true if the character set using eraseCharacter() erases the preceeding character and the character set using wordEraseCharacter() erases the preceeding word.

## ◆ eraseCharactersOn() [2/2]

void serialportprofile::eraseCharactersOn | ( | bool | truefalse | ) |

If cannonicalInput() is also set true, character set using eraseCharacter() erases the preceeding character and character set using wordEraseCharacter() erases the preceeding word. Corresponding termios flag: ECHOE.

## ◆ escapedUpperCase() [1/2]

bool serialportprofile::escapedUpperCase | ( |  | ) |

Returns true if on input, characters are being converted from upper to lower case unless they are preceeded by a \ and on output lower case characters are being converted to upper case and upper case characters are being preceeded with a .

## ◆ escapedUpperCase() [2/2]

void serialportprofile::escapedUpperCase | ( | bool | truefalse | ) |

If cannonicalInput() is also set true, converts characters from input to lower case unless they are preceeded by a . On output, preceeds each upper case character with a \ and converts all lower case characters to uppercase. Default is not to use escaped upper case. (This is used when communicating with terminals that can display upper or lower case, but only transmit and receive upper case.) Corresponding termios flag: XCASE.

## ◆ evalOptionsString()

void serialportprofile::evalOptionsString | ( | const char * | string | ) |

Serial port configuration requirements are often given as a 3 character string representing the number of bits-per-char, the parity and the number of stop bits such as "8n1", "7e2", etc. This methods parses such a string and sets the profile to match those values.

## ◆ expandTabToSpaces() [1/2]

bool serialportprofile::expandTabToSpaces | ( |  | ) |

Returns true if the tabs are mapped to spaces.

## ◆ expandTabToSpaces() [2/2]

void serialportprofile::expandTabToSpaces | ( | bool | truefalse | ) |

Map tabs to spaces. Corresponding termios flag: XTAGS/OXTABS/TAB3.

## ◆ extendedFunctions() [1/2]

bool serialportprofile::extendedFunctions | ( |  | ) |

Returns true if characters set by secondEndOfLineCharacter(), reprintCharacter() and wordEraseCharacter() are enabled and lowerCase() is enabled.

## ◆ extendedFunctions() [2/2]

void serialportprofile::extendedFunctions | ( | bool | truefalse | ) |

If cannonicalInput() is also set true, enables characters set by secondEndOfLineCharacter(), reprintCharacter() and wordEraseCharacter(). Also enables lowerCase(). Corresponding termios flag: IEXTEN.

## ◆ flowControl() [1/2]

flowcontrol_t serialportprofile::flowControl | ( |  | ) |

Get the current flow control setting.

## ◆ flowControl() [2/2]

void serialportprofile::flowControl | ( | flowcontrol_t | flowcontrol | ) |

Set flow control to "flowcontrol".

## ◆ generateSignals() [1/2]

bool serialportprofile::generateSignals | ( |  | ) |

Returns true if corresponding signals will be raised when any of the INTR, QUIT, SUSP or DSUSP characters are received default is not to raise signals.

## ◆ generateSignals() [2/2]

void serialportprofile::generateSignals | ( | bool | truefalse | ) |

Cause corresponding signals to be raised when any of the INTR, QUIT, SUSP or DSUSP characters are received default is not to raise signals Corresponding termios flag: ISIG.

## ◆ hangupOnClose() [1/2]

bool serialportprofile::hangupOnClose | ( |  | ) |

Returns true if the modem lines will be lowered when the last device closes the device.

## ◆ hangupOnClose() [2/2]

void serialportprofile::hangupOnClose | ( | bool | truefalse | ) |

Lower modem control lines after last process closes the device (hang up). Default is not to hang up on close. Corresponding termios flag: HUPCL.

## ◆ hardwareFlowControl() [1/2]

bool serialportprofile::hardwareFlowControl | ( |  | ) |

Returns true if RTS/CTS hardware flow control is being used.

## ◆ hardwareFlowControl() [2/2]

void serialportprofile::hardwareFlowControl | ( | bool | truefalse | ) |

Use RTS/CTS flow control. Default is not to use RTS/CTS flow control. Corresponding termios flags: CRTSCTS/NEW_CRTSCTS/CRTS_IFLOW/CRTS_OFLOW.

## ◆ ignoreBreak() [1/2]

bool serialportprofile::ignoreBreak | ( |  | ) |

Returns true if the BREAK character is being ignored.

## ◆ ignoreBreak() [2/2]

void serialportprofile::ignoreBreak | ( | bool | truefalse | ) |

Ignore BREAK character. Corresponding termios flag: IGNBRK.

## ◆ ignoreCarriageReturn() [1/2]

bool serialportprofile::ignoreCarriageReturn | ( |  | ) |

Returns true if carriage returns are ignored on input.

## ◆ ignoreCarriageReturn() [2/2]

void serialportprofile::ignoreCarriageReturn | ( | bool | truefalse | ) |

Ignore carriage return on input. Corresponding termios flag: IGNCR.

## ◆ ignoreModemControlLines() [1/2]

bool serialportprofile::ignoreModemControlLines | ( |  | ) |

Returns true if (possibly sporadic) job control and hangup signals are being ignored.

## ◆ ignoreModemControlLines() [2/2]

void serialportprofile::ignoreModemControlLines | ( | bool | truefalse | ) |

Ignore (possibly sporadic) job control and hangup signals that could terminate or otherwise control the program. Default is not to ignore. (This should be set to true when communicating with a device connected directly to the computer as opposed to over a modem.) Corresponding termios flag: CLOCAL.

## ◆ ignoreParityErrors() [1/2]

bool serialportprofile::ignoreParityErrors | ( |  | ) |

Returns true if parity errors are being ignored.

## ◆ ignoreParityErrors() [2/2]

void serialportprofile::ignoreParityErrors | ( | bool | truefalse | ) |

Ignore parity errors (ie. if a character has a parity error, just return what we got, rather than marking or converting it). Corresponding termios flag: IGNPAR.

## ◆ inputBaud() [1/3]

baudrate_t serialportprofile::inputBaud | ( |  | ) |

Returns current input baud.

## ◆ inputBaud() [2/3]

bool serialportprofile::inputBaud | ( | baudrate_t | baudrate | ) |

Sets the input baud rate. Default is 0.

## ◆ inputBaud() [3/3]

bool serialportprofile::inputBaud | ( | const char * | baudrate | ) |

Sets the input baud rate. Default is 0.

## ◆ inputMode() [1/2]

inputmode_t serialportprofile::inputMode | ( |  | ) |

Get the current input mode setting.

## ◆ inputMode() [2/2]

void serialportprofile::inputMode | ( | inputmode_t | inputmode | ) |

Set input mode to "inputmode".

## ◆ inputParityCheck() [1/2]

bool serialportprofile::inputParityCheck | ( |  | ) |

Returns true if input parity checking is enabled.

## ◆ inputParityCheck() [2/2]

void serialportprofile::inputParityCheck | ( | bool | truefalse | ) |

Enable parity checking on input Corresponding termios flag: INPCK.

## ◆ interruptCharacter() [1/2]

unsigned char serialportprofile::interruptCharacter | ( |  | ) |

Returns the character that will cause a SIGINT to be sent to the process when generateSignals() is set true.

## ◆ interruptCharacter() [2/2]

void serialportprofile::interruptCharacter | ( | unsigned char | character | ) |

Sets the character that will cause a SIGINT to be sent to the process when generateSignals() is set true. Corresponding termios flag: VINTR.

## ◆ killCharacter() [1/2]

unsigned char serialportprofile::killCharacter | ( |  | ) |

Returns the character that will cause a line erase when canonicalInput() is set to true.

## ◆ killCharacter() [2/2]

void serialportprofile::killCharacter | ( | unsigned char | character | ) |

Sets the character that will cause a line erase when canonicalInput() is set to true Corresponding termios flag: VKILL.

## ◆ killCharacterOn() [1/2]

bool serialportprofile::killCharacterOn | ( |  | ) |

Returns true if the character set using killCharacter() erases the current line.

## ◆ killCharacterOn() [2/2]

void serialportprofile::killCharacterOn | ( | bool | truefalse | ) |

If cannonicalInput() is also set true, character set using killCharacter() erases the current line. Corresponding termios flag: ECHOK.

## ◆ literalNextCharcter() [1/2]

unsigned char serialportprofile::literalNextCharcter | ( |  | ) |

Returns the character that "quotes" the next character, depriving it of special meaning, recognized when extendedFunctions() is set true.

## ◆ literalNextCharcter() [2/2]

void serialportprofile::literalNextCharcter | ( | unsigned char | character | ) |

Sets the character that "quotes" the next character, depriving it of special meaning, recognized when extendedFunctions() is set true. Corresponding termios flag: VLNEXT.

## ◆ lowerCase() [1/2]

bool serialportprofile::lowerCase | ( |  | ) |

Returns true if uppercase characters are mapped to lowercase on input.

## ◆ lowerCase() [2/2]

void serialportprofile::lowerCase | ( | bool | truefalse | ) |

Map uppercase characters to lowercase on input. Corresponding termios flag: IUCLC.

## ◆ mapCarriageReturnToNewLineOnInput() [1/2]

bool serialportprofile::mapCarriageReturnToNewLineOnInput | ( |  | ) |

Returns true if carriage returns are mapped to new lines on input.

## ◆ mapCarriageReturnToNewLineOnInput() [2/2]

void serialportprofile::mapCarriageReturnToNewLineOnInput | ( | bool | truefalse | ) |

Translate carriage return to new line on input. Corresponding termios flag: ICRNL.

## ◆ mapCarriageReturnToNewLineOnOutput() [1/2]

bool serialportprofile::mapCarriageReturnToNewLineOnOutput | ( |  | ) |

Returns true if carriage returns are mapped to new lines on output.

## ◆ mapCarriageReturnToNewLineOnOutput() [2/2]

void serialportprofile::mapCarriageReturnToNewLineOnOutput | ( | bool | truefalse | ) |

Map carriage return to new line on output. Corresponding termios flag: OCRNL.

## ◆ mapNewLineToCarriageReturnNewLineOnOutput() [1/2]

bool serialportprofile::mapNewLineToCarriageReturnNewLineOnOutput | ( |  | ) |

Returns true if new lines are mapped to carriage return/new line on output.

## ◆ mapNewLineToCarriageReturnNewLineOnOutput() [2/2]

void serialportprofile::mapNewLineToCarriageReturnNewLineOnOutput | ( | bool | truefalse | ) |

Map new line to carriage return/new line on output. Corresponding termios flag: ONLCR.

## ◆ mapNewLineToCarriageReturnOnInput() [1/2]

bool serialportprofile::mapNewLineToCarriageReturnOnInput | ( |  | ) |

Returns true if new lines are mapped to carriage returns on input.

## ◆ mapNewLineToCarriageReturnOnInput() [2/2]

void serialportprofile::mapNewLineToCarriageReturnOnInput | ( | bool | truefalse | ) |

Translate new line to carriage return on input termios flag: INLCR.

## ◆ mapNewLineToCarriageReturnOnOutput() [1/2]

bool serialportprofile::mapNewLineToCarriageReturnOnOutput | ( |  | ) |

Returns true if new lines are mapped to carriage returns on output.

## ◆ mapNewLineToCarriageReturnOnOutput() [2/2]

void serialportprofile::mapNewLineToCarriageReturnOnOutput | ( | bool | truefalse | ) |

Map new line to carriage return on output. Corresponding termios flag: ONLRET.

## ◆ markParityErrors() [1/2]

bool serialportprofile::markParityErrors | ( |  | ) |

Returns true if characters with parity errors are prefixed with \377 \0.

## ◆ markParityErrors() [2/2]

void serialportprofile::markParityErrors | ( | bool | truefalse | ) |

Unless ignoreParityErrors() is set true, prefix a character with a parity error with \337 \0. The default is to convert it to \0 unless ignoreParityErrors() is set true. Corresponding termios flag: PARMRK.

## ◆ noFlushAfterInterruptOrQuit() [1/2]

bool serialportprofile::noFlushAfterInterruptOrQuit | ( |  | ) |

Returns true if flushing of the input/output queues when generating SIGINT, SIGQUIT or SIGSUSP signals is enabled.

## ◆ noFlushAfterInterruptOrQuit() [2/2]

void serialportprofile::noFlushAfterInterruptOrQuit | ( | bool | truefalse | ) |

Disables flushing of the input/output queues when generating SIGINT, SIGQUIT or SIGSUSP signals. Corresponding termios flag: NOFLSH.

## ◆ oddParity() [1/2]

bool serialportprofile::oddParity | ( |  | ) |

Returns true if odd parity is being used.

## ◆ oddParity() [2/2]

void serialportprofile::oddParity | ( | bool | truefalse | ) |

Use odd parity if "truefalse" is true or even parity if "truefalse" is false. Default is even parity. Corresponding termios flag: PARODD.

## ◆ outputBaud() [1/3]

baudrate_t serialportprofile::outputBaud | ( |  | ) |

Returns current output baud.

## ◆ outputBaud() [2/3]

bool serialportprofile::outputBaud | ( | baudrate_t | baudrate | ) |

Sets the output baud rate. Default is 0.

## ◆ outputBaud() [3/3]

bool serialportprofile::outputBaud | ( | const char * | baudrate | ) |

Sets the output baud rate. Default is 0.

## ◆ outputUpperCase() [1/2]

bool serialportprofile::outputUpperCase | ( |  | ) |

Returns true if lowercase characters are mapped to uppercase on output.

## ◆ outputUpperCase() [2/2]

void serialportprofile::outputUpperCase | ( | bool | truefalse | ) |

Map lowercase characters to uppercase on output. Corresponding termios flag: OLCUC.

## ◆ parityCheck() [1/2]

bool serialportprofile::parityCheck | ( |  | ) |

Returns true if parity check is enabled.

## ◆ parityCheck() [2/2]

void serialportprofile::parityCheck | ( | bool | truefalse | ) |

Turns parity checking on or off. Default is off. Corresponding termios flag: CPARENB.

## ◆ postProcessOutput() [1/2]

bool serialportprofile::postProcessOutput | ( |  | ) |

Returns true if implementation-defined output processing is enabled.

## ◆ postProcessOutput() [2/2]

void serialportprofile::postProcessOutput | ( | bool | truefalse | ) |

Enables implementation-defined output processing. Corresponding termios flag: OPOST.

## ◆ quitCharacter() [1/2]

unsigned char serialportprofile::quitCharacter | ( |  | ) |

Returns the character that will cause a SIGQUIT to be sent to the process when generateSignals() is set true.

## ◆ quitCharacter() [2/2]

void serialportprofile::quitCharacter | ( | unsigned char | character | ) |

Sets the character that will cause a SIGQUIT to be sent to the process when generateSignals() is set true. Corresponding termios flag: VQUIT.

## ◆ readThreshold() [1/2]

unsigned char serialportprofile::readThreshold | ( |  | ) |

Returns the number of characters that must be read before a read() will begin waiting for readTimeout() deciseconds before falling through.

## ◆ readThreshold() [2/2]

void serialportprofile::readThreshold | ( | unsigned char | count | ) |

Sets the number of characters that must be read before a read() will begin waiting for readTimeout() deciseconds before falling through. Corresponding termios flag: VMIN.

## ◆ readTimeout() [1/2]

unsigned char serialportprofile::readTimeout | ( |  | ) |

Returns the number of deciseconds that a read() will wait after reading readThreshold() characters before falling through.

## ◆ readTimeout() [2/2]

void serialportprofile::readTimeout | ( | unsigned char | deciseconds | ) |

Sets the number of deciseconds that a read() will wait after reading readThreshold() characters before falling through. Corresponding termios flag: VTIME.

## ◆ receiverOn() [1/2]

bool serialportprofile::receiverOn | ( |  | ) |

Returns true if the receiver is on.

## ◆ receiverOn() [2/2]

void serialportprofile::receiverOn | ( | bool | truefalse | ) |

Turns the receiver on or off. (Enables serial port to read incoming data or not.) Default is off. (You probably always want to set this on.) Corresponding termios flag: CREAD.

## ◆ reprintCharacter() [1/2]

unsigned char serialportprofile::reprintCharacter | ( |  | ) |

Returns the character that causes unread characters to be reprinted, recognized when canonicalInput() and extendedFunctions() are set true.

## ◆ reprintCharacter() [2/2]

void serialportprofile::reprintCharacter | ( | unsigned char | character | ) |

Sets the character that causes unread characters to be reprinted, recognized when canonicalInput() and extendedFunctions() are set true. Corresponding termios flag: VREPRINT.

## ◆ retypePendingCharacters() [1/2]

bool serialportprofile::retypePendingCharacters | ( |  | ) |

Returns true if all characters in the input queue are reprinted when the next character is read.

## ◆ retypePendingCharacters() [2/2]

void serialportprofile::retypePendingCharacters | ( | bool | truefalse | ) |

All characters in the input queue are reprinted when the next character is read. Corresponding termios flag: PENDIN.

## ◆ secondEndOfLineCharacter() [1/2]

unsigned char serialportprofile::secondEndOfLineCharacter | ( |  | ) |

Returns the "other" end-of-line character, recognized when canonicalInput() is set to true.

## ◆ secondEndOfLineCharacter() [2/2]

void serialportprofile::secondEndOfLineCharacter | ( | unsigned char | character | ) |

Sets the "other" end-of-line character, recognized when canonicalInput() is set to true Corresponding termios flag: VEOL2.

## ◆ sendSignalForBackgroundOutput() [1/2]

bool serialportprofile::sendSignalForBackgroundOutput | ( |  | ) |

Returns true if the SIGTTOU signal is being sent to the process group of a background process which tries to write to its controlling terminal.

## ◆ sendSignalForBackgroundOutput() [2/2]

void serialportprofile::sendSignalForBackgroundOutput | ( | bool | truefalse | ) |

Send the SIGTTOU signal to the process group of a background process which tries to write to its controlling terminal. Corresponding termios flag: TOSTOP.

## ◆ sendSignalOnBreak() [1/2]

bool serialportprofile::sendSignalOnBreak | ( |  | ) |

Returns true if input and output queues are flushed and a SIGINT is sent to the process group if the serial port is the controlling terminal when a BREAK character is received.

## ◆ sendSignalOnBreak() [2/2]

void serialportprofile::sendSignalOnBreak | ( | bool | truefalse | ) |

If ignoreBreak() isn't set true and a BREAK character is received, flush input and output queues and send a SIGINT if the serial port is the controlling terminal of the process group. If ignoreBreak() is not set, the default is to return a \0 character or \377 \0 if markParityErrors() is set true. Corresponding termios flag: BRKINT.

## ◆ setControlCharacters()

void serialportprofile::setControlCharacters | ( | const unsigned char * | c_cc | ) |

Set control characters to the values pointed to by "c_cc". Note that c_cc must be an array of length NCCS.

## ◆ softwareFlowControlOnInput() [1/2]

bool serialportprofile::softwareFlowControlOnInput | ( |  | ) |

Returns true if XON/XOFF flow control is enabled on input.

## ◆ softwareFlowControlOnInput() [2/2]

void serialportprofile::softwareFlowControlOnInput | ( | bool | truefalse | ) |

Enable XON/XOFF flow control on input. Corresponding termios flag: IXOFF.

## ◆ softwareFlowControlOnOutput() [1/2]

bool serialportprofile::softwareFlowControlOnOutput | ( |  | ) |

Returns true if XON/XOFF flow control is enabled on output.

## ◆ softwareFlowControlOnOutput() [2/2]

void serialportprofile::softwareFlowControlOnOutput | ( | bool | truefalse | ) |

Enable XON/XOFF flow control on output. Corresponding termios flag: IXON.

## ◆ startCharacter() [1/2]

unsigned char serialportprofile::startCharacter | ( |  | ) |

Returns the start character for XON/XOFF flow control.

## ◆ startCharacter() [2/2]

void serialportprofile::startCharacter | ( | unsigned char | character | ) |

Sets the start character for XON/XOFF flow control Corresponding termios flag: VSTART.

## ◆ statusRequestCharacter() [1/2]

unsigned char serialportprofile::statusRequestCharacter | ( |  | ) |

Returns the status request character.

## ◆ statusRequestCharacter() [2/2]

void serialportprofile::statusRequestCharacter | ( | unsigned char | character | ) |

Sets the status request character. Corresponding termios flag: VSTATUS.

## ◆ stopCharacter() [1/2]

unsigned char serialportprofile::stopCharacter | ( |  | ) |

Returns the stop character for XON/XOFF flow control.

## ◆ stopCharacter() [2/2]

void serialportprofile::stopCharacter | ( | unsigned char | character | ) |

Sets the stop character for XON/XOFF flow control Corresponding termios flag: VSTOP.

## ◆ stripParityBits() [1/2]

bool serialportprofile::stripParityBits | ( |  | ) |

Returns true if the 8th bit (the parity bit) of each character is being set to 0.

## ◆ stripParityBits() [2/2]

void serialportprofile::stripParityBits | ( | bool | truefalse | ) |

Set the 8th bit of each character (the parity bit) to 0. Corresponding termios flag: ISTRIP.

## ◆ suspendCharacter() [1/2]

unsigned char serialportprofile::suspendCharacter | ( |  | ) |

Returns the character that will cause a SIGSUSP to be sent to the process when generateSignals() is set true.

## ◆ suspendCharacter() [2/2]

void serialportprofile::suspendCharacter | ( | unsigned char | character | ) |

Sets the character that will cause a SIGSUSP to be sent to the process when generateSignals() is set true. Corresponding termios flag: VSUSP.

## ◆ switchCharacer() [1/2]

unsigned char serialportprofile::switchCharacer | ( |  | ) |

Returns the switch character.

## ◆ switchCharacer() [2/2]

void serialportprofile::switchCharacer | ( | unsigned char | character | ) |

Sets the switch character. Corresponding termios flag: VSWTCH/VSWTC.

## ◆ twoStopBits() [1/2]

bool serialportprofile::twoStopBits | ( |  | ) |

Returns true if two stop bits are being used.

## ◆ twoStopBits() [2/2]

void serialportprofile::twoStopBits | ( | bool | truefalse | ) |

Use two stop bits if "truefalse" is true or one stop bit if "truefalse" is false. Default is one stop bit. Corresponding termios flag: CSTOPB.

## ◆ useDelForFill() [1/2]

bool serialportprofile::useDelForFill | ( |  | ) |

Returns true if the DEL character is used instead of NULL for the fill character.

## ◆ useDelForFill() [2/2]

void serialportprofile::useDelForFill | ( | bool | truefalse | ) |

Use the DEL character instead of NULL for the fill character. Corresponding termios flag: OFDEL.

## ◆ useFillCharactersForDelay() [1/2]

bool serialportprofile::useFillCharactersForDelay | ( |  | ) |

Returns true if fill characters are sent for delay instead of using a timed delay.

## ◆ useFillCharactersForDelay() [2/2]

void serialportprofile::useFillCharactersForDelay | ( | bool | truefalse | ) |

Send fill characters for delay instead of using a timed delay. Corresponding termios flag: OFILL.

## ◆ wordEraseCharcter() [1/2]

unsigned char serialportprofile::wordEraseCharcter | ( |  | ) |

Returns the word erase character, recognized when canonicalInput() and extendedFunctions() are set true.

## ◆ wordEraseCharcter() [2/2]

void serialportprofile::wordEraseCharcter | ( | unsigned char | character | ) |

Sets the word erase character, recognized when canonicalInput() and extendedFunctions() are set true. Corresponding termios flag: VWERASE.