We’re here to help you


Interface Models

An interface has a name, can define some local types, defines a collection of events, and a behaviour describing the protocol on its events. A syntax example:

interface MyInterface
  enum MyEnumType { Val1, Val2, Val3 };
  extern MyString $std::string$;

  in MyEnumType myValuedEvent(MyString s);
  out void myReply();

    on myValuedEvent : { reply (MyEnumType.Val3); }

In this example a number of keywords are introduced: interface, in, out, void, behaviour, on, and reply.

The example defines an interface named MyInterface with two local types, two events, and the interface behaviour (see below for a syntax description of events and behaviour).


An event has (in this order):

  • a direction (in or out),

  • optionally a reply type (void if it is absent),

  • a user defined name,

  • a data parameter list, which may be empty.

Some examples:

  in void e2();            // a void in event called 'e2' with an empty parameter list
  in MyEnumType e3();      // a valued in event called 'e3'
  out void e4(MyString s); // a void out event called 'e4' with one data parameter

There is a restriction on event declarations: an out event must be void.


The behaviour section of an interface contains the protocol description of the interface. See Interface and component behaviour for an elaborate description.

If you have questions that weren’t answered by this Guide,
let our support team help you out.

Enjoy this article? Don't forget to share.