📄 awtpcl.pas
字号:
{Status...}
aForceStatus : Bool; {Force status update}
aTimerPending : Bool; {True if waiting to start timer}
aInProgress : Cardinal; {Non-zero if protocol in progress}
aBlockErrors : Cardinal; {Number of tries for block}
aTotalErrors : Cardinal; {Number of total tries}
aActCPS : Cardinal; {Port or modem CPS}
aOverhead : Cardinal; {Overhead bytes per block}
aTurnDelay : Cardinal; {MSec turnaround delay}
aStatusInterval : Cardinal; {Ticks between status updates}
aSaveStatus : Cardinal; {Save status at various points}
aSaveError : Integer; {Save error at various points}
aBytesRemaining : LongInt; {Bytes not yet transferred}
aBytesTransferred : LongInt; {Bytes already transferred}
aElapsedTicks : LongInt; {Elapseds Ticks as of last block}
aStatusTimer : EventTimer; {How often to show status}
aTimer : EventTimer; {Used to time a transfer}
{File buffer managment...}
aEndPending : Bool; {True when end-of-file is in buffer}
aFileOpen : Bool; {True if file open in protocol}
aNoMoreData : Bool; {Flag for tracking end-of-file}
aLastBlock : Bool; {True at eof}
aBlkIndex : Cardinal; {Index into received chars in DataBlock}
aWriteFailOpt : Integer; {Rules for overwriting files}
aStartOfs : LongInt; {Holds starting offset of file}
aEndOfs : LongInt; {Holds ending offset of file}
aLastOfs : LongInt; {FileOfs of last Get/Put}
aFileOfs : LongInt; {Current file offset}
aEndOfDataOfs : LongInt; {Ofs of buffer of end-of-file}
aFileBuffer : PFileBuffer; {For reading/writing files}
aSaveMode : Cardinal; {For saving file mode}
{For getting the next file to transmit}
aUpcaseFileNames : Bool; {True to upcase file names}
aFindingFirst : Bool; {NextFileMask flag}
aFileListIndex : Cardinal; {NextFileList index}
aPathName : TPathCharArray; {Complete path name of current file}
aSearchMask : TPathCharArray; {NextFileMask search mask}
aFileList : PFileList; {NextFileList list pointer}
aCurRec : TSearchRec; {NextFileMask search record}
aFFOpen : Boolean; {True if FindFirst open}
aJunk : Byte; {Keep Cardinal aligned}
{Hooks that inform}
apShowStatus : ShowStatusProc; {Send message to status window}
apLogFile : LogFileProc; {Log transmitted/received file}
{Hooks that return something}
apNextFile : NextFileFunc; {Request next file to transmit}
apAcceptFile : AcceptFileFunc; {Accept this incoming file?}
{Hooks for read/write routines}
apPrepareReading : PrepFinishProc; {Prepare to read blocks}
apReadProtocolBlock : ReadProtProc; {Read block to transmit}
apFinishReading : PrepFinishProc; {Cleanup from reading blocks}
apPrepareWriting : PrepFinishProc; {Prepare to write blocks}
apWriteProtocolBlock : WriteProtProc; {Write received block}
apFinishWriting : PrepFinishProc; {Cleanup from writing blocks}
{Large structures}
aWorkFile : File; {Temp file for Get/PutProtocolBlock}
aDestDir : TDirCharArray; {Destination directory}
case Byte of
Xmodem : (
{General}
xCRCMode : Bool;
x1KMode : Bool; {True for XModem1K}
xGMode : Bool; {True for YmodemG}
xMaxBlockErrors : Cardinal; {Max number of allowed block errors}
xBlockWait : Cardinal; {Wait seconds between blocks}
xEotCheckCount : Cardinal; {Number of Eot retries required}
xStartChar : Char; {Block start character}
{Temp vars that state machine requires to be static}
xHandshake : Char; {Handshake character}
xNaksReceived : Cardinal; {Count naks received}
xEotCounter : Cardinal; {Counts received EOTs}
xCanCounter : Cardinal; {Counts received cCans}
xOverheadLen : Cardinal; {Number of overhead bytes per block}
{State information}
xXmodemState : TXmodemState; {Current state of Xmodem}
xJunk : Byte; {Keep Cardinal aligned}
{Unique Ymodem fields}
ySaveLen : LongInt; {Saved file length}
yNewDT : LongInt; {Date/time stamp}
ySaveName : TPathCharArray; {Saved file name}
yFileHeader : PDataBlock; {Needed for file name block}
y128BlockMode : Bool; {True to force 128 byte blocks}{!!.06}
yYmodemState : TYmodemState); {Current Ymodem state}
Zmodem : (
{General}
zLastFrame : Char; {Holds last frame type for status}
zTerminator : Char; {Current block type}
zHeaderType : Char; {Current header type}
zZmodemState : TZmodemState; {Current Zmodem state}
zHeaderState : THeaderState; {General header state}
zHexHdrState : HexHeaderStates; {Current hex header state}
zBinHdrState : BinaryHeaderStates; {Current binary header state}
zRcvBlockState : ReceiveBlockStates; {Current receive block state}
zFileMgmtOverride: Boolean; {True to override senders file mg opts}
zReceiverRecover : Boolean; {True to force file recovery}
zUseCrc32 : Boolean; {True when using 32bit CRCs}
zCanCrc32 : Boolean; {True when Crc32 capable}
zHexPending : Boolean; {True for next char in hex pair}
zEscapePending : Boolean; {True for next char in esc pair}
zEscapeAll : Boolean; {Escaping all ctl chars}
zControlCharSkip : Boolean; {True to skip all ctrl chars}
zWasHex : Boolean; {True if processing hex header}
zDiscardCnt : Cardinal; {Characters discarded so far}
zConvertOpts : Cardinal; {File conversion opts rqst by sender}
zFileMgmtOpts : Cardinal; {File mgmt opts rqst by sender}
zTransportOpts : Cardinal; {File transport opts rqst by sender}
zFinishRetry : Cardinal; {Times to resend ZFin}
zWorkSize : Cardinal; {Index into working buffer}
zCanCount : Cardinal; {Track contiguous <cancels>}
zHexChar : Cardinal; {Saved hex value}
zCrcCnt : Cardinal; {Number of CRC bytes rcv'd}
zOCnt : Cardinal; {Number of 'O's rcv'd}
zLastFileOfs : LongInt; {File position reported by remote}
zAttentionStr : array[1..MaxAttentionLen] of Byte; {Attn string value}
{For controlling autoadjustment of block size}
zUse8KBlocks : Boolean; {True when using 8K blocks}
zTookHit : Bool; {True if we got ZrPos packet}
zGoodAfterBad : Cardinal; {Holds count of good blocks}
{Working buffers}
zDataBlockLen : Cardinal; {Count of valid data in DataBlock}
zDataInTransit : LongInt; {Amount of unacked data in transit}
zWorkBlock : PWorkBlock; {Holds fully escaped data block}
{Receiving...}
zRcvFrame : Char; {Type of last received frame}
zRcvHeader : TPosFlags; {Received header}
{Transmitting...}
zRcvBuffLen : Cardinal; {Size of receiver's buffer}
zLastChar : Char; {Last character sent}
zTransHeader : TPosFlags; {Header to transmit}
zZRQINITValue : LongInt); {Optional ZRQINIT value}
Kermit : (
{General}
kPacketType : Char; {Type of last packet}
kKermitState : TKermitState; {Current state of machine}
kKermitHeaderState: TKermitHeaderState; {Current header state}
kKermitDataState : TKermitDataState; {Current data state}
kCheckKnown : Bool; {True if we've agreed on check type}
kLPInUse : Bool; {True if we're using long packets}
kUsingHibit : Bool; {True if prefixing hibit chars}
kUsingRepeat : Bool; {True if using repeat cnt feature}
kReceiveInProgress : Bool; {True if receiving a file}
kTransmitInProgress : Bool; {True if transmitting a file}
kDataLen : Cardinal; {Length of sent packet data field}
kRecDataLen : Cardinal; {Length of recd packet data field}
kActualDataLen : Cardinal; {Length decoded data bytes}
kMinRepeatCnt : Cardinal; {Min threshold to use repeat feature}
kRecBlockNum : Cardinal; {Blocknum of last received packet}
kExpectedAck : Cardinal; {Blocknum of next expected Ack}
kBlockCheck2 : Cardinal; {For holding Crc check value}
kSWCTurnDelay : Cardinal; {Turn delay to use for SWC mode}
kKermitOptions : TKermitOptions; {Options for this transfer}
kRmtKermitOptions: TKermitOptions; {Options remote says to use}
{Internal buffer management}
kInBuff : PInBuffer; {Internal 4K input buffer}
kInBuffHead : Cardinal; {Pointer to head of buffer}
kInBuffTail : Cardinal; {Pointer to tail of buffer}
{Transmitting...}
kWorkEndPending : Bool; {True if no more WorkBlocks}
kWorkLen : Cardinal; {Count of bytes in temp pool}
kLastWorkIndex : Cardinal; {For managing data pool}
kWorkBlock : PDataBlock; {Holds quoted data block}
{Table management}
kTableSize : Cardinal; {Size of window table, 1-31}
kTableHead : Cardinal; {Newest used slot}
kTableTail : Cardinal; {Oldest used slot, rcv only}
kBlockIndex : Cardinal; {Collects data field}
kNext2Send : Integer; {Slot in table to send}
kDataTable : PDataTable; {Window table data}
kInfoTable : TInfoTable; {Window table info}
{Temp variables used in state machine}
kTempCheck : Char; {Used for collecting check chars}
kC1 : Char; {Used for collecting check chars}
kC2 : Char; {Used for collecting check chars}
kC3 : Char; {Used for collecting check chars}
kSkipped : Bool; {True if file was not accepted}
kGetLong : Bool; {True for long header}
kLongCheck : Integer; {Long header checksum}
kSaveCheck2 : Cardinal; {Save incoming check between states}
kSaveCheck : LongInt); {Save incoming check between states}
BPlus : (
bSaveC : Char; {Save last char between states}
bLastType : Char; {Last received packet type}
bQSP : Bool; {True for quoting}
bQuoted : Bool; {True if last ch recd was quoted}
bResumeFlag : Bool; {True if resuming an aborted dl}
bAborting : Bool; {True if processing abort}
bBPlusMode : Bool; {True if in full B+ mode}
bQuotePending : Bool; {True if 2nd quote char pending}
bSentENQ : Bool; {True if sent ENQ in CollectAck}
bNAKSent : Bool; {True if NAK just sent}
bFailed : Bool; {True if write failed}
bChecksum : Cardinal; {Checksum or CRC}
bTimerIndex : Cardinal; {Index for DLE timer}
bNewChk : Cardinal; {Calculated block check}
bCurTimer : Cardinal; {Current timer index}
bAbortCount : Integer; {# of abort requests so far}
bNextSeq : Integer; {Next sequence number}
bPacketNum : Integer; {Current packet num}
bIdx : Integer; {Index for collecting data blocks}
bRSize : Integer; {Size of last recd buffer}
bSeqNum : Integer; {Current sequence number}
bNext2ACK : Integer; {Packet pending ACK}
bNext2Fill : Integer; {Packet to load for send}
bSAMax : Integer; {Highest current sendahead cnt}
bSAWaiting : Integer; {# of packets outstanding ACKs}
bSAErrors : Integer; {Keep track of SendAhead errors}
bRPackets : LongInt; {Packets received}
bRBuffer : PBPDataBlock; {Receive buffer}
bSBuffer : TSPackets; {Send buffers}
bQuoteTable : TQuoteTable; {Active quoting table}
bHostParams : ParamsRecord; {Host's parameters}
bOurParams : ParamsRecord; {Our parameters}
bDirection : TDirection; {Upload or download}
bBPlusState : TBPlusState; {Main state}
bTermState : TTermPacketState;{State of terminal during DLE}
bPacketState : TPacketState; {Packet collection state}
bAckState : TAckCollectionState); {Ack collection state}
Ascii : (
sCtrlZEncountered: Bool; {Found EOF character}
sInterCharDelay : Cardinal; {Delay after each character}
sInterLineDelay : Cardinal; {Delay after EOLChar}
sInterCharTicks : Cardinal; {InterChar delay in ticks}
sInterLineTicks : Cardinal; {InterLine delay in ticks}
sMaxAccumDelay : Cardinal; {Max Ticks before yielding}
sSendIndex : Cardinal; {Index into transmitted data}
sCRTransMode : Cardinal; {CR translation opts}
sLFTransMode : Cardinal; {LF translation opts}
sEOLChar : Char; {End-of-line char}
sAsciiState : TAsciiState); {Current state}
end;
implementation
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -