Source

LIME / doc / Ports

Activation rule:

optional == rate can be zero, then p==NULL

static == rate is always as specified. Can still be zero (but then
          p!=NULL), if its defined as enum {ZERO=0, ONE=1} rate;

====== LITERALS =====
type p
type *p
type *restrict p
type *volatile p
type *const p

====== PRODUCE EXACTLY ONE PACKET ======

type p[rate]			optional state/data port
type p[restrict rate]		optional data port
type p[volatile rate]		optional state port

type p[static rate]		static state/data port, rate is always as specified (static)
type p[static restrict rate]	static data port
type p[static volatile rate]	static state port

======NOT SURE HOW DIFFERENT THESE ARE FROM 1, 2 and 3 =======
MAYBE: LITERAL POINTER TO rate tokens???

type (*p)[rate]				optional state/data port
type (*restrict p)[rate]		optional data port
type (*volatile p)[rate]		optional state port

====== PRODUCE num PACKETS =============

type (*p[num])[rate]			optional state/data num packets of rate
type (*p[restrict num])[rate]		optional data num packets of rate
type (*p[volatile num])[rate]		optional state num packets of rate

type (*p[static num])[rate]		static state/data port
type (*p[static restrict num])[rate]	static data port
type (*p[static volatile num])[rate]	static state port

magic pointer values:
	NULL: packet is not available to read/write (no data/space)
	!NULL: packet is/could be available/expected, but not allocated yet
	>!NULL: packet is allocated

====== ??? ===================================================
type (*const p)[rate]			???
type (*const restrict p)[rate]		???
type (*const volatile p)[rate]		???

======THESE IMPLY DOUBLE BUFFERING, SINCE THE ARRAY MUST HAVE COHESION!!!======

type p[const num][rate]			optional array of num static state/data ports
type p[const restrict num][rate]	optional array of num static data ports
type p[const volatile num][rate]	optional array of num static state ports

type p[const static num][rate]		static array of num static state/data ports
type p[const static restrict num][rate]	static array of num static data ports
type p[const static volatile num][rate]	static array of num static state ports

======THESE CAN BE USED WITH IN-PLACE, SINCE ITS ARRAY OF POINTERS!!!=====

type (*p[const num])[rate]			optional array of num optional state/data ports
type (*p[const restrict num])[rate]		optional array of num optional data ports
type (*p[const volatile num])[rate]		optional array of num optional state ports

type (*p[const static num])[rate]		static array of num optional state/data ports
type (*p[const static restrict num])[rate]	static array of num optional data ports
type (*p[const static volatile num])[rate]	static array of num optional state ports