Printer FriendlyEmail Article Link

TTworkbench: Can I define mapping in a behaviour function?

Environment/Versions
TTworkbench, Windows, Linux, 32/64bit
Answer
// pre-definition
type component MtcType { port MtcPortType mtcPort }
type component SystemType { port SystemPortType systemPort }

Until the standard of ES 201 873-1 v4.5.1, you can only define behaviour function running on a component type, but not against which TSI. Therefore no mapping can be used in a behaviour.

Since ES 201 873-1 v4.6.1, you can specify also MTC and TSI type for behaviour function, like
// recommended
function myFunction() runs on MtcType mtc MtcType system SystemType {
map (mtc:mtcPort,  system: systemPort);
}

Product : TTCN-3 Language