Platform and Report Handlers

Platform Handler Definitions

READER_CONTEXT

typedef void * IPJ_READER_CONTEXT

IPJ_READER_CONTEXT is a HANDLE to the serial port.

READER_IDENTIFIER

typedef void * IPJ_READER_IDENTIFIER

IPJ_READER_IDENTIFIER is a reference used by the platform to open serial port IPJ_READER_IDENTIFIER is also used by report handler to allow the application to associate reports with a given reader in systems with multiple readers.

Platform Handler Interface

PLATFORM_OPEN_PORT_HANDLER

typedef uint32_t (* PLATFORM_OPEN_PORT_HANDLER)(IPJ_READER_CONTEXT *reader_context, IPJ_READER_IDENTIFIER reader_identifier, ipj_connection_type connection_type, ipj_connection_params *params)

PLATFORM_CLOSE_PORT_HANDLER

typedef uint32_t (* PLATFORM_CLOSE_PORT_HANDLER)(IPJ_READER_CONTEXT reader_context)

PLATFORM_TRANSMIT_HANDLER

typedef uint32_t (* PLATFORM_TRANSMIT_HANDLER)(IPJ_READER_CONTEXT reader_context, uint8_t *message_buffer, uint16_t buffer_size, uint16_t *number_bytes_written)

PLATFORM_RECEIVE_HANDLER

typedef uint32_t (* PLATFORM_RECEIVE_HANDLER)(IPJ_READER_CONTEXT reader_context, uint8_t *message_buffer, uint16_t buffer_size, uint16_t *number_bytes_received, uint16_t timeout_ms)

PLATFORM_TIMESTAMP_MS_HANDLER

typedef uint32_t (* PLATFORM_TIMESTAMP_MS_HANDLER)()

PLATFORM_SLEEP_MS_HANDLER

typedef void(* PLATFORM_SLEEP_MS_HANDLER)(uint32_t milliseconds)

Report Handler Interface

REPORT_HANDLER

typedef ipj_error (* REPORT_HANDLER)(struct ipj_iri_device *iri_device, ipj_report_id report_id, void *report)

DIAGNOSTIC_HANDLER

typedef void(* DIAGNOSTIC_HANDLER)(struct ipj_iri_device *iri_device, ipj_error error)