The inputs are declared between the macros MAPS_BEGIN_INPUTS_DEFINITION and MAPS_END_INPUTS_DEFINITION. Each input should be declared with this macro:
MAPS_INPUT(NAME, FILTER_TYPE, FIFO_TYPE)
- NAME: name of the input, with quotes. Example: "input".
- FILTER_TYPE: this is a filter! It specifies what data types this input accepts. The input has the capacity to filter either a single type (integer 32 bit for example), a large set of types (number types: float, int, 32 or 64 bit) or even all types. Filters can be combined using the | symbol (see example below).
- FIFO_TYPE: type of the fifo (Fifo reader, sampling reader...). See Reader types.
Let's see an example of an 32 bit integer input declaration, named "input":
Here is a list of the main filters available:
- FilterFloats64 | FilterDoubles: they are completely equivalent
- FilterNumbers: any number (float, int, 32 or 64 bit)
- FilterTextUTF8: text (FilterTextAscii in RTMaps version 3)
- FilterStream8: raw data (char*)
The outputs are declared between the macros MAPS_BEGIN_OUTPUTS_DEFINITION and MAPS_END_OUTPUTS_DEFINITION. Each output is declared using this macro:
MAPS_OUTPUT(NAME, TYPE, NULL, NULL, SIZE)
- NAME: name of the output.
- TYPE: the output type must be specified.
- SIZE: number of elements in the vector.
Here is an example of a integer 32 bit output, named "output".
Here is a list of the main output types available:
Properties are declared between the macros MAPS_BEGIN_PROPERTIES_DEFINITION and MAPS_END_PROPERTIES_DEFINITION. There are two kinds of properties: standard properties offer a text box where the user types the required value, and enumerated properties offer a limited set of choices in a drop-down list. Enumerated properties will be covered by a specific article, and the following describes standard properties only.
Each standard property is declared using:
- NAME: name of the property
- DEFAULT_VALUE: the default value of the property. Correctly setting this value is very important because RTMaps infers the type of the property from this default value. Examples:
- 2: the property will be an integer
- 2.0: the property will be a double (there is no float32 in properties, for simplicity)
- false: the property will be a boolean.
- "hello": the property will be a text. Warning: if you use a character
- NEEDS_TO_BE_INITIALIZED: boolean. True if the user must set a value before running the diagram (if the user tries to run the diagram before setting this property, the diagram will not run and a warning window will pop). Most of the time, this should be "false".
- CAN_BE_CHANGED_DURING_EXECUTION: boolean. True if the property can be changed when the diagram is running. False otherwise.
Here is an example of a integer property, named "factor".