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

#include <serialportprofile.h>

Inherits object.

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 setDefaultControlOptions ()
 
void setDefaultLocalOptions ()
 
void setDefaultInputOptions ()
 
void setDefaultOutputOptions ()
 
void setDefaultControlCharacters ()
 
void setDefaultOptions ()
 
void setControlCharacters (const byte_t *c_cc)
 
void parseOptionsString (const char *string)
 
void setInputMode (inputmode_t inputmode)
 
inputmode_t getInputMode ()
 
void setFlowControl (flowcontrol_t flowcontrol)
 
flowcontrol_t getFlowControl ()
 
void setBaud (const char *baudrate)
 
void setBaud (baudrate_t baudrate)
 
bool setInputBaud (const char *baudrate)
 
bool setInputBaud (baudrate_t baudrate)
 
bool setOutputBaud (const char *baudrate)
 
bool setOutputBaud (baudrate_t baudrate)
 
void setCharacterSize (charsize_t size)
 
void setTwoStopBits (bool truefalse)
 
void setReceiverOn (bool truefalse)
 
void setParityCheck (bool truefalse)
 
void setOddParity (bool truefalse)
 
void setHangupOnClose (bool truefalse)
 
void setIgnoreModemControlLines (bool truefalse)
 
void setBlockJobControlOutput (bool truefalse)
 
void setHardwareFlowControl (bool truefalse)
 
baudrate_t getBaud ()
 
baudrate_t getInputBaud ()
 
baudrate_t getOutputBaud ()
 
charsize_t getCharacterSize ()
 
bool getTwoStopBits ()
 
bool getReceiverOn ()
 
bool getParityCheck ()
 
bool getOddParity ()
 
bool getHangupOnClose ()
 
bool getIgnoreModemControlLines ()
 
bool getBlockJobControlOutput ()
 
bool getHardwareFlowControl ()
 
void setGenerateSignals (bool truefalse)
 
void setCanonicalInput (bool truefalse)
 
void setEscapedUpperCase (bool truefalse)
 
void setEchoInput (bool truefalse)
 
void setEraseCharactersOn (bool truefalse)
 
void setKillCharacterOn (bool truefalse)
 
void setEchoNewLine (bool truefalse)
 
void setExtendedFunctions (bool truefalse)
 
void setEchoControlCharacters (bool truefalse)
 
void setEchoErasedCharacter (bool truefalse)
 
void setEmulateKill (bool truefalse)
 
void setNoFlushAfterInterruptOrQuit (bool truefalse)
 
void setRetypePendingCharacters (bool truefalse)
 
void setSendSignalForBackgroundOutput (bool truefalse)
 
bool getGenerateSignals ()
 
bool getCanonicalInput ()
 
bool getEscapedUpperCase ()
 
bool getEchoInput ()
 
bool getEraseCharactersOn ()
 
bool getKillCharacterOn ()
 
bool getEchoNewLine ()
 
bool getExtendedFunctions ()
 
bool getEchoControlCharacters ()
 
bool getEchoErasedCharacter ()
 
bool getEmulateKill ()
 
bool getNoFlushAfterInterruptOrQuit ()
 
bool getRetypePendingCharacters ()
 
bool getSendSignalForBackgroundOutput ()
 
void setInputParityCheck (bool truefalse)
 
void setIgnoreParityErrors (bool truefalse)
 
void setMarkParityErrors (bool truefalse)
 
void setStripParityBits (bool truefalse)
 
void setSoftwareFlowControlOnOutput (bool truefalse)
 
void setSoftwareFlowControlOnInput (bool truefalse)
 
void setAnyCharacterStartsFlow (bool truefalse)
 
void setIgnoreBreak (bool truefalse)
 
void setSendSignalOnBreak (bool truefalse)
 
void setMapNewLineToCarriageReturnOnInput (bool truefalse)
 
void setDiscardEndOfTransmission (bool truefalse)
 
void setIgnoreCarriageReturn (bool truefalse)
 
void setMapCarriageReturnToNewLineOnInput (bool truefalse)
 
void setLowerCase (bool truefalse)
 
