Creating New Templates

## Contents

- Your rights

- Introduction

- Component model

- Component description file

- GenoM IDL mappings

- Running GenoM

- Tutorials

- Templates

  - Skeleton

  - Mappings

  - Interactive

  - Creating Templates

    - `template` command

    - `engine` command

    - `dotgen` command

    - `language` command

    - `$type` command

    - `$component` command

    - `$port` command

    - `$task` command

    - `$service` command

    - `$codel` command

    - `$param` command

## Creating New Templates

### The complete TCL engine reference

#### Runtime template information

- `template require`: Source additional template code

- `template parse`: Generate template content

- `template remove`: Remove unneeded generated template content

- `template options`: Define template options

- `template deps`: Template dependencies

- `template arg`: Retrieve options passed to templates

- `template usage`: Define template help string

- `template message`: Print runtime information

- `template fatal`: Abort template processing

#### Backend configuration

- `engine mode`: Engine output configuration

- `engine merge-tool`: Automatic merge of generated content

- `engine chdir`: Change output directory

- `engine pwd`: Get current output directory

- `args`: Get current template source arguments in named variables

#### Input file information

- `dotgen genom`: genom program and command line information

- `dotgen template`: Template path and directories

- `dotgen input`: Input file name and path

- `dotgen parse`: Process additional input

- `dotgen types`: Data type definitions from the specification

- `dotgen components`: Components definitions from the specification

- `dotgen interfaces`: Interfaces definitions from the specification

#### Language dependent code generation

- `lang`: Target programming language

- `comment`: Generate comment strings

- `fileext`: Cannonical file extension

- `indent`: Generate indented text

- `---`: Generate filler string

- `wrap`: Chop blocks of text

- `cname`: Cannonical object name

- `language mangle`: Unique type name

- `language mapping`: IDL type language mapping

- `language declarator`: Code for type declarations

- `language address`: Code for variable addresses

- `language dereference`: Code for dereferencing variables

- `language argument`: Code for declaring functions arguments

- `language pass`: Code for passing functions arguments

- `language member`: Code for accessing structure members

- `language signature`: Code for declaring codel signatures

- `language invoke`: Code for calling codels

#### Object manipulation procedures

- `$type`: IDL Type manipulation procedures

- `$component`: Component manipulation procedures

- `$port`: Port manipulation procedures

- `$task`: Task manipulation procedures

- `$service`: Service manipulation procedures

- `$codel`: Codel manipulation procedures

- `$param` Codels and services parameters manipulation procedures