Convention and Naming

This page describe some ThingML project organization and naming conventions. Following the practices presented here is recommended but not yet enforced by the tools at the moment.

Basic naming conventions

Names for Things, Ports, States start with a capital letter.

Names for Messages, Properties and Variable do not start with a capital letter.

Definition of Messages

The definition of messages is done in thing fragment which only contain messges definition and which name is post-fixed by "Msgs".

Example: Messages used by a TemperatureSensor thing are defined in a TemperatureSensorMsgs thing fragment.

The TemperatureSensor thing will then "include" the TemperatureSensorMsgs fragment in order to be able to refer to the messages.

All clients of the TemperatureSensor thing also need to "include" the TemperatureSensorMsgs fragment in order to refer to the messages.


PIM = Platform Independent Model PSM = Platform Dependent Model

ThingML does not provide distinct languages to express PIMs and PSMs. Instead the same ThingML constructs can be used to describe PIM and PSM. The only exception is the "extern" statements and expressions (defined with single quotes) which should only be used in PSMs.

In order to clearly keep the separation and mappings between PIM and PSM, ThingML projects should follow a specific folder structure, naming convention and use a couple of annotations.