Rudiments
serialportprofile.h
1// Copyright (c) 1999-2018 David Muse
2// See the COPYING file for more information.
3
4#ifndef RUDIMENTS_SERIALPORTPROFILE_H
5#define RUDIMENTS_SERIALPORTPROFILE_H
6
7#include <rudiments/private/serialportprofileincludes.h>
8
9// cfmakeraw, cfsetspeed???
10// wraps struct termios
11
21class RUDIMENTS_DLLSPEC serialportprofile : public object {
22 public:
23
24 enum inputmode_t {
25 cannonical=0,
26 raw
27 };
28
29 enum flowcontrol_t {
30 fc_none=0,
31 fc_software,
32 fc_hardware
33 };
34
35 enum baudrate_t {
36 baud_0=0,
37 baud_50,
38 baud_75,
39 baud_110,
40 baud_134,
41 baud_150,
42 baud_200,
43 baud_300,
44 baud_600,
45 baud_1200,
46 baud_1800,
47 baud_2400,
48 baud_4800,
49 baud_9600,
50 baud_19200,
51 exta,
52 baud_38400,
53 extb,
54 baud_57600,
55 baud_76800,
56 baud_115200,
57 baud_230400,
58 baud_460800,
59 baud_500000,
60 baud_576000,
61 baud_921600,
62 baud_1000000,
63 baud_1152000,
64 baud_1500000,
65 baud_2000000,
66 baud_2500000,
67 baud_3000000,
68 baud_3500000,
69 baud_4000000
70 };
71
72 enum charsize_t {
73 cs_5=0,
74 cs_6,
75 cs_7,
76 cs_8
77 };
78
79 enum newlinedelay_t {
80 nl_none=0,
81 nl_100
82 };
83
84 enum carriagereturndelay_t {
85 cr_none=0,
86 cr_depends,
87 cr_100,
88 cr_150
89 };
90
91 enum tabdelay_t {
92 td_0=0,
93 td_1,
94 td_2,
95 td_xtabs
96 };
97
98 enum backspacedelay_t {
99 bs_none=0,
100 bs_50
101 };
102
103 enum verticaltabdelay_t {
104 vt_none=0,
105 vt_2
106 };
107
108 enum formfeeddelay_t {
109 ff_none=0,
110 ff_2
111 };
112
115
118
121
124
127
130
133
137
141 void setControlCharacters(const byte_t *c_cc);
142
149 void parseOptionsString(const char *string);
150
152 void setInputMode(inputmode_t inputmode);
153
155 inputmode_t getInputMode();
156
158 void setFlowControl(flowcontrol_t flowcontrol);
159
161 flowcontrol_t getFlowControl();
162
164 void setBaud(const char *baudrate);
165
167 void setBaud(baudrate_t baudrate);
168
170 bool setInputBaud(const char *baudrate);
171
173 bool setInputBaud(baudrate_t baudrate);
174
176 bool setOutputBaud(const char *baudrate);
177
179 bool setOutputBaud(baudrate_t baudrate);
180
183 void setCharacterSize(charsize_t size);
184
190
197
202
208
214
224
229
235
237 baudrate_t getBaud();
238
240 baudrate_t getInputBaud();
241
243 baudrate_t getOutputBaud();
244
246 charsize_t getCharacterSize();
247
250
253
256
259
264
268
272
276
282
290
302
306
313
318
323
330
336
341
349
354
359
365
370
375
382
385
391
395
399
405
410
414
419
424
428
433
437
443
450
454
458
462
466
470
479
483
487
491
495
499
503
506
509
513
517
521
525
528
531
537
541
544
547
551
555
559
560
564
568
572 bool truefalse);
573
577
581
585
590
595
599
602 void setDelayAfterNewLine(newlinedelay_t nldelay);
603
607 carriagereturndelay_t crdelay);
608
611 void setDelayAfterTab(tabdelay_t tabdelay);
612
615 void setDelayAfterBackSpace(backspacedelay_t bsdelay);
616
619 void setDelayAfterVerticalTab(verticaltabdelay_t vtdelay);
620
623 void setDelayAfterFormFeed(formfeeddelay_t ffdelay);
624
628
632
636
640
644
648
652
656
659
662 newlinedelay_t getDelayAfterNewLine();
663
666 carriagereturndelay_t getDelayAfterCarriageReturn();
667
669 tabdelay_t getDelayAfterTab();
670
673 backspacedelay_t getDelayAfterBackSpace();
674
677 verticaltabdelay_t getDelayAfterVerticalTab();
678
681 formfeeddelay_t getDelayAfterFormFeed();
682
688
694
699
704
711
716
721
725
729
733
739
745
751
756
762
768
772
778
784
785
790
795
799
803
809
813
817
820
823
826
831
836
841
845
846
851
856
859
864
869
870 #include <rudiments/private/serialportprofile.h>
871};
872
873#endif
Definition avltree.h:11
Definition character.h:11
Definition object.h:10
Definition serialportprofile.h:21
void setSoftwareFlowControlOnOutput(bool truefalse)
void setFlowControl(flowcontrol_t flowcontrol)
bool getGenerateSignals()
void setPostProcessOutput(bool truefalse)
void setBaud(baudrate_t baudrate)
void setSoftwareFlowControlOnInput(bool truefalse)
void setDiscardPendingOutputCharacter(byte_t character)
bool getRetypePendingCharacters()
bool setOutputBaud(const char *baudrate)
bool getIgnoreParityErrors()
void setSecondEndOfLineCharacter(byte_t character)
bool getMapCarriageReturnToNewLineOnOutput()
void setEndOfFileCharacter(byte_t character)
void setEraseCharactersOn(bool truefalse)
byte_t getReprintCharacter()
byte_t getStopCharacter()
byte_t getStartCharacter()
byte_t getQuitCharacter()
bool getSendSignalForBackgroundOutput()
charsize_t getCharacterSize()
void setIgnoreModemControlLines(bool truefalse)
void setInterruptCharacter(byte_t character)
backspacedelay_t getDelayAfterBackSpace()
bool getMapNewLineToCarriageReturnOnInput()
void setHangupOnClose(bool truefalse)
void setBaud(const char *baudrate)
void setMapNewLineToCarriageReturnOnInput(bool truefalse)
bool getNoFlushAfterInterruptOrQuit()
byte_t getEndOfLineCharacter()
void setOutputUpperCase(bool truefalse)
bool getIgnoreCarriageReturn()
void setGenerateSignals(bool truefalse)
bool getStripParityBits()
void setCanonicalInput(bool truefalse)
baudrate_t getOutputBaud()
newlinedelay_t getDelayAfterNewLine()
void setDelayAfterCarriageReturn(carriagereturndelay_t crdelay)
tabdelay_t getDelayAfterTab()
void setReadTimeout(byte_t deciseconds)
bool getBellIfLineTooLong()
void setAnyCharacterStartsFlow(bool truefalse)
byte_t getReadThreshold()
void setDelayAfterVerticalTab(verticaltabdelay_t vtdelay)
byte_t getInterruptCharacter()
bool getExtendedFunctions()
void setInputParityCheck(bool truefalse)
void setRetypePendingCharacters(bool truefalse)
byte_t getEndOfFileCharacter()
void setIgnoreBreak(bool truefalse)
void setKillCharacterOn(bool truefalse)
bool getBlockJobControlOutput()
void setStatusRequestCharacter(byte_t character)
void setNoFlushAfterInterruptOrQuit(bool truefalse)
bool getAnyCharacterStartsFlow()
void setInputMode(inputmode_t inputmode)
void setSuspendCharacter(byte_t character)
void setUseFillCharactersForDelay(bool truefalse)
verticaltabdelay_t getDelayAfterVerticalTab()
void setWordEraseCharcter(byte_t character)
void setBlockJobControlOutput(bool truefalse)
void setSwitchCharacer(byte_t character)
void setCharacterSize(charsize_t size)
void setMapCarriageReturnToNewLineOnInput(bool truefalse)
void setExpandTabToSpaces(bool truefalse)
bool setOutputBaud(baudrate_t baudrate)
void setSendSignalOnBreak(bool truefalse)
void setReceiverOn(bool truefalse)
flowcontrol_t getFlowControl()
formfeeddelay_t getDelayAfterFormFeed()
void setStopCharacter(byte_t character)
bool getOutputUpperCase()
void setQuitCharacter(byte_t character)
void setEscapedUpperCase(bool truefalse)
void setParityCheck(bool truefalse)
void setDelayedSuspendCharacter(byte_t character)
bool getSendSignalOnBreak()
void setStripParityBits(bool truefalse)
byte_t getEraseCharacter()
bool getPostProcessOutput()
bool getMarkParityErrors()
void setHardwareFlowControl(bool truefalse)
void setMapCarriageReturnToNewLineOnOutput(bool truefalse)
inputmode_t getInputMode()
void setLiteralNextCharcter(byte_t character)
void setStartCharacter(byte_t character)
bool setInputBaud(const char *baudrate)
byte_t getDiscardPendingOutputCharacter()
void setReprintCharacter(byte_t character)
byte_t getDelayedSuspendCharacter()
bool setInputBaud(baudrate_t baudrate)
byte_t getStatusRequestCharacter()
byte_t getReadTimeout()
bool getInputParityCheck()
void setDefaultLocalOptions()
void setBellIfLineTooLong(bool truefalse)
void setEraseCharacter(byte_t character)
void setReadThreshold(byte_t count)
bool getMapNewLineToCarriageReturnOnOutput()
void setEchoNewLine(bool truefalse)
bool getMapCarriageReturnToNewLineOnInput()
void setOddParity(bool truefalse)
void setDefaultInputOptions()
bool getMapNewLineToCarriageReturnNewLineOnOutput()
bool getEchoErasedCharacter()
byte_t getLiteralNextCharcter()
void setMapNewLineToCarriageReturnOnOutput(bool truefalse)
void setLowerCase(bool truefalse)
void parseOptionsString(const char *string)
void setIgnoreParityErrors(bool truefalse)
byte_t getSuspendCharacter()
byte_t getSecondEndOfLineCharacter()
void setEchoInput(bool truefalse)
bool getHardwareFlowControl()
void setEmulateKill(bool truefalse)
bool getKillCharacterOn()
void setControlCharacters(const byte_t *c_cc)
bool getEraseCharactersOn()
bool getDiscardEndOfTransmission()
void setDelayAfterBackSpace(backspacedelay_t bsdelay)
void setDefaultOutputOptions()
baudrate_t getBaud()
bool getSoftwareFlowControlOnInput()
bool getUseFillCharactersForDelay()
void setDefaultControlOptions()
byte_t getSwitchCharacer()
void setDiscardEndOfTransmission(bool truefalse)
void setMarkParityErrors(bool truefalse)
bool getEchoControlCharacters()
void setTwoStopBits(bool truefalse)
bool getExpandTabToSpaces()
void setEchoControlCharacters(bool truefalse)
baudrate_t getInputBaud()
byte_t getKillCharacter()
void setIgnoreCarriageReturn(bool truefalse)
void setKillCharacter(byte_t character)
void setDelayAfterFormFeed(formfeeddelay_t ffdelay)
carriagereturndelay_t getDelayAfterCarriageReturn()
bool getEscapedUpperCase()
bool getCanonicalInput()
bool getSoftwareFlowControlOnOutput()
void setSendSignalForBackgroundOutput(bool truefalse)
void setDefaultControlCharacters()
bool getDontOutputCarriageReturnAtColumnZero()
void setExtendedFunctions(bool truefalse)
void setEchoErasedCharacter(bool truefalse)
void setDefaultOptions()
void setUseDelForFill(bool truefalse)
void setDelayAfterTab(tabdelay_t tabdelay)
void setMapNewLineToCarriageReturnNewLineOnOutput(bool truefalse)
byte_t getWordEraseCharcter()
bool getIgnoreModemControlLines()
void setEndOfLineCharacter(byte_t character)
void setDelayAfterNewLine(newlinedelay_t nldelay)
void setDontOutputCarriageReturnAtColumnZero(bool truefalse)