### Navigation

- next
- previous |
- Indy ITK 1.8.0 documentation »

# Structures

This section describes the structures that are included as part of the IRI host libraries. These structures are used for interacting with the modules via IRI in both directions, and for configuring the host libraries themselves.

The structures can be used to communicate configuration data to modules, for example by sending a list of key codes and values. The structures can be used to receive data from the modules, for example by storing tag operation report data. The structures can also be used to configure the way the host library communicates with modules, for example configuring the serial connection that enables IRI communication with the module.

## Key Code Related Structures

The following structures all relate to interacting with modules via the key codes.

For more details on the key codes used to interact with the modules, see the Key Codes section of the ITK-C documentation.

### `ipj_key_info`

struct ipj_key_info
#include <iri.h>

> Public Members

> > bool has_key_type

> > ipj_key_type key_type

> > bool has_count

> > uint32_t count

> > bool has_length

> > uint32_t length

> > bool has_key_permissions

> > ipj_key_permissions key_permissions

### `ipj_key_list`

struct ipj_key_list
#include <iri.h>

> Public Members

> > bool has_key

> > ipj_key key

> > size_t list_count

> > uint32_t list[32]

> > bool has_bank_index

> > uint32_t bank_index

> > bool has_value_index

> > uint32_t value_index

> > bool has_length

> > uint32_t length

### `ipj_key_value`

struct ipj_key_value
#include <iri.h>

> Public Members

> > bool has_key

> > ipj_key key

> > bool has_value

> > uint32_t value

> > bool has_bank_index

> > uint32_t bank_index

> > bool has_value_index

> > uint32_t value_index

## Report Related Structures

The following structures all relate to receiving information from modules via reports, which are generated when events occur on the module.

For more details on the report handler functions, see the Report Handler Interface section of the Platform Interface documentation.

### `ipj_error_report`

For more details on error codes, see the Error Code listing section of the documentation.

struct ipj_error_report
#include <iri.h>

> Public Members

> > bool has_error

> > ipj_error error

> > bool has_param1

> > uint32_t param1

> > bool has_param2

> > uint32_t param2

> > bool has_param3

> > uint32_t param3

> > bool has_param4

> > uint32_t param4

> > bool has_timestamp

> > uint64_t timestamp

> > size_t lt_buffer_count

> > uint32_t lt_buffer[5]

Note

timestamp units = milliseconds

### `ipj_tag_operation_report`

For more details on how to read data out of the Tag Operation Reports, see the Reading Data From Reports configuration example.

For more details on how to configure the fields that will be present in the Tag Operation Reports, see the Report Field Configuration configuration example.

struct ipj_tag_operation_report
#include <iri.h>

> Public Members

> > bool has_error

> > ipj_error error

> > bool has_tag

> > ipj_tag tag

> > bool has_tag_operation_type

> > ipj_tag_operation_type tag_operation_type

> > bool has_tag_operation_data

> > ipj_tag_operation_data_t tag_operation_data

> > bool has_retries

> > uint32_t retries

> > bool has_diagnostic

> > uint32_t diagnostic

> > bool has_timestamp

> > uint64_t timestamp

> > size_t lt_buffer_count

> > uint32_t lt_buffer[30]

### `ipj_tag`

struct ipj_tag
#include <iri.h>

> Public Members

> > bool has_epc

> > ipj_epc_t epc

> > bool has_tid

> > ipj_tid_t tid

> > bool has_pc

> > uint32_t pc

> > bool has_xpc

> > uint32_t xpc

> > bool has_crc

> > uint32_t crc

> > bool has_timestamp

> > uint64_t timestamp

> > bool has_rssi

> > int32_t rssi

> > bool has_phase

> > int32_t phase

> > bool has_channel

> > uint32_t channel

> > bool has_antenna

> > uint32_t antenna

### `ipj_epc_t`

struct ipj_epc_t
#include <iri.h>

> Public Members

> > size_t size

> > uint8_t bytes[64]

### `ipj_tid_t`

struct ipj_tid_t
#include <iri.h>

> Public Members

> > size_t size

> > uint8_t bytes[48]

### `ipj_tag_operation_data_t`

struct ipj_tag_operation_data_t
#include <iri.h>

> Public Members

> > size_t size

> > uint8_t bytes[64]

#### Tag Operation Data Content Details

This section describes the contents of the tag operation data structure in various reader configurations. The contents of the tag operation data contents will vary depending on the value of the TAG_OPERATION key. Contents are listed below for the possible options.

- READ - Read operation
  - The tag operation data will contain the result of the read operation, up to a maximum of 32 words.
