Encode Decode HDLCFrame
Encode Decode HDLCFrame
ushort clntID,
ushort serverID,
ushort devAddr,
byte windowRx,
byte windowTx,
ushort infoFieldLenRx,
ushort infoFieldLenTx,
byte serviceClass,
ushort linkBufSz,
ENCODED_AXDR apduData,
byte frameType,
byte[] rrr,
byte[] sss)
Return Type
IntPtr : IntPtr.zero or valid pointer. If valid pointer, it can be converted to
ENCODED_PRIMARY_APDU structure. The structure includes the number of blocks available in the
structure. Only I-frame type expects more than 1 block. The structure also include individual blocks
data with length field. If the “application layer packet size” + “LLC header” length is more than the
HDLC information size sent, the function shall encode the information in multiple blocks.
Arguments
Call Sequence
1. EncodeHDLCrequest() to generate SNRM
2. DecodeHDLCrequest() to decode UA frame. Return NULL for DM frame.
3. EncodeHDLCrequest() to encode AARQ request.
4. DecodeHDLCrequest() to decode AARE response and extract application layer frame + LLC
Header. Remove 1st 4 byte and decode application layer frame. This step may repeat if the
packet received with segmentation
5. EncodeHDLCrequest() to encode Get request.
6. DecodeHDLCrequest() to decode Get response and extract application layer frame + LLC
Header. Remove 1st 4 byte and decode application layer frame. This step may repeat if the
packet received with segmentation.
7. EncodeHDLCrequest() to sent DISC frame.
8. DecodeHDLCrequest() to decode UA response. Return NULL for DM frame.