set

# setstate

The setstate operation can change the state of the port during a translation procedure. It can only be used inside a function that is called during a translation procedure to translate a sent or received message.

- The setstate operation has two parameters. The second parameter is optional.
- The first parameter has to be a type of integer and only the 0 (translated), 1 (not translated), 2 (fragmented) and 3 (partially translated) values are accepted.
- The second parameter can be used for logging purposes.

Related keywords:

- port
- map

### port.setstate (SimpleExpression , { Freetext | TemplateInstance [ optional ]};

- SimpleExpression is the state which the ports state will be changed, and has to be of integer type.

- FreeText or TemplateInstance can be used for logging. Its value will be present in the logfile.

Example 1: set ports state to translated without additional information

port.setstate(0);

Example 2: set the state of the port to not translated with additional information

port.setstate(1, "Not successful");

BNF definition of setstate