void setBellIfLineTooLong (bool truefalse)
 
bool getInputParityCheck ()
 
bool getIgnoreParityErrors ()
 
bool getMarkParityErrors ()
 
bool getStripParityBits ()
 
bool getSoftwareFlowControlOnOutput ()
 
bool getSoftwareFlowControlOnInput ()
 
bool getAnyCharacterStartsFlow ()
 
bool getIgnoreBreak ()
 
bool getSendSignalOnBreak ()
 
bool getMapNewLineToCarriageReturnOnInput ()
 
bool getDiscardEndOfTransmission ()
 
bool getIgnoreCarriageReturn ()
 
bool getMapCarriageReturnToNewLineOnInput ()
 
bool getLowerCase ()
 
bool getBellIfLineTooLong ()
 
void setPostProcessOutput (bool truefalse)
 
void setOutputUpperCase (bool truefalse)
 
void setMapNewLineToCarriageReturnNewLineOnOutput (bool truefalse)
 
void setMapCarriageReturnToNewLineOnOutput (bool truefalse)
 
void setDontOutputCarriageReturnAtColumnZero (bool truefalse)
 
void setMapNewLineToCarriageReturnOnOutput (bool truefalse)
 
void setUseFillCharactersForDelay (bool truefalse)
 
void setUseDelForFill (bool truefalse)
 
void setExpandTabToSpaces (bool truefalse)
 
void setDelayAfterNewLine (newlinedelay_t nldelay)
 
void setDelayAfterCarriageReturn (carriagereturndelay_t crdelay)
 
void setDelayAfterTab (tabdelay_t tabdelay)
 
void setDelayAfterBackSpace (backspacedelay_t bsdelay)
 
void setDelayAfterVerticalTab (verticaltabdelay_t vtdelay)
 
void setDelayAfterFormFeed (formfeeddelay_t ffdelay)
 
bool getPostProcessOutput ()
 
bool getOutputUpperCase ()
 
bool getMapNewLineToCarriageReturnNewLineOnOutput ()
 
bool getMapCarriageReturnToNewLineOnOutput ()
 
bool getDontOutputCarriageReturnAtColumnZero ()
 
bool getMapNewLineToCarriageReturnOnOutput ()
 
bool getUseFillCharactersForDelay ()
 
bool getUseDelForFill ()
 
bool getExpandTabToSpaces ()
 
newlinedelay_t getDelayAfterNewLine ()
 
carriagereturndelay_t getDelayAfterCarriageReturn ()
 
tabdelay_t getDelayAfterTab ()
 
backspacedelay_t getDelayAfterBackSpace ()
 
verticaltabdelay_t getDelayAfterVerticalTab ()
 
formfeeddelay_t getDelayAfterFormFeed ()
 
void setInterruptCharacter (byte_t character)
 
void setQuitCharacter (byte_t character)
 
void setEraseCharacter (byte_t character)
 
void setKillCharacter (byte_t character)
 
void setEndOfFileCharacter (byte_t character)
 
void setEndOfLineCharacter (byte_t character)
 
void setSecondEndOfLineCharacter (byte_t character)
 
void setSwitchCharacer (byte_t character)
 
void setStartCharacter (byte_t character)
 
void setStopCharacter (byte_t character)
 
void setSuspendCharacter (byte_t character)
 
void setDelayedSuspendCharacter (byte_t character)
 
void setLiteralNextCharcter (byte_t character)
 
void setWordEraseCharcter (byte_t character)
 
void setReprintCharacter (byte_t character)
 
void setDiscardPendingOutputCharacter (byte_t character)
 
void setStatusRequestCharacter (byte_t character)
 
void setReadThreshold (byte_t count)
 
void setReadTimeout (byte_t deciseconds)
 
byte_t getInterruptCharacter ()
 
byte_t getQuitCharacter ()
 
byte_t getEraseCharacter ()
 
byte_t getKillCharacter ()
 
byte_t getEndOfFileCharacter ()
 
byte_t getEndOfLineCharacter ()
 
byte_t getSecondEndOfLineCharacter ()
 
