Use ebin/decode_micexff script
decode_one_message() ->
% create context. Assume FAST templates are saved into templates.xml file {ok, Context} = erlang_fast:create_context({file, "templates.xml"}, [use_id], fun logger/2),
% read FAST encoded data from data.fast {ok, Data} = file:read_file("data.fast"),
% Context1 and Data1 shall be used for decoding next messages, if needed {Msg, Data1, Context1} = erlang_fast:decode(Data, Context), io:format("Decoded message is ~p~n", [Msg]).
encode_one_message() ->
% create context. Assume FAST templates are saved into templates.xml file {ok, Context} = erlang_fast:create_context({file, "templates.xml"}, [use_id], fun logger/2),
% Msg is in format of previously decoded message {Data, Context1} = erlang_fast:encode(Msg, Context),
io:format("Encoded data: ~p", [Data]).
logger([], _) ->
ok;
logger(Err, Val) ->
io:format("~p: ~p~n", [Err, Val]).