PN532.Handler behaviour (PN532 v0.1.0) View Source

Link to this section Summary

Callbacks

Is called when connected to the card reader

Provides the ability to parse the card data and form a card

Provides a place to handle when an event happens, such as a card is detected

Is called when setting PN532 server

Link to this section Callbacks

Specs

connected(map()) :: :ok

Is called when connected to the card reader

Link to this callback

handle_detection(integer, list)

View Source

Specs

handle_detection(integer(), [binary()]) :: {:ok, [map()]} | {:error, term()}

Provides the ability to parse the card data and form a card

Link to this callback

handle_event(atom, list, module, map)

View Source

Specs

handle_event(atom(), [map()], module(), map()) :: {:noreply, map()}

Provides a place to handle when an event happens, such as a card is detected

Specs

setup(map()) :: :ok

Is called when setting PN532 server