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/2, 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
end_transaction/2
max_dispos/1Returns the strictest of a list of dispositions.
start_link/3
start_monitor/3
stop/1

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, apdu:disposition()} | {error, term()}

end_transaction/2

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

max_dispos/1

max_dispos(Rest::[apdu:disposition()]) -> apdu:disposition()

Returns the strictest of a list of dispositions.

start_link/3

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

start_monitor/3

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

stop/1

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


Generated by EDoc