Rudiments
|
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 () |
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.
serialportprofile::serialportprofile | ( | ) |
Creates an instance of the serialportprofile class.
serialportprofile::~serialportprofile | ( | ) |
Deletes this instance of the serialportprofile class.
void serialportprofile::anyCharacterStartsFlow | ( | bool | truefalse | ) |
Enable any character to restart output. Corresponding termios flag: IXANY.
bool serialportprofile::anyCharacterStartsFlow | ( | ) |
Returns true if any character will restart output.
void serialportprofile::baud | ( | const char * | baudrate | ) |
Sets the (input and output) baud rate. Default is 0.
void serialportprofile::baud | ( | baudrate_t | baudrate | ) |
Sets the (input and output) baud rate. Default is 0.
baudrate_t serialportprofile::baud | ( | ) |
Returns current (input and output) baud.
void serialportprofile::bellIfLineTooLong | ( | bool | truefalse | ) |
Ring bell when input queue is full. Corresponding termios flag: IMAXBEL.
bool serialportprofile::bellIfLineTooLong | ( | ) |
Returns true if the bell will be rung when the input queue is full.
bool serialportprofile::blockJobControlOutput | ( | ) |
Returns true if output from a nonconcurrent shell layer is being blocked.
void serialportprofile::blockJobControlOutput | ( | bool | truefalse | ) |
Block output from a nonconcurrent shell layer. Default is not to block. Corresponding termios flag: LOBLK.
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.
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.
void serialportprofile::characterSize | ( | charsize_t | size | ) |
Set the character size. Default is 5 bits. Corresponding termios flag: CSIZE.
charsize_t serialportprofile::characterSize | ( | ) |
Returns current character size.
void serialportprofile::defaultControlCharacters | ( | ) |
Sets the control characters to system defaults.
void serialportprofile::defaultControlOptions | ( | ) |
Sets the control options to system defaults.
void serialportprofile::defaultInputOptions | ( | ) |
Sets the input options to system defaults.
void serialportprofile::defaultLocalOptions | ( | ) |
Sets the local options to system defaults.
void serialportprofile::defaultOptions | ( | ) |
Sets all options and control characters to system defaults.
void serialportprofile::defaultOutputOptions | ( | ) |
Sets the output options to system defaults.
void serialportprofile::delayAfterBackSpace | ( | backspacedelay_t | bsdelay | ) |
Send a delay after each backspace character Corresponding termios flag: BSDLY.
backspacedelay_t serialportprofile::delayAfterBackSpace | ( | ) |
Returns the delay that is sent after backspace characters.
void serialportprofile::delayAfterCarriageReturn | ( | carriagereturndelay_t | crdelay | ) |
Send a delay after each carriage return character. Corresponding termios flag: CRDLY.
carriagereturndelay_t serialportprofile::delayAfterCarriageReturn | ( | ) |
Returns the delay that is sent after carriage return characters.
void serialportprofile::delayAfterFormFeed | ( | formfeeddelay_t | ffdelay | ) |
Send a delay after each form feed character Corresponding termios flag: FFDLY.
formfeeddelay_t serialportprofile::delayAfterFormFeed | ( | ) |
Returns the delay that is sent after form feed characters.
void serialportprofile::delayAfterNewLine | ( | newlinedelay_t | nldelay | ) |
Send a delay after each new line character. Corresponding termios flag: NLDLY.
newlinedelay_t serialportprofile::delayAfterNewLine | ( | ) |
Returns the delay that is sent after new line characters.
void serialportprofile::delayAfterTab | ( | tabdelay_t | tabdelay | ) |
Send a delay after each tab character Corresponding termios flag: TABDLY.
tabdelay_t serialportprofile::delayAfterTab | ( | ) |
Returns the delay that is sent after tab characters.
void serialportprofile::delayAfterVerticalTab | ( | verticaltabdelay_t | vtdelay | ) |
Send a delay after each vertical tab character. Corresponding termios flag: VTDLY.
verticaltabdelay_t serialportprofile::delayAfterVerticalTab | ( | ) |
Returns the delay that is sent after vertical tab characters.
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.
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.
void serialportprofile::discardEndOfTransmission | ( | bool | truefalse | ) |
??? Corresponding termios flag: ONOEOT.
bool serialportprofile::discardEndOfTransmission | ( | ) |
???
void serialportprofile::discardPendingOutputCharacter | ( | unsigned char | character | ) |
Sets the character that toggles discarding pending output, recognized when extendedFunctions() is set true. Corresponding termios flag: VDISCARD.
unsigned char serialportprofile::discardPendingOutputCharacter | ( | ) |
Returns the character that toggles discarding pending output, recognized when extendedFunctions() is set true.
void serialportprofile::dontOutputCarriageReturnAtColumnZero | ( | bool | truefalse | ) |
Don't output carriage return at column 0. Corresponding termios flag: ONOCR.
bool serialportprofile::dontOutputCarriageReturnAtColumnZero | ( | ) |
Returns true if carriage returns aren't sent at column 0.
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.
bool serialportprofile::echoControlCharacters | ( | ) |
Returns true if control characters are being echoed as ^X where X is the ascii code for the character plus 0x40.
void serialportprofile::echoErasedCharacter | ( | bool | truefalse | ) |
If cannonicalInput() and echoInput() are also set true, characters are printed as they are erased. Corresponding termios flag: ECHOPRT.
bool serialportprofile::echoErasedCharacter | ( | ) |
Returns true if characters are being printed as they are erased.
void serialportprofile::echoInput | ( | bool | truefalse | ) |
If cannonicalInput() is also set true then echo input. Corresponding termios flag: ECHO.
bool serialportprofile::echoInput | ( | ) |
Returns true if input characters are being echoed.
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.
bool serialportprofile::echoNewLine | ( | ) |
Returns true if new line characters are being echoed even if echoInput() is set false.
bool serialportprofile::emulateKill | ( | ) |
Returns true if the character set using killCharacter() causes the line to be erased by erasing each character on the line.
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.
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.
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.
void serialportprofile::endOfLineCharacter | ( | unsigned char | character | ) |
Sets the end-of-line character, recognized when canonicalInput() is set to true Corresponding termios flag: VEOL.
unsigned char serialportprofile::endOfLineCharacter | ( | ) |
Returns the end-of-line character, recognized when canonicalInput() is set to true.
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.
unsigned char serialportprofile::eraseCharacter | ( | ) |
Returns the character that will cause a character erase when canonicalInput() is set to true.
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.
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.
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.
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 \.
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.
void serialportprofile::expandTabToSpaces | ( | bool | truefalse | ) |
Map tabs to spaces. Corresponding termios flag: XTAGS/OXTABS/TAB3.
bool serialportprofile::expandTabToSpaces | ( | ) |
Returns true if the tabs are mapped to spaces.
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.
bool serialportprofile::extendedFunctions | ( | ) |
Returns true if characters set by secondEndOfLineCharacter(), reprintCharacter() and wordEraseCharacter() are enabled and lowerCase() is enabled.
void serialportprofile::flowControl | ( | flowcontrol_t | flowcontrol | ) |
Set flow control to "flowcontrol".
flowcontrol_t serialportprofile::flowControl | ( | ) |
Get the current flow control setting.
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.
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.
bool serialportprofile::hangupOnClose | ( | ) |
Returns true if the modem lines will be lowered when the last device closes the device.
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.
bool serialportprofile::hardwareFlowControl | ( | ) |
Returns true if RTS/CTS hardware flow control is being used.
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.
void serialportprofile::ignoreBreak | ( | bool | truefalse | ) |
Ignore BREAK character. Corresponding termios flag: IGNBRK.
bool serialportprofile::ignoreBreak | ( | ) |
Returns true if the BREAK character is being ignored.
bool serialportprofile::ignoreCarriageReturn | ( | ) |
Returns true if carriage returns are ignored on input.
void serialportprofile::ignoreCarriageReturn | ( | bool | truefalse | ) |
Ignore carriage return on input. Corresponding termios flag: IGNCR.
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.
bool serialportprofile::ignoreModemControlLines | ( | ) |
Returns true if (possibly sporadic) job control and hangup signals are being ignored.
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.
bool serialportprofile::ignoreParityErrors | ( | ) |
Returns true if parity errors are being ignored.
bool serialportprofile::inputBaud | ( | baudrate_t | baudrate | ) |
Sets the input baud rate. Default is 0.
baudrate_t serialportprofile::inputBaud | ( | ) |
Returns current input baud.
bool serialportprofile::inputBaud | ( | const char * | baudrate | ) |
Sets the input baud rate. Default is 0.
void serialportprofile::inputMode | ( | inputmode_t | inputmode | ) |
Set input mode to "inputmode".
inputmode_t serialportprofile::inputMode | ( | ) |
Get the current input mode setting.
void serialportprofile::inputParityCheck | ( | bool | truefalse | ) |
Enable parity checking on input Corresponding termios flag: INPCK.
bool serialportprofile::inputParityCheck | ( | ) |
Returns true if input parity checking is enabled.
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.
unsigned char serialportprofile::interruptCharacter | ( | ) |
Returns the character that will cause a SIGINT to be sent to the process when generateSignals() is set true.
unsigned char serialportprofile::killCharacter | ( | ) |
Returns the character that will cause a line erase when canonicalInput() is set to true.
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.
void serialportprofile::killCharacterOn | ( | bool | truefalse | ) |
If cannonicalInput() is also set true, character set using killCharacter() erases the current line. Corresponding termios flag: ECHOK.
bool serialportprofile::killCharacterOn | ( | ) |
Returns true if the character set using killCharacter() erases the current line.
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.
unsigned char serialportprofile::literalNextCharcter | ( | ) |
Returns the character that "quotes" the next character, depriving it of special meaning, recognized when extendedFunctions() is set true.
void serialportprofile::lowerCase | ( | bool | truefalse | ) |
Map uppercase characters to lowercase on input. Corresponding termios flag: IUCLC.
bool serialportprofile::lowerCase | ( | ) |
Returns true if uppercase characters are mapped to lowercase on input.
void serialportprofile::mapCarriageReturnToNewLineOnInput | ( | bool | truefalse | ) |
Translate carriage return to new line on input. Corresponding termios flag: ICRNL.
bool serialportprofile::mapCarriageReturnToNewLineOnInput | ( | ) |
Returns true if carriage returns are mapped to new lines on input.
void serialportprofile::mapCarriageReturnToNewLineOnOutput | ( | bool | truefalse | ) |
Map carriage return to new line on output. Corresponding termios flag: OCRNL.
bool serialportprofile::mapCarriageReturnToNewLineOnOutput | ( | ) |
Returns true if carriage returns are mapped to new lines on output.
void serialportprofile::mapNewLineToCarriageReturnNewLineOnOutput | ( | bool | truefalse | ) |
Map new line to carriage return/new line on output. Corresponding termios flag: ONLCR.
bool serialportprofile::mapNewLineToCarriageReturnNewLineOnOutput | ( | ) |
Returns true if new lines are mapped to carriage return/new line on output.
void serialportprofile::mapNewLineToCarriageReturnOnInput | ( | bool | truefalse | ) |
Translate new line to carriage return on input termios flag: INLCR.
bool serialportprofile::mapNewLineToCarriageReturnOnInput | ( | ) |
Returns true if new lines are mapped to carriage returns on input.
void serialportprofile::mapNewLineToCarriageReturnOnOutput | ( | bool | truefalse | ) |
Map new line to carriage return on output. Corresponding termios flag: ONLRET.
bool serialportprofile::mapNewLineToCarriageReturnOnOutput | ( | ) |
Returns true if new lines are mapped to carriage returns on output.
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.
bool serialportprofile::markParityErrors | ( | ) |
Returns true if characters with parity errors are prefixed with \377 \0.
bool serialportprofile::noFlushAfterInterruptOrQuit | ( | ) |
Returns true if flushing of the input/output queues when generating SIGINT, SIGQUIT or SIGSUSP signals is enabled.
void serialportprofile::noFlushAfterInterruptOrQuit | ( | bool | truefalse | ) |
Disables flushing of the input/output queues when generating SIGINT, SIGQUIT or SIGSUSP signals. Corresponding termios flag: NOFLSH.
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.
bool serialportprofile::oddParity | ( | ) |
Returns true if odd parity is being used.
bool serialportprofile::outputBaud | ( | baudrate_t | baudrate | ) |
Sets the output baud rate. Default is 0.
bool serialportprofile::outputBaud | ( | const char * | baudrate | ) |
Sets the output baud rate. Default is 0.
baudrate_t serialportprofile::outputBaud | ( | ) |
Returns current output baud.
void serialportprofile::outputUpperCase | ( | bool | truefalse | ) |
Map lowercase characters to uppercase on output. Corresponding termios flag: OLCUC.
bool serialportprofile::outputUpperCase | ( | ) |
Returns true if lowercase characters are mapped to uppercase on output.
bool serialportprofile::parityCheck | ( | ) |
Returns true if parity check is enabled.
void serialportprofile::parityCheck | ( | bool | truefalse | ) |
Turns parity checking on or off. Default is off. Corresponding termios flag: CPARENB.
void serialportprofile::postProcessOutput | ( | bool | truefalse | ) |
Enables implementation-defined output processing. Corresponding termios flag: OPOST.
bool serialportprofile::postProcessOutput | ( | ) |
Returns true if implementation-defined output processing is enabled.
unsigned char serialportprofile::quitCharacter | ( | ) |
Returns the character that will cause a SIGQUIT to be sent to the process when generateSignals() is set true.
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.
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.
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.
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.
unsigned char serialportprofile::readTimeout | ( | ) |
Returns the number of deciseconds that a read() will wait after reading readThreshold() characters before falling through.
bool serialportprofile::receiverOn | ( | ) |
Returns true if the receiver is on.
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.
unsigned char serialportprofile::reprintCharacter | ( | ) |
Returns the character that causes unread characters to be reprinted, recognized when canonicalInput() and extendedFunctions() are set true.
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.
bool serialportprofile::retypePendingCharacters | ( | ) |
Returns true if all characters in the input queue are reprinted when the next character is read.
void serialportprofile::retypePendingCharacters | ( | bool | truefalse | ) |
All characters in the input queue are reprinted when the next character is read. Corresponding termios flag: PENDIN.
void serialportprofile::secondEndOfLineCharacter | ( | unsigned char | character | ) |
Sets the "other" end-of-line character, recognized when canonicalInput() is set to true Corresponding termios flag: VEOL2.
unsigned char serialportprofile::secondEndOfLineCharacter | ( | ) |
Returns the "other" end-of-line character, recognized when canonicalInput() is set to true.
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.
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.
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.
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.
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.
void serialportprofile::softwareFlowControlOnInput | ( | bool | truefalse | ) |
Enable XON/XOFF flow control on input. Corresponding termios flag: IXOFF.
bool serialportprofile::softwareFlowControlOnInput | ( | ) |
Returns true if XON/XOFF flow control is enabled on input.
void serialportprofile::softwareFlowControlOnOutput | ( | bool | truefalse | ) |
Enable XON/XOFF flow control on output. Corresponding termios flag: IXON.
bool serialportprofile::softwareFlowControlOnOutput | ( | ) |
Returns true if XON/XOFF flow control is enabled on output.
unsigned char serialportprofile::startCharacter | ( | ) |
Returns the start character for XON/XOFF flow control.
void serialportprofile::startCharacter | ( | unsigned char | character | ) |
Sets the start character for XON/XOFF flow control Corresponding termios flag: VSTART.
unsigned char serialportprofile::statusRequestCharacter | ( | ) |
Returns the status request character.
void serialportprofile::statusRequestCharacter | ( | unsigned char | character | ) |
Sets the status request character. Corresponding termios flag: VSTATUS.
unsigned char serialportprofile::stopCharacter | ( | ) |
Returns the stop character for XON/XOFF flow control.
void serialportprofile::stopCharacter | ( | unsigned char | character | ) |
Sets the stop character for XON/XOFF flow control Corresponding termios flag: VSTOP.
bool serialportprofile::stripParityBits | ( | ) |
Returns true if the 8th bit (the parity bit) of each character is being set to 0.
void serialportprofile::stripParityBits | ( | bool | truefalse | ) |
Set the 8th bit of each character (the parity bit) to 0. Corresponding termios flag: ISTRIP.
unsigned char serialportprofile::suspendCharacter | ( | ) |
Returns the character that will cause a SIGSUSP to be sent to the process when generateSignals() is set true.
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.
void serialportprofile::switchCharacer | ( | unsigned char | character | ) |
Sets the switch character. Corresponding termios flag: VSWTCH/VSWTC.
unsigned char serialportprofile::switchCharacer | ( | ) |
Returns the switch character.
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.
bool serialportprofile::twoStopBits | ( | ) |
Returns true if two stop bits are being used.
void serialportprofile::useDelForFill | ( | bool | truefalse | ) |
Use the DEL character instead of NULL for the fill character. Corresponding termios flag: OFDEL.
bool serialportprofile::useDelForFill | ( | ) |
Returns true if the DEL character is used instead of NULL for the fill character.
void serialportprofile::useFillCharactersForDelay | ( | bool | truefalse | ) |
Send fill characters for delay instead of using a timed delay. Corresponding termios flag: OFILL.
bool serialportprofile::useFillCharactersForDelay | ( | ) |
Returns true if fill characters are sent for delay instead of using a timed delay.
unsigned char serialportprofile::wordEraseCharcter | ( | ) |
Returns the word erase character, recognized when canonicalInput() and extendedFunctions() are set true.
void serialportprofile::wordEraseCharcter | ( | unsigned char | character | ) |
Sets the word erase character, recognized when canonicalInput() and extendedFunctions() are set true. Corresponding termios flag: VWERASE.