Coder Social home page Coder Social logo

iso8583's Introduction

luaiso8583

This is a small lua module. Can unpack and package iso8583 messages.

Table of Contents

Install

$ git clone [email protected]:yaolaiyaoqu/iso8583.git
$ cd iso8583
$ make

Back to TOC

API

local iso8583 = require('iso8583');

Back to TOC

Constant

There are following constant in the module:

  • iso8583.FIX
  • iso8583.LLVAR
  • iso8583.LLLVAR
  • iso8583.RIGHT
  • iso8583.R
  • iso8583.LEFT
  • iso8583.L
  • iso8583.U
  • iso8583.UNZIP
  • iso8583.Z
  • iso8583.ZIP
  • iso8583.LLVAR_U
  • iso8583.LLLVAR_U

Back to TOC

new

syntax: obj, err = iso8583.new(fields)

Creates an iso8583 object. In case of failures, returns nil and a string describing the error.

The fields is an array of lua tables holding the following keys:

  • size

    The size of the field.

  • type

    The type of the field, it must be FIX, LLVAR, LLLVAR, LLVAR_U, LLLVAR_U. U means ASCII prefix.

  • align

    Align of the field, it must be R, L.

  • pad

    Pad character of the field.

  • compress

    U or Z, Z means BCD data, U means BIN data.

Back to TOC

Pack

syntax: message, err = obj:Pack(data)

Pack iso8583 data to message. In case of failures, returns nil and a string describing the error.

Back to TOC

Unpack

syntax: data, err = obj:Unpack(message)

Unpack message to iso8583 data. In case of failures, returns nil and a string describing the error.

Back to TOC

License

iso8583's People

Contributors

yaolaiyaoqu avatar weida avatar zmonteiro avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.