byte_t getSwitchCharacer ()
 
byte_t getStartCharacter ()
 
byte_t getStopCharacter ()
 
byte_t getSuspendCharacter ()
 
byte_t getDelayedSuspendCharacter ()
 
byte_t getLiteralNextCharcter ()
 
byte_t getWordEraseCharcter ()
 
byte_t getReprintCharacter ()
 
byte_t getDiscardPendingOutputCharacter ()
 
byte_t getStatusRequestCharacter ()
 
byte_t getReadThreshold ()
 
byte_t getReadTimeout ()
 
- Public Member Functions inherited from object
virtual ~object ()
 

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

◆ getAnyCharacterStartsFlow()

bool serialportprofile::getAnyCharacterStartsFlow ( )

Returns true if any character will restart output.

◆ getBaud()

baudrate_t serialportprofile::getBaud ( )

Returns current (input and output) baud.

◆ getBellIfLineTooLong()

bool serialportprofile::getBellIfLineTooLong ( )

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

◆ getBlockJobControlOutput()

bool serialportprofile::getBlockJobControlOutput ( )

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

◆ getCanonicalInput()

bool serialportprofile::getCanonicalInput ( )

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

◆ getCharacterSize()

charsize_t serialportprofile::getCharacterSize ( )

Returns current character size.

◆ getDelayAfterBackSpace()

backspacedelay_t serialportprofile::getDelayAfterBackSpace ( )

Returns the delay that is sent after backspace characters.

◆ getDelayAfterCarriageReturn()

carriagereturndelay_t serialportprofile::getDelayAfterCarriageReturn ( )

Returns the delay that is sent after carriage return characters.

◆ getDelayAfterFormFeed()

formfeeddelay_t serialportprofile::getDelayAfterFormFeed ( )

Returns the delay that is sent after form feed characters.

◆ getDelayAfterNewLine()

newlinedelay_t serialportprofile::getDelayAfterNewLine ( )

Returns the delay that is sent after new line characters.

◆ getDelayAfterTab()

tabdelay_t serialportprofile::getDelayAfterTab ( )

Returns the delay that is sent after tab characters.

◆ getDelayAfterVerticalTab()

verticaltabdelay_t serialportprofile::getDelayAfterVerticalTab ( )

Returns the delay that is sent after vertical tab characters.

◆ getDelayedSuspendCharacter()

byte_t serialportprofile::getDelayedSuspendCharacter ( )

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

◆ getDiscardEndOfTransmission()

bool serialportprofile::getDiscardEndOfTransmission ( )

???

◆ getDiscardPendingOutputCharacter()

byte_t serialportprofile::getDiscardPendingOutputCharacter ( )

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

◆ getDontOutputCarriageReturnAtColumnZero()

bool serialportprofile::getDontOutputCarriageReturnAtColumnZero ( )

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

◆ getEchoControlCharacters()

bool serialportprofile::getEchoControlCharacters ( )

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

◆ getEchoErasedCharacter()

bool serialportprofile::getEchoErasedCharacter ( )

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

◆ getEchoInput()

bool serialportprofile::getEchoInput ( )

Returns true if input characters are being echoed.

◆ getEchoNewLine()

bool serialportprofile::getEchoNewLine ( )

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

◆ getEmulateKill()

bool serialportprofile::getEmulateKill ( )

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

◆ getEndOfFileCharacter()

byte_t serialportprofile::getEndOfFileCharacter ( )

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.

◆ getEndOfLineCharacter()

byte_t serialportprofile::getEndOfLineCharacter ( )

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

◆ getEraseCharacter()

byte_t serialportprofile::getEraseCharacter ( )

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

◆ getEraseCharactersOn()

bool serialportprofile::getEraseCharactersOn ( )

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

◆ getEscapedUpperCase()

bool serialportprofile::getEscapedUpperCase ( )

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 .

◆ getExpandTabToSpaces()

bool serialportprofile::getExpandTabToSpaces ( )

Returns true if the tabs are mapped to spaces.

◆ getExtendedFunctions()

