LAR Library
1.14
|
format.h File Reference
Buffer formatting. More...
#include <larlib/base.h>
Go to the source code of this file.
Data Structures | |
struct | format_t |
Overall parameters of a format session. More... | |
struct | formatField_t |
Information about each field to be read or written. More... | |
Enumerations | |
enum | formatDirection_t { FORMAT_PACK, FORMAT_UNPACK } |
Used as parameter to the formatting functions to inform if they should handle packing or unpacking. More... | |
Functions | |
int | formatPack (format_t *fmt, uint8_t *output, int maxOutput) |
Write to output the packed values as described in fmt . More... | |
int | formatUnpack (format_t *fmt, uint8_t *input, int inputSize) |
Read from input and unpack the fields to fmt . More... | |
int | formatFilterISO8583 (const format_t *fmt, const formatField_t *field) |
Use this function as the filter function for a ISO8583 buffer. More... | |
int | formatBodyISO8583 (uint8_t *buffer, int limit, formatDirection_t direction, format_t *fmt, formatField_t *field) |
Read/write the bitmap of a ISO8583 message. More... | |
int | formatBodyPacked (uint8_t *buffer, int limit, formatDirection_t direction, format_t *fmt, formatField_t *field) |
Format a field as a recursive call to formatPack() and formatUnpack(). More... | |
int | formatBodySkip (uint8_t *buffer, int limit, formatDirection_t direction, format_t *fmt, formatField_t *field) |
Skip field->size bytes from message. More... | |
int | formatBodyMemcpy (uint8_t *buffer, int limit, formatDirection_t direction, format_t *fmt, formatField_t *field) |
Copy field->size bytes of field->data to/from buffer . More... | |
int | formatBodyStrcpy (uint8_t *buffer, int limit, formatDirection_t direction, format_t *fmt, formatField_t *field) |
Formatting for variable-sized zero-terminated strings. More... | |
int | formatBodyUint64Dec (uint8_t *buffer, int limit, formatDirection_t direction, format_t *fmt, formatField_t *field) |
Format an uint64_t field as a decimal string. More... | |
int | formatBodyUint32Dec (uint8_t *buffer, int limit, formatDirection_t direction, format_t *fmt, formatField_t *field) |
Format an uint32_t field as a decimal string. More... | |
int | formatBodyUint16Dec (uint8_t *buffer, int limit, formatDirection_t direction, format_t *fmt, formatField_t *field) |
Format an uint16_t field as a decimal string. More... | |
int | formatBodyUint8Dec (uint8_t *buffer, int limit, formatDirection_t direction, format_t *fmt, formatField_t *field) |
Format an uint8_t field as a decimal string. More... | |
int | formatBodyUint64Buf (uint8_t *buffer, int limit, formatDirection_t direction, format_t *fmt, formatField_t *field) |
Format an uint64_t field as a sequence of bytes. More... | |
int | formatBodyBufHex (uint8_t *buffer, int limit, formatDirection_t direction, format_t *fmt, formatField_t *field) |
Format an buffer field as a hexadecimal string. More... | |
int | formatSizeAsc2 (uint8_t *buffer, int limit, formatDirection_t direction, format_t *fmt, formatField_t *field) |
Read or write the value of bodySize as a 2-digit base-10 string. More... | |
int | formatSizeAsc3 (uint8_t *buffer, int limit, formatDirection_t direction, format_t *fmt, formatField_t *field) |
Read or write the value of bodySize as a 3-digit base-10 string. More... | |
int | formatSizeBcd2 (uint8_t *buffer, int limit, formatDirection_t direction, format_t *fmt, formatField_t *field) |
Read of write the value of bodySize as a 2-digit BCD number (1 byte). More... | |
int | formatSizeBcd3 (uint8_t *buffer, int limit, formatDirection_t direction, format_t *fmt, formatField_t *field) |
Read of write the value of bodySize as a 3-digit BCD number (2 bytes). More... | |
int | formatPadSpaces (uint8_t *buffer, int limit, formatDirection_t direction, format_t *fmt, formatField_t *field) |
Write or skip field->size - field->bodySize spaces. More... | |
int | formatPadZeroes (uint8_t *buffer, int limit, formatDirection_t direction, format_t *fmt, formatField_t *field) |
Write or skip field->size - field->bodySize ASCII '0' chars. More... | |
int | formatPadZeroBytes (uint8_t *buffer, int limit, formatDirection_t direction, format_t *fmt, formatField_t *field) |
Write or skip field->size - field->bodySize 0x00 bytes. More... | |
int | formatPadSkip (uint8_t *buffer, int limit, formatDirection_t direction, format_t *fmt, formatField_t *field) |
Skip exactly field->size - field->bodySize bytes. More... | |
Detailed Description
Buffer formatting.
Generated on Mon Mar 27 2017 15:42:52 for LAR Library by
