Meta Types

The Meta data types are the heart of Argot. They define the structures used to define binary data.
meta.definition

A data type definition is defined as abstract. A definition is mapped to basic,sequence,map and abstract. This is not intended to be expanded by the user.

meta.definition: meta.abstract();

meta.definition#basic: meta.map( #meta.definition, #meta.basic );
meta.definition#sequence: meta.map( #meta.definition, #meta.sequence );
meta.definition#map: meta.map( #meta.definition, #meta.map );
meta.definition#abstract: meta.map( #meta.definition, #meta.abstract );

meta.sequence

A sequence is used to describe any structured sequence of elements. Each element in the sequence must be described by a type mapped to the meta.expression abstract data type. A maximum of 256 elements is allowed in a single sequence.

meta.sequence: 
   {
	meta.array(
	    @u8["size"],
	    @meta.expression["type"]
	)
   };

meta.reference

A meta.reference is used to describe references to other data types in sequences or other structures. The referenced type is specified. The name provides the ability to describe how the type will be used.

meta.reference: 
   {
	@u16["type"],
	@meta.name["name"]
   };

meta.encoding

A meta.encoding data type is used to specify a specific encoding to a set of data. Used by meta.name to describe Argot names as being defined by ASCII. Encoding is defined by a meta.name, allowing UTF8, ASCII, or other encoding to be specified.

meta.encoding: 
   {
	@meta.expression["data"],
	@meta.name["encoding"]
   };

meta.name

The name of a data type is an ASCII encoded string with a maximum length of 256bytes. Names in Argot are not case sensitive.

meta.name: 
   {
	meta.encoding(
	   meta.array(
		@u8["size"],
		@u8["data"]
	   ),
	   "ISO646-US"
	)
   };

meta.array

An array describes a repeating structure. The first expression must return an integer value that describes the number of elements in the array. The type expression is read for each element.

meta.array:
   {
	@meta.expression["size"],
	@meta.expression["type"]
   };

meta.basic

A basic type is used to define any atomic binary object. All integer types are defined using a basic type. The size flag describes the width in bits of the data type.

meta.basic: 
   {
	@u8["size"], 
	@u8["flags"]
   };

Flags is 8 bits of additional information about the atomic data. Currently only one bit is used to describe endiness of the data.


meta.expression
An expression is defined as being abstract. An expression can currently use the concrete types, reference, sequence or encoding. The user is able to define new concrete expressions.
meta.expression: meta.abstract();

meta.expression#reference: meta.map( #meta.expression, #meta.reference );
meta.expression#sequence: meta.map( #meta.expression, #meta.sequence );
meta.expression#encoding: meta.map( #meta.expression, #meta.encoding );


meta.abstract

The abstract data type contains no data. It is used to describe types as being abstract. An abstract data type is used in conjunction with the meta.map type to map concrete types to abstract types.

meta.abstract: 
   {
	@empty["abstract"]
   };

meta.map

A map type is used to connect an abstract data type with a concrete representation. This allows Argot data types to be expanded without modifying existing definitions.

meta.map: 
   {
	@u16["abstract"],
	@u16["concrete"]
   };				

Copyright 2004-2007 © Einet Pty Ltd
Legal Notice