bool serialportprofile::getExtendedFunctions ( )

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

◆ getFlowControl()

flowcontrol_t serialportprofile::getFlowControl ( )

Get the current flow control setting.

◆ getGenerateSignals()

bool serialportprofile::getGenerateSignals ( )

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.

◆ getHangupOnClose()

bool serialportprofile::getHangupOnClose ( )

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

◆ getHardwareFlowControl()

bool serialportprofile::getHardwareFlowControl ( )

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

◆ getIgnoreBreak()

bool serialportprofile::getIgnoreBreak ( )

Returns true if the BREAK character is being ignored.

◆ getIgnoreCarriageReturn()

bool serialportprofile::getIgnoreCarriageReturn ( )

Returns true if carriage returns are ignored on input.

◆ getIgnoreModemControlLines()

bool serialportprofile::getIgnoreModemControlLines ( )

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

◆ getIgnoreParityErrors()

bool serialportprofile::getIgnoreParityErrors ( )

Returns true if parity errors are being ignored.

◆ getInputBaud()

baudrate_t serialportprofile::getInputBaud ( )

Returns current input baud.

◆ getInputMode()

inputmode_t serialportprofile::getInputMode ( )

Get the current input mode setting.

◆ getInputParityCheck()

bool serialportprofile::getInputParityCheck ( )

Returns true if input parity checking is enabled.

◆ getInterruptCharacter()

byte_t serialportprofile::getInterruptCharacter ( )

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

◆ getKillCharacter()

byte_t serialportprofile::getKillCharacter ( )

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

◆ getKillCharacterOn()

bool serialportprofile::getKillCharacterOn ( )

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

◆ getLiteralNextCharcter()

byte_t serialportprofile::getLiteralNextCharcter ( )

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

◆ getLowerCase()

bool serialportprofile::getLowerCase ( )

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

◆ getMapCarriageReturnToNewLineOnInput()

bool serialportprofile::getMapCarriageReturnToNewLineOnInput ( )

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

◆ getMapCarriageReturnToNewLineOnOutput()

bool serialportprofile::getMapCarriageReturnToNewLineOnOutput ( )

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

◆ getMapNewLineToCarriageReturnNewLineOnOutput()

bool serialportprofile::getMapNewLineToCarriageReturnNewLineOnOutput ( )

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

◆ getMapNewLineToCarriageReturnOnInput()

bool serialportprofile::getMapNewLineToCarriageReturnOnInput ( )

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

◆ getMapNewLineToCarriageReturnOnOutput()

bool serialportprofile::getMapNewLineToCarriageReturnOnOutput ( )

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

◆ getMarkParityErrors()

bool serialportprofile::getMarkParityErrors ( )

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

◆ getNoFlushAfterInterruptOrQuit()

bool serialportprofile::getNoFlushAfterInterruptOrQuit ( )

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

◆ getOddParity()

bool serialportprofile::getOddParity ( )

Returns true if odd parity is being used.

◆ getOutputBaud()

baudrate_t serialportprofile::getOutputBaud ( )

Returns current output baud.

◆ getOutputUpperCase()

bool serialportprofile::getOutputUpperCase ( )

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

◆ getParityCheck()

bool serialportprofile::getParityCheck ( )

Returns true if parity check is enabled.

◆ getPostProcessOutput()

bool serialportprofile::getPostProcessOutput ( )

Returns true if implementation-defined output processing is enabled.

◆ getQuitCharacter()

byte_t serialportprofile::getQuitCharacter ( )

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

◆ getReadThreshold()

byte_t serialportprofile::getReadThreshold ( )

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

◆ getReadTimeout()

byte_t serialportprofile::getReadTimeout ( )

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

◆ getReceiverOn()

bool serialportprofile::getReceiverOn ( )

Returns true if the receiver is on.

◆ getReprintCharacter()

byte_t serialportprofile::getReprintCharacter ( )

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

◆ getRetypePendingCharacters()

bool serialportprofile::getRetypePendingCharacters ( )

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

◆ getSecondEndOfLineCharacter()

byte_t serialportprofile::getSecondEndOfLineCharacter ( )

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

