<- Architecture     Go to ToC       API ->

 

Metadata specifies static properties pertaining to the interaction between:

  1. A Controller and its hosting hardware.
  2. An AIW and the Controller hosting it.
  3. An AIW and its composing AIMs.

Metadata specified in the following Sections is represented in JSON Schema.

1       Communication channels and their data types 2       AIF Metadata
1.1       Type system 3       AIW/AIM Metadata
1.2       Mapping the type to buffer contents

1       Communication channels and their data types

This Section specifies how Metadata pertaining to a communication Channel is defined.

1.1      Type system

The data interchange happening through buffers involves the exchange of structured data.

Message data types exchanged through Ports and communication Channels are defined by the following Backus–Naur Form (BNF) specification [10]. Words in bold typeface are keywords; capitalised words such as NAME are tokens.

fifo_type :=
| /* The empty type */
| base_type NAME
recursive_type :=
| recursive_base_type NAME
base_type :=| toplevel_base_type| recursive_base_type| ( base_type )toplevel_base_type :=
| array_type| toplevel_struct_type| toplevel_variant_typearray_type :=| recursive_base_type []
toplevel_struct_type :=
{ one_or_more_fifo_types_struct }

one_or_more_fifo_types_struct :=
| fifo_type
| fifo_type ; one_or_more_fifo_types_struct

toplevel_variant_type :=
{ one_or_more_fifo_types_variant }

one_or_more_fifo_types_variant :=
| fifo_type | fifo_type
| fifo_type | one_or_more_fifo_types_variant
recursive_base_type :=

| signed_type

| unsigned_type

| float_type

| struct_type

| variant_type

signed_type :=

int8
int16
int32
int64
unsigned_type :=

uint8 | byte
uint16
uint32
uint64

float_type :=
float32
float64
struct_type :=
{ one_or_more_recursive_types_struct }

one_or_more_recursive_types_struct :=
| recursive_type
| recursive_type ; one_or_more_recursive_types_struct

variant_type :=
{ one_or_more_recursive_types_variant }

one_or_more_recursive_types_variant :=
| recursive_type | recursive_type
| recursive_type | one_or_more_recursive_types_variant

Valid types for FIFOs are those defined by the production fifo_type.

Although this syntax allows to specify types having a fixed length, the general record type written to, or read from, the Port will not have a fixed length. If an AIM implemented in hardware receives data from an AIM implemented in software the data format should be harmonised with the limitations of the hardware AIM.

1.2      Mapping the type to buffer contents

The Type definition allows to derive an automated way of filling and transmitting buffers both for hardware and software implementations. Data structures are turned into low-level memory buffers, filled out by recursively traversing the definition (breadth-first). Sub-fields are laid down according to their type, in little-endian order.

For instance, a definition for transmitting a video frame through a FIFO might be:

{int32 frameNumber; int16 x; int16 y; byte[] frame} frame_t

and the corresponding memory layout would be:

[32 bits: frameNumber | 16 bits: x | 16 bits: y | 32 bits: size(frame) | 8*size(frame) bits: frame].

API functions are provided to parse the content of raw memory buffers in a platform- and implementation-independent fashion (see Subsection 8.3.7).

2       AIF Metadata

AIF Metadata is specified in terms of JSON Schema [9] definition at http://schemas.mpai.community/AIF/V2.0/AIF-metadata.schema.json

3      AIW/AIM Metadata

AIM Metadata specifies static, abstract properties pertaining to one or more AIM implementations, and how the AIM will interact with the Controller.

AIW/AIM Metadata is specified in terms of JSON Schema [9] definition at http://schemas.mpai.community/AIF/V2.0/AIW-AIM-metadata.schema.json

 

 <- Architecture     Go to ToC       API ->