$port TCL engine command

## 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

## $port TCL engine command

Those commands manipulate port objects and return information about them. They all take a port object as their first argument, noted `$port` in the following command descriptions. Such an object is typically returned by other procedures, such as `$component ports`.

### $port name

Return the name of the port as a string.

### $port dir

Return `in` or `out` depending on the direction of the port.

### $port kind

Return `simple` or `multiple` depending on the kind of the port.

### $port visibility

Return either `hidden` or `default` depending on the visibility of the port.

### $port component

Return the component object in which the port is defined.

### $port type

Return the type object defining the port itself. (not the same as `datatype`, see below).

### $port datatype

Return the data type to be published in the port.

### $port doc

Return a string containing the documentation of the port defined in the `doc` attributes of the `.gen` description.

### $port throws

Return a list of `exceptions` possibly raised by the port.

### $port loc [file|line|column|context]

Return a list describing the source location where that port is defined. The list contains four elements: the file name, the line number, the column number and the original component context of the definition. If an optional argument is given, only the corresponding element is returned.

### $port class

Always returns the string "port". Useful to determine at runtime that the object is a port object.