◆ getSendSignalForBackgroundOutput()

bool serialportprofile::getSendSignalForBackgroundOutput ( )

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.

◆ getSendSignalOnBreak()

bool serialportprofile::getSendSignalOnBreak ( )

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.

◆ getSoftwareFlowControlOnInput()

bool serialportprofile::getSoftwareFlowControlOnInput ( )

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

◆ getSoftwareFlowControlOnOutput()

bool serialportprofile::getSoftwareFlowControlOnOutput ( )

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

◆ getStartCharacter()

byte_t serialportprofile::getStartCharacter ( )

Returns the start character for XON/XOFF flow control.

◆ getStatusRequestCharacter()

byte_t serialportprofile::getStatusRequestCharacter ( )

Returns the status request character.

◆ getStopCharacter()

byte_t serialportprofile::getStopCharacter ( )

Returns the stop character for XON/XOFF flow control.

◆ getStripParityBits()

bool serialportprofile::getStripParityBits ( )

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

◆ getSuspendCharacter()

byte_t serialportprofile::getSuspendCharacter ( )

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

◆ getSwitchCharacer()

byte_t serialportprofile::getSwitchCharacer ( )

Returns the switch character.

◆ getTwoStopBits()

bool serialportprofile::getTwoStopBits ( )

Returns true if two stop bits are being used.

◆ getUseDelForFill()

bool serialportprofile::getUseDelForFill ( )

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

◆ getUseFillCharactersForDelay()

bool serialportprofile::getUseFillCharactersForDelay ( )

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

◆ getWordEraseCharcter()

byte_t serialportprofile::getWordEraseCharcter ( )

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

◆ parseOptionsString()

