Chameleon-Mini
Public Attributes | List of all members
ConfigurationType Struct Reference

#include <Configuration.h>

Public Attributes

uint16_t MemorySize
 
uint8_t UidSize
 
bool ReadOnly
 
Codec

Codec related methods.

void(* CodecInitFunc )(void)
 
void(* CodecDeInitFunc )(void)
 
void(* CodecTaskFunc )(void)
 
Application

Application related functions.

void(* ApplicationInitFunc )(void)
 
void(* ApplicationResetFunc )(void)
 
void(* ApplicationTaskFunc )(void)
 
void(* ApplicationTickFunc )(void)
 
uint16_t(* ApplicationProcessFunc )(uint8_t *ByteBuffer, uint16_t BitCount)
 
void(* ApplicationGetUidFunc )(ConfigurationUidType Uid)
 
void(* ApplicationSetUidFunc )(ConfigurationUidType Uid)
 

Detailed Description

With this struct the behavior of a configuration is defined.

Member Data Documentation

void(* ConfigurationType::CodecInitFunc) (void)

Function that initializes the codec.

void(* ConfigurationType::CodecDeInitFunc) (void)

Function that deinitializes the codec.

void(* ConfigurationType::CodecTaskFunc) (void)

Function that is called on every iteration of the main loop. Within this function the essential codec work is done.

void(* ConfigurationType::ApplicationInitFunc) (void)

Function that initializes the application.

void(* ConfigurationType::ApplicationResetFunc) (void)

Function that resets the application.

void(* ConfigurationType::ApplicationTaskFunc) (void)

Function that is called on every iteration of the main loop. Application work that is independent from the codec layer can be done here.

void(* ConfigurationType::ApplicationTickFunc) (void)

Function that is called roughly every 100ms. This can be used for parallel tasks of the application, that is independent of the codec module.

uint16_t(* ConfigurationType::ApplicationProcessFunc) (uint8_t *ByteBuffer, uint16_t BitCount)

This function does two important things. It gets called by the codec. The first task is to deliver data that have been received by the codec module to the application module. The application then can decide how to answer to these data and return the response to the codec module, which will process it according to the configured codec.

Parameters
ByteBufferPointer to the start of the buffer, where the received data are and where the application can put the response data.
BitCountNumber of bits that have been received.
Returns
Number of bits of the response.
void(* ConfigurationType::ApplicationGetUidFunc) (ConfigurationUidType Uid)

Writes the UID for the current configuration to the given buffer.

Parameters
UidThe target buffer.
void(* ConfigurationType::ApplicationSetUidFunc) (ConfigurationUidType Uid)

Writes a given UID to the current configuration.

Parameters
UidThe source buffer.
uint16_t ConfigurationType::MemorySize

Defines how many space the configuration needs. For emulating configurations this is the memory space of the emulated card.

Note
For reader or sniff configurations this is set to zero.
uint8_t ConfigurationType::UidSize

Defines the size of the UID for emulating configurations.

Note
For reader or sniff configurations this is set to zero.
bool ConfigurationType::ReadOnly

Implies whether the Memory can be changed.