[import "platform:/resource/AraneaMessageproject/src/aranea.dsl"] [project Aranea prefix=A_] { // Messages in this namespace serve as a documenting example on how to use // Aranea's OAW toolchain. The generated messages can also be used as an // example for the implementation (i.e. how to generate and use messages // in your code). // Note that some of the defined properites lack any comment and/or // restrictions - this is done on purpose: in practice you should always provide a // comment and apropriate restrictions! [namespace Example] { // A very simple message, using only basic types. [message Simple] { properties= { field_string: string field_integer: integer field_boolean: boolean field_double: double } } // A message extending another one. [message simple_extended extends=Aranea::Example::Simple] { properties= { field_binary: binary notVoid "a binary field, something that's not in the simple-message" } } // This class is used in the `special_message' example in Aranea's Eiffel code. [message special] { properties= { field_double_one: double greaterEqualZero field_double_two: double field_unicode: string notEmpty } } // A very complex message, probably the most complex one that will ever // be defined, generated and used. // It shows how to use list and map types, and how to define inline record types. [message complex] { properties= { // primitive types field_integer: integer greaterZero "an integer field" field_boolean: boolean field_string: string "/* no comment */" field_double: double field_binary: binary notVoid // composite types field_array_integer: sequence notEmpty field_array_boolean: sequence notEmpty field_map_double: map notEmpty field_map_string: map notEmpty // nested composite types field_array_array: sequence> notEmpty field_map_map: map> notEmpty field_array_map: sequence> notEmpty field_map_array: map> notEmpty // inline-defined record field_nested: map< record(nested_message, [open: integer; closed: integer]) > notEmpty "Statistics per project." } } } }