- WRITE - Write operation
  - The tag operation data will contain 2 bytes representing the number of words written.
- WRITE_EPC - Write EPC operation
  - The tag operation data will contain 2 bytes representing the number of words written.
- LOCK - Lock operation
  - No tag operation data.
- KILL - Kill operation
  - No tag operation data.
- BLOCKPERMALOCK - BlockPermalock operation
  - If the BLOCKPERMALOCK_ACTION key is set to `0` (read), then the tag operation data will contain the status of the requested BlockPermalock bits.
  - If the BLOCKPERMALOCK_ACTION key is set to `1` (lock), then the tag operation data will contain the 2 bytes representing the block range that was locked.
- QT - QT operation
  - If the QT_ACTION key is set to `0` (read), then the tag operation data will consist of 2 bytes containing the status of the QT control bits.
  - If the QT_ACTION is set to `1` (write), then the tag operation data will contain 2 bytes representing the number of words written. Since there are only 16 QT command status bits, this value should always be `1`.

### `ipj_stop_report`

struct ipj_stop_report
#include <iri.h>

> Public Members

> > bool has_error

> > ipj_error error

> > bool has_action

> > ipj_action action

> > bool has_timestamp

> > uint64_t timestamp

> > size_t lt_buffer_count

> > uint32_t lt_buffer[2]

### `ipj_status_report`

struct ipj_status_report
#include <iri.h>

> Public Members

> > bool has_status_flag

> > ipj_status_flag status_flag

> > bool has_timestamp

> > uint64_t timestamp

> > bool has_status_1

> > uint32_t status_1

> > bool has_status_2

> > uint32_t status_2

> > bool has_status_3

> > uint32_t status_3

> > size_t data_count

> > uint32_t data[16]

> > size_t lt_buffer_count

> > uint32_t lt_buffer[20]

## IRI Connection Structures

The following structures all relate to configuring the IRI connection with the module.

### `ipj_serial_connection`

struct ipj_serial_connection
#include <iri.h>

> Public Members

> > ipj_baud_rate baudrate

> > ipj_parity parity

### `ipj_connection_params`

Note

This union holds one of each type of connection parameter struct. In the future this will allow connection parameters for a variety of connection mediums to be set

## IRI Device Structure

The `ipj_iri_device` structure is used to define a particular module that is connected to the IRI host. This structure is used as an argument in a number of the IRI host library API functions to specify which module the API is meant to interact with or configure.

### `ipj_iri_device`

struct ipj_iri_device
#include <iri.h>

> User application allocates or declares structure before connecting or communicating with the IRI device.

> Public Members

> > IPJ_READER_CONTEXT reader_context

> > PLATFORM_OPEN_PORT_HANDLER_EXT platform_open_port_handler

> > void * platform_open_port_args

> > PLATFORM_CLOSE_PORT_HANDLER_EXT platform_close_port_handler

> > void * platform_close_port_args

> > PLATFORM_TRANSMIT_HANDLER_EXT platform_transmit_handler

> > void * platform_transmit_args

> > PLATFORM_RECEIVE_HANDLER_EXT platform_receive_handler

> > void * platform_receive_args

> > PLATFORM_TIMESTAMP_MS_HANDLER_EXT platform_timestamp_ms_handler

> > void * platform_timestamp_ms_args

> > PLATFORM_SLEEP_MS_HANDLER_EXT platform_sleep_ms_handler

> > void * platform_sleep_ms_args

> > PLATFORM_FLUSH_PORT_HANDLER_EXT platform_flush_port_handler

> > void * platform_flush_port_args

> > PLATFORM_MODIFY_CONNECTION_HANDLER_EXT platform_modify_connection_handler

> > void * platform_modify_connection_args

> > IPJ_READER_IDENTIFIER reader_identifier

> > IPJ_READER_USER_IDENTIFIER reader_user_identifier

> > REPORT_HANDLER_EXT report_handler

> > void * report_args

> > DIAGNOSTIC_HANDLER_EXT diagnostic_handler

> > void * diagnostic_args

> > uint32_t transmit_timeout_ms

> > uint32_t receive_timeout_ms

> > bool initialized

> > uint8_t protocol_flags

> > uint8_t rx_frame_sync_count

> > uint8_t tx_frame_sync_count

> > uint8_t sync_state

> > uint32_t frame_length

> > uint8_t transmit_buffer[IPJ_TRANSMIT_BUFFER_SIZE]

> > uint32_t receive_index

> > uint8_t receive_buffer[IPJ_RECEIVE_BUFFER_SIZE]

### Navigation

- next
- previous |
- Indy ITK 1.8.0 documentation »