TApxProtocol.AsciiCRTranslation

TApxProtocol

property AsciiCRTranslation : TApxAsciiEOLTranslation
TApxAsciiEOLTranslation = (
aetNone, aetStrip, aetAddCRBefore, aetAddLFAfter);

Default: aetNone

Determines the end-of-line translation mode for carriage returns.

Acceptable values to assign to this property are as follows:

Value
Description
aetNone
The default, do not modify the character
aetStrip
Strip the character from the data stream
aetAddLFAfter
Add an <LF> after each <CR>

aetAddCRBefore does not apply to AsciiCRTranslation, so it is treated as aetNone.

The following example causes all <LF> characters to be stripped while <CR> characters are transmitted:

ApxProtocol1.ProtocolType := ptAscii;
ApxProtocol1.AsciiCRTranslation := aetNone;
ApxProtocol1.AsciiLFTranslation := aetStrip;
ApxProtocol1.StartTransmit;

See also: AsciiEOLChar, AsciiLFTranslation