Module apdu_transform

Behaviour for APDU transforms.

This module defines the apdu_transform behaviour.
Required callback functions: formats/0, init/2, begin_transaction/1, command/2, reply/2, end_transaction/1, terminate/1.

Description

Behaviour for APDU transforms.

Data Types

cmd_cooked()

cmd_cooked() = term()

The type of an outgoing command received by this transform module.

format()

format() = atom()

A name for a "format": a type of data processed by an APDU transform.

mod()

mod() = module()

The name of a module which implements this behaviour.

reply_cooked()

reply_cooked() = term()

The type of an incoming command after this transform module has been applied.

Function Index

begin_transaction/1
command/2
connect/2
end_transaction/1
start_link/3

Function Details

begin_transaction/1

begin_transaction(Pid::pid()) -> ok | {error, term()}

command/2

command(Pid::pid(), Cmd0::cmd_cooked()) -> {ok, [reply_cooked()]} | {error, term()}

connect/2

connect(Pid::pid(), NextPid::pid()) -> ok | {error, term()}

end_transaction/1

end_transaction(Pid::pid()) -> ok | {ok, apdu:disposition()} | {error, term()}

start_link/3

start_link(Mod::mod(), Proto::apdu:protocol(), Args::[term()]) -> {ok, pid()} | {error, term()}


Generated by EDoc