![]() |
![]() |
![]() |
![]() |
![]() |
The keyword pair is used in case of ports with translation capability mechanism to indicate the mapping of a port working in translation mode to the outwards facing (transport) port. When a message is sent on a port with translation capability which is working in translation mode (mapped to a port which is present in the map to clause of the port with translation capability), message will be translated using the translation functions specified using the with keyword
Related keywords:
type port PortTypeId message [ map to { OuterPortType [ "," ] }+ ] { ( in { InnerInType [ from { OuterInType with InFunction "(" ")" [ "," ] }+ ] [ "," ] }+ | out { InnerOutType [ to { OuterOutType with OutFunction "(" ")" [ "," ]}+ ] [ "," ] }+ | inout { InOutType [ "," ] }+ | address AddrType [ to { OuterAddrTypewith AddrOutFunction "(" ")" [ "," ] }+ ] } |
Example:
type port OneM2MPort message map to IPL4asp_PT { out MsgOut to ASP_Send with f_enc_M2MPrimitive_to_ASPSend() in MsgIn from ASP_RecvFrom with f_dec_ASPRecvFrom_to_M2MPrimitive(), ASP_Event }
If a MsgOut type message is being sent on the OneM2MPort it will automatically be translated to ASP_Send type to be sent out on the IPL4 port using f_enc_M2MPrimitive_to_ASPSend function. The same applies in the incoming direction: if an ASP_RecvFrom type message is received on the IPL4asp_PT the f_dec_ASPRecvFrom_to_M2MPrimitive function will convert it to MsgIn type. In this example ASP_Event is an incoming type, which will be received in OneM2MPort unconverted, as it has no conversion function specified in this mapping.
BNF definition of map