Q3270
A Qt-based 3270 Terminal Emulator
Loading...
Searching...
No Matches
ProcessDataStream.h
1
/*
2
* Q3270 Terminal Emulator
3
*
4
* Copyright (c) 2020–2025 Andy Styles
5
* SPDX-License-Identifier: BSD-3-Clause
6
*
7
* This file is part of Q3270.
8
* See the LICENSE file in the project root for full license information.
9
*/
10
11
#ifndef PROCESSDATASTREAM_H
12
#define PROCESSDATASTREAM_H
13
14
#include <QGuiApplication>
15
#include <QScreen>
16
17
#include <QObject>
18
#include <QDebug>
19
20
#include <arpa/telnet.h>
21
22
#include "DisplayScreen.h"
23
24
class
Terminal
;
25
26
class
ProcessDataStream
:
public
QObject
27
{
28
Q_OBJECT
29
30
public
:
31
32
QString EBCDICtoASCII();
33
34
bool
processing;
35
36
ProcessDataStream
(
Terminal
*t,
DisplayScreen
*s);
37
38
void
showFields();
39
void
resetMDTs();
40
41
public
slots:
42
43
void
processStream
(QByteArray &b,
bool
tn3270e);
44
45
signals:
46
47
void
setAlternateScreen(
bool
alternate);
48
void
bufferReady(QByteArray &b);
49
void
processingComplete();
50
void
unlockKeyboard();
51
void
blink();
52
void
disconnected();
53
54
private
:
55
56
Terminal
*terminal;
57
DisplayScreen
*screen;
58
59
QByteArray::Iterator buffer;
60
61
// Used to build replies to incoming commands (eg, RMx and inbound 3270 data streams)
62
QByteArray reply;
63
64
/* Which screen size we're currently using */
65
bool
alternate_size;
66
67
/* Screen position according to incoming 3270 data stream */
68
int
primary_pos;
69
70
/* Dimensions of currently active screen */
71
int
screen_x;
72
int
screen_y;
73
int
screenSize;
74
75
bool
resetMDT;
76
bool
restoreKeyboard;
77
bool
alarm;
78
int
lastAID;
// Last AID encountered
79
80
bool
wsfProcessing;
81
int
wsfLen;
82
83
// True if the previous byte/byte sequence was a command; used for PT processing
84
bool
lastWasCmd;
85
86
// True if the last command was a WRITE type command
87
bool
lastwasWrite;
88
89
// True if the last Program Tab operation hit the end of the display
90
bool
lastPTwrapped;
91
92
void
setScreen(
bool
alternate =
false
);
93
94
void
placeChar();
95
void
placeChar(uchar c);
96
97
void
processWCC();
98
void
processOrders();
99
100
/* 3270 Command Codes */
101
void
processW();
102
void
processEW(
bool
alternate);
// Incorporates EWA
103
void
processRB();
104
void
processWSF();
105
void
processRM();
106
void
processRMA();
107
void
processEAU();
108
109
/* 3270 Orders */
110
void
processSF();
111
void
processSFE();
112
void
processSBA();
113
void
processSA();
114
void
processMF();
115
void
processIC();
116
void
processPT();
117
void
processRA();
118
void
processEUA();
119
void
processGE();
120
121
int
extractBufferAddress();
122
void
incPos();
123
124
void
WSFreset();
125
void
WSFreadPartition();
126
void
WSFoutbound3270DS();
127
128
void
replySummary();
129
void
addBytes(uchar *bytes,
int
len);
130
void
processAttributePairs(
int
mode);
131
};
132
133
#endif
// PROCESSDATASTREAM_H
DisplayScreen
Definition
DisplayScreen.h:30
ProcessDataStream
Definition
ProcessDataStream.h:27
ProcessDataStream::processStream
void processStream(QByteArray &b, bool tn3270e)
ProcessDataStream::processStream - Process an incoming 3270 Data Stream.
Definition
ProcessDataStream.cpp:60
Terminal
Definition
Terminal.h:27
src
ProcessDataStream.h
Generated by
1.9.8