void serialportprofile::parseOptionsString ( 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.

◆ setAnyCharacterStartsFlow()

void serialportprofile::setAnyCharacterStartsFlow ( bool truefalse)

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

◆ setBaud() [1/2]

void serialportprofile::setBaud ( baudrate_t baudrate)

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

◆ setBaud() [2/2]

void serialportprofile::setBaud ( const char * baudrate)

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

◆ setBellIfLineTooLong()

void serialportprofile::setBellIfLineTooLong ( bool truefalse)

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

◆ setBlockJobControlOutput()

void serialportprofile::setBlockJobControlOutput ( bool truefalse)

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

◆ setCanonicalInput()

void serialportprofile::setCanonicalInput ( 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.

◆ setCharacterSize()

void serialportprofile::setCharacterSize ( charsize_t size)

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

◆ setControlCharacters()

void serialportprofile::setControlCharacters ( const byte_t * c_cc)

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

◆ setDefaultControlCharacters()

void serialportprofile::setDefaultControlCharacters ( )

Sets the control characters to system defaults.

◆ setDefaultControlOptions()

void serialportprofile::setDefaultControlOptions ( )

Sets the control options to system defaults.

◆ setDefaultInputOptions()

void serialportprofile::setDefaultInputOptions ( )

Sets the input options to system defaults.

◆ setDefaultLocalOptions()

void serialportprofile::setDefaultLocalOptions ( )

Sets the local options to system defaults.

◆ setDefaultOptions()

void serialportprofile::setDefaultOptions ( )

Sets all options and control characters to system defaults.

◆ setDefaultOutputOptions()

void serialportprofile::setDefaultOutputOptions ( )

Sets the output options to system defaults.

◆ setDelayAfterBackSpace()

void serialportprofile::setDelayAfterBackSpace ( backspacedelay_t bsdelay)

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

◆ setDelayAfterCarriageReturn()

void serialportprofile::setDelayAfterCarriageReturn ( carriagereturndelay_t crdelay)

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

◆ setDelayAfterFormFeed()

void serialportprofile::setDelayAfterFormFeed ( formfeeddelay_t ffdelay)

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

◆ setDelayAfterNewLine()

void serialportprofile::setDelayAfterNewLine ( newlinedelay_t nldelay)

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

◆ setDelayAfterTab()

void serialportprofile::setDelayAfterTab ( tabdelay_t tabdelay)

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

◆ setDelayAfterVerticalTab()

void serialportprofile::setDelayAfterVerticalTab ( verticaltabdelay_t vtdelay)

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

◆ setDelayedSuspendCharacter()

void serialportprofile::setDelayedSuspendCharacter ( byte_t 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.

◆ setDiscardEndOfTransmission()

void serialportprofile::setDiscardEndOfTransmission ( bool truefalse)

??? Corresponding termios flag: ONOEOT.

◆ setDiscardPendingOutputCharacter()

void serialportprofile::setDiscardPendingOutputCharacter ( byte_t character)

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

◆ setDontOutputCarriageReturnAtColumnZero()

void serialportprofile::setDontOutputCarriageReturnAtColumnZero ( bool truefalse)

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

◆ setEchoControlCharacters()

void serialportprofile::setEchoControlCharacters ( 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.

◆ setEchoErasedCharacter()

void serialportprofile::setEchoErasedCharacter ( bool truefalse)

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

◆ setEchoInput()

void serialportprofile::setEchoInput ( bool truefalse)

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

◆ setEchoNewLine()

void serialportprofile::setEchoNewLine ( bool truefalse)

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

◆ setEmulateKill()

void serialportprofile::setEmulateKill ( 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.

◆ setEndOfFileCharacter()

void serialportprofile::setEndOfFileCharacter ( byte_t 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.

◆ setEndOfLineCharacter()

void serialportprofile::setEndOfLineCharacter ( byte_t character)

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

◆ setEraseCharacter()

void serialportprofile::setEraseCharacter ( byte_t character)

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

◆ setEraseCharactersOn()

void serialportprofile::setEraseCharactersOn ( 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.

◆ setEscapedUpperCase()

void serialportprofile::setEscapedUpperCase ( 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.

◆ setExpandTabToSpaces()

void serialportprofile::setExpandTabToSpaces ( bool truefalse)

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

◆ setExtendedFunctions()

void serialportprofile::setExtendedFunctions ( bool truefalse)

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

◆ setFlowControl()

void serialportprofile::setFlowControl ( flowcontrol_t flowcontrol)

Set flow control to "flowcontrol".

◆ setGenerateSignals()

void serialportprofile::setGenerateSignals ( 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.

◆ setHangupOnClose()

void serialportprofile::setHangupOnClose ( 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.

◆ setHardwareFlowControl()

void serialportprofile::setHardwareFlowControl ( 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.

◆ setIgnoreBreak()

void serialportprofile::setIgnoreBreak ( bool truefalse)

Ignore BREAK character. Corresponding termios flag: IGNBRK.

◆ setIgnoreCarriageReturn()

void serialportprofile::setIgnoreCarriageReturn ( bool truefalse)

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

◆ setIgnoreModemControlLines()

void serialportprofile::setIgnoreModemControlLines ( 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.

◆ setIgnoreParityErrors()

void serialportprofile::setIgnoreParityErrors ( 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.

◆ setInputBaud() [1/2]

bool serialportprofile::setInputBaud ( baudrate_t baudrate)

Sets the input baud rate. Default is 0.

◆ setInputBaud() [2/2]

bool serialportprofile::setInputBaud ( const char * baudrate)

Sets the input baud rate. Default is 0.

◆ setInputMode()

void serialportprofile::setInputMode ( inputmode_t inputmode)

Set input mode to "inputmode".

◆ setInputParityCheck()

void serialportprofile::setInputParityCheck ( bool truefalse)

Enable parity checking on input Corresponding termios flag: INPCK.

◆ setInterruptCharacter()

void serialportprofile::setInterruptCharacter ( byte_t character)

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

◆ setKillCharacter()

void serialportprofile::setKillCharacter ( byte_t character)

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

◆ setKillCharacterOn()

void serialportprofile::setKillCharacterOn ( bool truefalse)

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

◆ setLiteralNextCharcter()

void serialportprofile::setLiteralNextCharcter ( byte_t character)

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

◆ setLowerCase()

void serialportprofile::setLowerCase ( bool truefalse)

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

◆ setMapCarriageReturnToNewLineOnInput()

void serialportprofile::setMapCarriageReturnToNewLineOnInput ( bool truefalse)

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

◆ setMapCarriageReturnToNewLineOnOutput()

void serialportprofile::setMapCarriageReturnToNewLineOnOutput ( bool truefalse)

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

◆ setMapNewLineToCarriageReturnNewLineOnOutput()

void serialportprofile::setMapNewLineToCarriageReturnNewLineOnOutput ( bool truefalse)

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

◆ setMapNewLineToCarriageReturnOnInput()

void serialportprofile::setMapNewLineToCarriageReturnOnInput ( bool truefalse)

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

◆ setMapNewLineToCarriageReturnOnOutput()

void serialportprofile::setMapNewLineToCarriageReturnOnOutput ( bool truefalse)

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

◆ setMarkParityErrors()

void serialportprofile::setMarkParityErrors ( 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.

◆ setNoFlushAfterInterruptOrQuit()

void serialportprofile::setNoFlushAfterInterruptOrQuit ( bool truefalse)

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

◆ setOddParity()

void serialportprofile::setOddParity ( bool truefalse)

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

◆ setOutputBaud() [1/2]

bool serialportprofile::setOutputBaud ( baudrate_t baudrate)

Sets the output baud rate. Default is 0.

◆ setOutputBaud() [2/2]

bool serialportprofile::setOutputBaud ( const char * baudrate)

Sets the output baud rate. Default is 0.

◆ setOutputUpperCase()

void serialportprofile::setOutputUpperCase ( bool truefalse)

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

◆ setParityCheck()

void serialportprofile::setParityCheck ( bool truefalse)

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

◆ setPostProcessOutput()

void serialportprofile::setPostProcessOutput ( bool truefalse)

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

◆ setQuitCharacter()

void serialportprofile::setQuitCharacter ( byte_t character)

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

◆ setReadThreshold()

void serialportprofile::setReadThreshold ( byte_t 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.

◆ setReadTimeout()

void serialportprofile::setReadTimeout ( byte_t deciseconds)

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

◆ setReceiverOn()

void serialportprofile::setReceiverOn ( 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.

◆ setReprintCharacter()

void serialportprofile::setReprintCharacter ( byte_t character)

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

◆ setRetypePendingCharacters()

void serialportprofile::setRetypePendingCharacters ( bool truefalse)

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

◆ setSecondEndOfLineCharacter()

void serialportprofile::setSecondEndOfLineCharacter ( byte_t character)

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

◆ setSendSignalForBackgroundOutput()

void serialportprofile::setSendSignalForBackgroundOutput ( 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.

◆ setSendSignalOnBreak()

void serialportprofile::setSendSignalOnBreak ( 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.

◆ setSoftwareFlowControlOnInput()

void serialportprofile::setSoftwareFlowControlOnInput ( bool truefalse)

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

◆ setSoftwareFlowControlOnOutput()

void serialportprofile::setSoftwareFlowControlOnOutput ( bool truefalse)

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

◆ setStartCharacter()

void serialportprofile::setStartCharacter ( byte_t character)

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

◆ setStatusRequestCharacter()

void serialportprofile::setStatusRequestCharacter ( byte_t character)

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

◆ setStopCharacter()

void serialportprofile::setStopCharacter ( byte_t character)

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

◆ setStripParityBits()

void serialportprofile::setStripParityBits ( bool truefalse)

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

◆ setSuspendCharacter()

void serialportprofile::setSuspendCharacter ( byte_t character)

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

◆ setSwitchCharacer()

void serialportprofile::setSwitchCharacer ( byte_t character)

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

◆ setTwoStopBits()

void serialportprofile::setTwoStopBits ( 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.

◆ setUseDelForFill()

void serialportprofile::setUseDelForFill ( bool truefalse)

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

◆ setUseFillCharactersForDelay()

void serialportprofile::setUseFillCharactersForDelay ( bool truefalse)

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

◆ setWordEraseCharcter()

void serialportprofile::setWordEraseCharcter ( byte_t character)

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