Function parse

  • Parse an ISO message according to the definition.

    Returns

    a message with all the field parsed

    Throws

    if the iso definition does not allow for the complete parsing of the ISO message

    Example

    const buffer = Buffer.from("0100ca......", "hex");
    const message = parse(isoDefinition, buffer);

    // All the fields are parsed here
    console.log(message.content)

    Type Parameters

    Parameters

    • definition: MessageDefinition<FD>

      an object that will constrain the type of the fields that can be used. It will be used while parsing the buffer

    • iso: Buffer

      a buffer to the raw ISO message

    Returns Message<FD>

Generated using TypeDoc