View Source iso8583_process (iso8583_erl v0.4.1)
Summary
Functions
for adding fields which are supposed to be echoed
for checking mandatory fields
this converts data between bases and also pads the data for our purposes
for creating the final bitmap this bitmap is an 8/16 byte binary with each byte being represented by an integer. integer converted to a 2 bit binary represents presence or absence of those fields
for getting the bitmap,mti,Data fields
gets the bitmap type
this is for getting a particular field or mti or bitmap in an iso message back
gets the specification for a particular field
for getting various specification types
creats a new map specification which contains the various data elements and a bitmap from a specification file can throw an error if there are bugs in the specification
this is for loading field information for mtis
marshalls a message to be sent. pack all the different elements in a message into an iolist
for processing the message given the bitmap and the binary containing the data elements
this is for setting a particular field in the message or an mti field will have to be validated and then after field is validated an entry is created as a map for it padding may be added to the field depending on the type of field as well as if its fixed or vlength
this part accepts a list iso message with the header removed and extracts the mti,bitmap,data elements into a map object it also accepts a specification which will be used for getting the specifications for the message exceptions can be thrown here if the string for the message hasnt been formatted well but they should be caught in whichever code is calling the system the data is first converted into a binary before the processing is done . much faster and uses less memory than using lists
this is for validating a specification
Functions
Link to this function
add_echo_fields(Map_transaction, Map_recipient, Specification_mti)
View Source-spec add_echo_fields(map(), map(), map()) -> map().
-spec check_mandatory_fields(list(), map()) -> true | false.
-spec convert_base_pad(integer(), integer(), binary()) -> binary().
-spec create_bitmap(binary | hex, binary()) -> binary() | list().
-spec get_bitmap_subs(atom(), binary(), map()) -> tuple().
-spec get_bitmap_type(map()) -> atom().
-spec get_field(Fld_num :: pos_integer() | mti | bit, Iso_Map :: map()) -> {ok, term()} | error.
-spec get_size_send(iolist(), non_neg_integer()) -> list().
-spec get_spec_field(non_neg_integer() | mti, map()) -> tuple().
-spec get_spec_mti(atom(), map(), map()) -> list() | error.
-spec load_specification(string() | binary()) -> map().
-spec load_specification_mti(string() | binary()) -> map().
-spec pack(Message_Map :: map(), map()) -> iolist().
Link to this function
process_data_element(Bitmap, Index_start, Data_binary, Specification)
View Source-spec process_data_element(binary(), integer(), binary(), map()) -> map().
-spec set_field(Iso_Map :: map(), Fld_num :: pos_integer() | mti, Fld_val :: binary()) -> {ok, map()}.
-spec set_field_list(List :: list()) -> map().
-spec set_mti(Iso_Map :: map(), Fld_val :: binary()) -> {ok, map()}.
-spec unpack(list(), map()) -> map().
-spec validate_specification(map()) -> boolean().