LibItsIicp_Templates.ttcn3 73.4 KB
Newer Older
filatov's avatar
filatov committed
 *  @version    $URL$
 *              $Id$
 *  @desc       Templates definitions for Inter-ITS-SCU communications (ISO 24102-4)
 */
module LibItsIicp_Templates {
    
    // LibCommon 
    import from LibCommon_BasicTypesAndValues { 
        type 
            UInt8, UInt16; 
    }; 
    
    // LibIts
    import from CALMiitsscu language "ASN.1:1997" { 
        type 
            IIC_Request, IICrequestTX, IICrequestRX, 
garciay's avatar
garciay committed
            IIC_Response, IICresponseTX, IICresponseRX, 
            PduRequest, PduResponse, PduCounter, 
garciay's avatar
garciay committed
            VCI_info_req, VCI_info_res, VCI_update_req, VCI_Info, 
            PduErrStatus 
    }; 
    import from CALMmanagement language "ASN.1:1997" { 
        type ITS_scuId 
    }; 
    // FIXME Why ErrStatus not found?
    import from CALMllsap language "ASN.1:1997" all;/*{ 
        type 
            ErrStatus, 
garciay's avatar
garciay committed
            MedType , CIaClass, CIclass, CIstatus 
    };*/
    import from CALMmsap language "ASN.1:1997" all; 
    import from CALMfntp language "ASN.1:1997" { 
        type PortNumber 
    }; 
    import from LibItsIicp_Pixits {
        modulepar PX_PDU_REQUEST_FILL_FIELD_VALUE 
    };
    import from LibItsMgt_Templates { 
        template 
            mw_mfCommandRequest_any, mw_mfRequestRequest_any 
    }; 
    
reinaortega's avatar
reinaortega committed
    import from LibItsCalm_Interface all; 
    
    group iicpPrimitives {
    
        group utPrimitives {
        
            /**
             * @desc    Initializes the IICP IUT
             */
            template (value) UtInitialize m_iicpInitialize := {
                utIicpInitialize := {
                }
            } // End of template m_iicpInitialize
            
        } // End of group utPrimitives
        
        group taPrimitives {
            
        } // End of group taPrimitives
        
garciay's avatar
garciay committed
        /**
         * @desc MF-SAP service primitives templates
         * @see ISO 24102-3 Clause 8.2.2 MF-COMMAND.request
         */
        group mfCommandRequest { 
garciay's avatar
garciay committed
            group mfCommandRequestSend { 
                
                /**
                 * @desc    Send template for PduRequest/MF-COMMAND.request
                 * @param   p_mfCommandReq MF-COMMAND.request description 
                 * @see ISO 24102-4 Clause 8.2.1 IIC-Request PDU
                 */
                template (value) PduRequest m_pduRequest_mfCommandReq( 
                    in template (value) MF_Command_request p_mfCommandReq 
                ) := {
                    fill := PX_PDU_REQUEST_FILL_FIELD_VALUE,
                    requests := {
                        mf_rcmd := p_mfCommandReq
                    } // End of field 'requests' 
garciay's avatar
garciay committed
                } // End of template m_pduRequest_mfCommandReq
                
            } // End of group mfCommandRequestSend
            
garciay's avatar
garciay committed
            group mfCommandRequestRecv { 
garciay's avatar
garciay committed
                /**
                 * @desc    Receive template for PduRequest/MF-COMMAND.request
                 * @param   p_mfCommandReq MF-COMMAND.request description 
                 * @see ISO 24102-4 Clause 8.2.1 IIC-Request PDU
                 */
                template (present) PduRequest mw_pduRequest_mfCommandReq( 
                    in template (present) MF_Command_request p_mfCommandReq 
                ) := {
                    fill := ?,
                    requests := {
                        mf_rcmd := p_mfCommandReq
                    } // End of field 'requests' 
                } // End of template mw_pduRequest_mfCommandReq
                
garciay's avatar
garciay committed
                /**
                 * @desc    Receive template for MF-COMMAND.request in case of forwarding the IIC-Request PDU to the IICA
                 * @param   p_iICrequestTX IICrequestTX description 
                 * @see ISO 24102-4 Clause 8.2.1 IIC-Request PDU
                 */
reinaortega's avatar
reinaortega committed
                template (present) MF_Command_request mdw_mfCommandRequest_iicRequestTx(
                    in template (present) IICrequestTX p_iicRequestTx
                ) modifies mw_mfCommandRequest_any := {
                    command_param := {
                        mfCmd := {
reinaortega's avatar
reinaortega committed
                            iICrequestTX := p_iicRequestTx
                        } // End of field 'mfCmd' 
                    } // End of field 'command_param' 
reinaortega's avatar
reinaortega committed
                } // End of template mdw_mfCommandRequest_iicRequestTx
garciay's avatar
garciay committed
                /**
                 * @desc    Receive template for MF-COMMAND.request in case of forwarding the IIC-Response PDU to the IICA
                 * @param   p_iICresponseTX IICresponseTX description 
                 * @see ISO 24102-4 Clause 8.2.2 IIC-Response PDU
                 */
reinaortega's avatar
reinaortega committed
                template MF_Command_request mdw_mfCommandRequest_iicResponseTx(
                    in template (present) IICresponseTX p_iicResponseTx
                ) modifies mw_mfCommandRequest_any := {
                    command_param := {
                        mfCmd := {
reinaortega's avatar
reinaortega committed
                            iICresponseTX := p_iicResponseTx
                        } // End of field 'mfCmd' 
                    } // End of field 'command_param' 
reinaortega's avatar
reinaortega committed
                } // End of template mdw_mfCommandRequest_iicResponseTx
garciay's avatar
garciay committed
            } // End of group mfCommandRequestRecv
            
        } // End of group mfCommandRequest
        
garciay's avatar
garciay committed
        /**
         * @desc MF-SAP service primitives templates
         * @see ISO 24102-3 Clause 8.3 MF-REQUESTs
garciay's avatar
garciay committed
         */
        group mfRequestRequest {
             
            group mfRequestRequestSend {
garciay's avatar
garciay committed
                
                /**
                 * @desc    Send template for PduRequest/MF-Request.request 
                 * @param   p_mf_rreq MF-REQUEST.request mesage description 
                 * @see ISO 24102-4 Clause 8.2.1 IIC-Request PDU 
garciay's avatar
garciay committed
                 */
                template (value) PduRequest m_pduRequest_mfRequestRequest( 
reinaortega's avatar
reinaortega committed
                    in template (value) MF_Request_request p_mfReqReq 
garciay's avatar
garciay committed
                ) := {
                    fill := PX_PDU_REQUEST_FILL_FIELD_VALUE,
                    requests := {
reinaortega's avatar
reinaortega committed
                        mf_rreq := p_mfReqReq
                    } // End of field 'requests' 
                } // End of template m_pduRequest_mfRequestRequest
garciay's avatar
garciay committed
                
                /**
                 * @desc    Send template for PduResponse/MF-Request.confirm 
                 * @param   p_mf_rreq MF-REQUEST.confirm mesage description 
                 * @see ISO 24102-4 Clause 8.2.2 IIC-Response PDU 
                 */
                template (value) PduResponse m_pduResponse_mfRequestConfirm( 
reinaortega's avatar
reinaortega committed
                    in template (value) MF_Request_confirm p_mfReqReq 
                ) := {
                    fill := PX_PDU_REQUEST_FILL_FIELD_VALUE, 
                    responses := { 
reinaortega's avatar
reinaortega committed
                        mf_rreq := p_mfReqReq 
                    } // End of field 'requests' 
                } // End of template m_pduResponse_mfRequestConfirm 
                
            } // End of group mfRequestRequestSend
garciay's avatar
garciay committed
            
garciay's avatar
garciay committed
                
                /**
                 * @desc    Receive template for PduRequest/MF-REQUEST.request message 
                 * @param   p_mfRequestReq MF-REQUEST.request message description
                 */
                template (present) PduRequest mw_pduRequest_mfRequestRequest( 
reinaortega's avatar
reinaortega committed
                    in template (present) MF_Request_request p_mfReqReq 
                ) := {
                    fill := ?,
                    requests := {
reinaortega's avatar
reinaortega committed
                        mf_rreq := p_mfReqReq
                    }
                } // End of template mw_pduRequest_mfRequestRequest
                
garciay's avatar
garciay committed
                /**
                 * @desc    Receive template for MF-REQUEST.request in case of forwarding the IIC-Request PDU to the IICA
                 * @param   p_commandRef    Command reference
                 * @param   p_iICrequestRX  IICrequestRX message description
                 * @see ISO 24102-4 Clause 8.3.1 IIC-Request PDU
garciay's avatar
garciay committed
                 */
reinaortega's avatar
reinaortega committed
                template (value) MF_Request_request m_mfRequestRequest_iicRequestRx( 
                    in template (value) CommandRef p_commandRef, 
reinaortega's avatar
reinaortega committed
                    in template (value) IICrequestRX p_iicRequestRx 
                ) := { 
                    commandRef := p_commandRef, 
                    request_param := { 
                        fill := PX_PDU_REQUEST_FILL_FIELD_VALUE, 
                        mfReq := { 
reinaortega's avatar
reinaortega committed
                            iICrequestRX := p_iicRequestRx
                        } // End of 'mfReq' field 
                    } // End of 'request_param' field 
reinaortega's avatar
reinaortega committed
                } // End of template m_mfRequestRequest_iicRequestRx 
garciay's avatar
garciay committed
                
            } // End of group mfRequestRequestRecv
garciay's avatar
garciay committed
            
        } // End of group mfRequestRequest
        
        /**
         * @desc MN-SAP service primitives templates
         * @see ISO 24102-3 Clause 7.2 MN-COMMANDs
         */
garciay's avatar
garciay committed
        group mnCommandRequest { 
            
garciay's avatar
garciay committed
            group mnCommandRequestSend { 
                
                /**
                 * @desc    Receive template for PduRequest/MN-COMMAND.request 
                 * @param   p_mnCommandReq MN-COMMAND.request description 
                 * @see ISO 24102-4 Clause 8.2.1 IIC-Request PDU 
                 */
                template (value) PduRequest m_pduRequest_mnCommandReq( 
                    in template (value) MN_Command_request p_mnCommandReq 
                ) := {
                    fill := PX_PDU_REQUEST_FILL_FIELD_VALUE,
                    requests := {
                        mn_rcmd := p_mnCommandReq
                    }
                } // End of template m_pduRequest_mnCommandReq
                
            } // End of group mnCommandRequestSend
            
garciay's avatar
garciay committed
            group mnCommandRequestRecv { 
                
                /**
                 * @desc    Receive template for PduRequest/MN-COMMAND.request 
                 * @param   p_mnCommandReq MN-COMMAND.request description 
                 * @see ISO 24102-4 Clause 8.2.1 IIC-Request PDU 
                 */
                template (present) PduRequest mw_pduRequest_mnCommandReq( 
                    in template (present) MN_Command_request p_mnCommandReq 
                ) := {
                    fill := ?,
                    requests := {
                        mn_rcmd := p_mnCommandReq
                    }
                } // End of template mw_pduRequest_mnCommandReq
                
            } // End of group mnCommandRequestRecv
            
        } // End of group mnCommandRequest
        
        /**
         * @desc MN-SAP service primitives templates
         * @see ISO 24102-3 Clause 7.3 MN-REQUESTs
         */
        group mnRequestRequest {
             
            group mnRequestRequestSend {
                
                /**
                 * @desc    Send template for PduRequest/MN-Request.request 
                 * @param   p_mn_rreq MMN-Request-request mesage description 
                 * @see ISO 24102-4 Clause 8.2.1 IIC-Request PDU 
                 */
                template (value) PduRequest m_pduRequest_mnRequestRequest( 
reinaortega's avatar
reinaortega committed
                    in template (value) MN_Request_request p_mnReqReq 
                ) := {
                    fill := PX_PDU_REQUEST_FILL_FIELD_VALUE,
                    requests := {
reinaortega's avatar
reinaortega committed
                        mn_rreq := p_mnReqReq
                    }
                } // End of template m_pduRequest_mnRequestRequest 
                
            } // End of group mnRequestRequestSend 
            
            group mnRequestRequestRecv { 
                
            } // End of group mnRequestRequestRecv 
            
        } // End of group mnRequestRequest 
        
garciay's avatar
garciay committed
        /**
         * @desc MI-SAP service primitives templates
         * @see ISO 24102-3 Clause 6.4 MN-COMMANDs
garciay's avatar
garciay committed
         */
        group miCommandRequest { 
            
garciay's avatar
garciay committed
            group miCommandRequestSend { 
                
                /**
                 * @desc    Send template for PduRequest/MI-COMMAND.request 
                 * @param   p_miCommandReq MI-COMMAND.request description 
                 * @see ISO 24102-4 Clause 8.2.1 IIC-Request PDU 
                 */
                template (value) PduRequest m_pduRequest_miCommandReq( 
                    in template (value) MI_Command_request p_miCommandReq 
                ) := {
                    fill := PX_PDU_REQUEST_FILL_FIELD_VALUE,
                    requests := {
                        mi_rcmd := p_miCommandReq
                    }
                } // End of template m_pduRequest_miCommandReq
                
            } // End of group miCommandRequestSend
            
garciay's avatar
garciay committed
            group miCommandRequestRecv { 
                
                /**
                 * @desc    Receive template for PduRequest/MI-COMMAND.request 
                 * @param   p_miCommandReq MI-COMMAND.request description 
                 * @see ISO 24102-4 Clause 8.2.1 IIC-Request PDU 
                 */
                template (present) PduRequest mw_pduRequest_miCommandReq( 
                    in template (present) MI_Command_request p_miCommandReq 
                ) := {
                    fill := ?,
                    requests := {
                        mi_rcmd := p_miCommandReq
                    }
                } // End of template mw_pduRequest_miCommandReq
                
            } // End of group miCommandRequestRecv
            
        } // End of group miCommandRequest
        
        /**
         * @desc MI-SAP service primitives templates
         * @see ISO 24102-3 Clause 6.2 MI-SETs
         * @see ISO 24102-3 Clause 6.3 MI-GETs
         */
garciay's avatar
garciay committed
        group miGetSetRequest { 
            
            group miGetSetRequestSend { 
                
                /**
                 * @desc    Send template for PduRequest/MI-GET.request 
                 * @param   p_mi_rget MI-GET.request mesage description 
                 * @see ISO 24102-4 Clause 8.2.1 IIC-Request PDU 
                 */
                template (value) PduRequest m_pduRequest_miGetReq( 
reinaortega's avatar
reinaortega committed
                    in template (value) MI_Get_request p_miReqGet 
garciay's avatar
garciay committed
                ) := {
                    fill := PX_PDU_REQUEST_FILL_FIELD_VALUE,
                    requests := {
reinaortega's avatar
reinaortega committed
                        mi_rget := p_miReqGet
garciay's avatar
garciay committed
                    }
                } // End of template m_pduRequest_miGetReq
                
                /**
                 * @desc    Send template for PduRequest/MI-SET.request 
                 * @param   p_mi_rget MI-SET.request mesage description 
                 * @see ISO 24102-4 Clause 8.2.1 IIC-Request PDU 
                 */
                template (value) PduRequest m_pduRequest_miSetReq( 
reinaortega's avatar
reinaortega committed
                    in template (value) MI_Set_request p_miReqSet 
garciay's avatar
garciay committed
                ) := {
                    fill := PX_PDU_REQUEST_FILL_FIELD_VALUE,
                    requests := {
reinaortega's avatar
reinaortega committed
                        mi_rset := p_miReqSet
garciay's avatar
garciay committed
                    }
                } // End of template m_pduRequest_miSetReq
                
            } // End of group miGetSetRequestSend
            
        } // End of group miGetSetRequest
        
garciay's avatar
garciay committed
        /**
         * @desc MI-SAP service primitives templates
         * @see ISO 24102-3 Clause 6.5 MI-REQUESTs
garciay's avatar
garciay committed
         */
garciay's avatar
garciay committed
             
garciay's avatar
garciay committed
                
                /**
                 * @desc    Send template for PduRequest/MF-Request.request 
                 * @param   p_mi_rreq MI-REQUEST.request mesage description 
                 * @see ISO 24102-4 Clause 8.2.1 IIC-Request PDU 
garciay's avatar
garciay committed
                 */
                template (value) PduRequest m_pduRequest_miRequestRequest( 
reinaortega's avatar
reinaortega committed
                    in template (value) MI_Request_request p_miReqReq 
                ) := {
                    fill := PX_PDU_REQUEST_FILL_FIELD_VALUE,
                    requests := {
reinaortega's avatar
reinaortega committed
                        mi_rreq := p_miReqReq
                    }
                } // End of template m_pduRequest_miRequestRequest
garciay's avatar
garciay committed
                
            } // End of group miRequestRequestSend
garciay's avatar
garciay committed
            
            } // End of group miRequestRequestRecv
        } // End of group miRequestRequest
garciay's avatar
garciay committed
         * @see ISO 24102-4 Clause 9.2 ITS-SCU-ID assignment 
garciay's avatar
garciay committed
        group aliveMessages {
garciay's avatar
garciay committed
            group aliveMessagesSend {
garciay's avatar
garciay committed
                /**
                 * @desc    Send template for IIC-Request PDU ITS-SCUalive message
                 * @param   p_alive ITS_SCUalive message description
                 * @see ISO 24102-4 Clause 9.2 ITS-SCU-ID assignment 
                 */
reinaortega's avatar
reinaortega committed
                template (value) PduRequest m_pduRequest_scuAlive( 
                    in template (value) ITS_SCUalive p_alive 
                ) := {
                    fill := PX_PDU_REQUEST_FILL_FIELD_VALUE,
                    requests := {
                        alive_ := p_alive
                    }
reinaortega's avatar
reinaortega committed
                } // End of template m_pduRequest_scuAlive
garciay's avatar
garciay committed
                /**
                 * @desc    Send template for IIC-Request PDU ITS-SCUalive message
                 * @param   p_message       The Alive message (new, delete...)
                 * @param   p_its_scuType   The type of ITS-SCU in the "Data" element
                 * @see ISO 24102-4 Table 4 — Error handling procedure for IIC-Response PDU
                 */
                template (value) ITS_SCUalive m_scuAlive( 
                    in template (value) AliveMessage p_message,
reinaortega's avatar
reinaortega committed
                    in template (value) ITS_SCUtype p_itsScuType 
reinaortega's avatar
reinaortega committed
                    its_scuType := p_itsScuType
garciay's avatar
garciay committed
            } // End of group aliveMessagesSend
garciay's avatar
garciay committed
            group aliveMessagesRecv {
garciay's avatar
garciay committed
                /**
                 * @desc    Receive template for ITS-SCUalive message
                 * @param   p_message       The Alive message (new, delete...)
                 * @param   p_its_scuType   The type of ITS-SCU in the "Data" element
                 * @see ISO 24102-4 Table 4 — Error handling procedure for IIC-Response PDU
                 */
                template ITS_SCUalive mw_scuAlive( 
                    in template (present) AliveMessage p_message,
reinaortega's avatar
reinaortega committed
                    in template (present) ITS_SCUtype p_itsScuType 
garciay's avatar
garciay committed
                ) := { 
                    message_ := p_message, 
reinaortega's avatar
reinaortega committed
                    its_scuType := p_itsScuType 
garciay's avatar
garciay committed
                } // End of template mw_scuAlive 
                
                /**
                 * @desc    Receive template for MF-REQUEST.request/IICrequestRX message
                 * @param   p_iICrequestRX IICrequestRX message description
                 * @see ISO 24102-4 Clause 8.3.1 IIC-Request PDU 
                 */
reinaortega's avatar
reinaortega committed
                template MF_Request mw_mfRequest_scuAlive( 
                    in template (present) IICrequestRX p_iicRequestRx
reinaortega's avatar
reinaortega committed
                        iICrequestRX := p_iicRequestRx
reinaortega's avatar
reinaortega committed
                } // End of template mw_mfRequest_scuAlive
garciay's avatar
garciay committed
                /**
                 * @desc    Receive template for IICrequestTX/SCU-Alive message
reinaortega's avatar
reinaortega committed
                 * @param   p_sourceItsScuId       The source ITS-SCU-ID
                 * @param   p_destinationItsScuId  The destination ITS-SCU-ID
garciay's avatar
garciay committed
                 * @param   p_alive                 The Alive message (new, delete...)
                 * @see ISO 24102-4 Clause 8.2.1 IIC-Request PDU 
                 */
reinaortega's avatar
reinaortega committed
                template IICrequestTX mdw_iicRequestTx_scuAlive( 
                    in template (present) ITS_scuId p_sourceItsScuId, 
                    in template (present) ITS_scuId p_destinationItsScuId, 
                    in template (present) ITS_SCUalive p_alive 
                ) modifies mw_iicRequestTx_any := {
reinaortega's avatar
reinaortega committed
                    sourceITS_scuId := p_sourceItsScuId, 
                    destinationITS_scuId := p_destinationItsScuId, 
                    pduRequest := { 
                        requests := { 
                            alive_ := p_alive 
                        } // End of 'requests' field 
                    } // End of 'pduRequest' field 
reinaortega's avatar
reinaortega committed
                } // End of template mdw_iicRequestTx_scuAlive 
garciay's avatar
garciay committed
                /**
                 * @desc    Receive template for IICrequestRX/SCU-Alive message
reinaortega's avatar
reinaortega committed
                 * @param   p_sourceItsScuId       The source ITS-SCU-ID
                 * @param   p_destinationItsScuId  The destination ITS-SCU-ID
garciay's avatar
garciay committed
                 * @param   p_alive                 The Alive message (alive, new, delete)
                 * @see ISO 24102-4 Clause 8.3.1 IIC-Request PDU 
                 * @see ISO 24102-4 Table B.2 — ITS-SCU-id request PDU
                 */
reinaortega's avatar
reinaortega committed
                template IICrequestRX mdw_iicRequestRx_scuAlive( 
                    in template (present) ITS_scuId p_sourceItsScuId, 
                    in template (present) ITS_scuId p_destinationItsScuId, 
                    in template (present) ITS_SCUalive p_alive 
                ) modifies mw_iicRequestTx_any := { // WARNING type IIC_Request == IICrequestTX == IICrequestRX; 
reinaortega's avatar
reinaortega committed
                    sourceITS_scuId := p_sourceItsScuId, 
                    destinationITS_scuId := p_destinationItsScuId, 
                    pduRequest := { 
                        requests := { 
                            alive_ := p_alive 
                        } // End of 'requests' field 
                    } // End of 'pduRequest' field 
reinaortega's avatar
reinaortega committed
                } // End of template mdw_iicRequestRx_scuAlive 
garciay's avatar
garciay committed
                /**
                 * @desc    Receive template for IICresponseTX/SCU-Alive message
reinaortega's avatar
reinaortega committed
                 * @param   p_sourceItsScuId       The source ITS-SCU-ID
                 * @param   p_destinationItsScuId  The destination ITS-SCU-ID
garciay's avatar
garciay committed
                 * @param   p_alive                 The Alive message (new, delete...)
                 * @param   p_errorStatus           Error status
                 * @see ISO 24102-4 Clause 8.2.1 IIC-Request PDU 
                 * @see ISO 24102-4 Table 4 — Error handling procedure for IIC-Response PDU 
                 */
reinaortega's avatar
reinaortega committed
                template IICresponseTX mdw_iicResponseTx_scuAlive( 
                    in template (present) ITS_scuId p_sourceItsScuId, 
                    in template (present) ITS_scuId p_destinationItsScuId, 
                    in template (present) ITS_SCUalive p_alive, 
                    in template (present) PduErrStatus p_errorStatus
                ) modifies mw_iicResponseTx_any := { 
reinaortega's avatar
reinaortega committed
                    sourceITS_scuId := p_sourceItsScuId, 
                    destinationITS_scuId := p_destinationItsScuId, 
                    pduResponse := { 
                        responses := { 
                            alive_ := p_alive 
                        } // End of 'responses' field 
                    }, // End of 'pduResponse' field 
                    errorStatus := p_errorStatus 
reinaortega's avatar
reinaortega committed
                } // End of template mdw_iicResponseTx_scuAlive
garciay's avatar
garciay committed
            } // End of group aliveMessagesRecv
garciay's avatar
garciay committed
        } // End of group aliveMessages
garciay's avatar
garciay committed
        /**
         * @desc ITS-SCUalive templates
         * @see ISO 24102-4 Clause 8.2.1 IIC-Request PDU
         * @see ISO 24102-4 Clause B.2.3 VCI-info 
         */
garciay's avatar
garciay committed
            group vciInfoReqSend { 
garciay's avatar
garciay committed
                /**
                 * @desc    Send template for IIC-Request PDU VCI-info message
                 * @param   p_vCI_info Request to all ITS-SCUs containing a router, to report about existing VCIs. Information to be stored in VCI list
                 * @see ISO 24102-4 Clause B.2.3 VCI-info
                 */
reinaortega's avatar
reinaortega committed
                template (value) PduRequest m_pduRequest_vciInfoReq( 
                    in template (value) VCI_info_req p_vciInfo 
                ) := {
                    fill := PX_PDU_REQUEST_FILL_FIELD_VALUE,
                    requests := {
reinaortega's avatar
reinaortega committed
                        vCI_info := p_vciInfo
reinaortega's avatar
reinaortega committed
                } // End of template m_pduRequest_vciInfoReq
garciay's avatar
garciay committed
                /**
                 * @desc    Send template for VCI-info-req message
                 * @param   p_medType   Indicates requested type of medium as specified in ISO 21218
                 * @param   p_iciaClass Indicates requested CI access class as specified in ISO 21218
                 * @param   p_ciClass   Indicates requested CI class as specified in ISO 21218
                 * @see ISO 24102-4 Table B.4 — VCI-info request PDU
                 */
                template (value) VCI_info_req m_vciInfoReq( 
                    in template (value) MedType p_medType,
                    in template (value) CIaClass p_iciaClass, 
                    in template (value) CIclass p_ciClass 
                ) := {
                    medType := p_medType, 
                    ciaClass := p_iciaClass, 
                    ciClass := p_ciClass 
                } // End of template m_vciInfoReq
                
garciay's avatar
garciay committed
            } // End of group vciInfoReqSend
garciay's avatar
garciay committed
            group vciInfoReqSendRecv {
garciay's avatar
garciay committed
                /**
                 * @desc    Receive template for IICrequestTX/VCI-info message
reinaortega's avatar
reinaortega committed
                 * @param   p_sourceItsScuId       The source ITS-SCU-ID
                 * @param   p_destinationItsScuId  The destination ITS-SCU-ID
garciay's avatar
garciay committed
                 * @param   p_vCI_info              The VCI-info request
                 * @see ISO 24102-4 Clause 8.2.1 IIC-Request PDU 
                 */
reinaortega's avatar
reinaortega committed
                template IICrequestRX mdw_iicRequestTx_vciInfoReq(
                    in template (present) ITS_scuId p_sourceItsScuId, 
                    in template (present) ITS_scuId p_destinationItsScuId, 
                    in template (present) VCI_info_req p_vciInfo 
reinaortega's avatar
reinaortega committed
                    sourceITS_scuId := p_sourceItsScuId, 
                    destinationITS_scuId := p_destinationItsScuId, 
reinaortega's avatar
reinaortega committed
                            vCI_info := p_vciInfo 
                        } // End of 'requests' field 
                    } // End of 'pduRequest' field 
reinaortega's avatar
reinaortega committed
                } // End of template mdw_iicRequestTx_vciInfoReq 
garciay's avatar
garciay committed
                /**
                 * @desc    Receive template for VCI-info-req message
                 * @param   p_medType   Indicates requested type of medium as specified in ISO 21218
                 * @param   p_iciaClass Indicates requested CI access class as specified in ISO 21218
                 * @param   p_ciClass   Indicates requested CI class as specified in ISO 21218
                 * @see ISO 24102-4 Table B.4 — VCI-info request PDU
                 */
                template VCI_info_req mw_vciInfoReq(
                    in template (present) MedType p_medType,
                    in template (present) CIaClass p_iciaClass, 
                    in template (present) CIclass p_ciClass 
                ) := {
                    medType := p_medType, 
                    ciaClass := p_iciaClass, 
                    ciClass := p_ciClass 
                } // End of template mw_vciInfoReq
                
garciay's avatar
garciay committed
            } // End of group vciInfoReqSendRecv
garciay's avatar
garciay committed
            group vciInfoSend {
garciay's avatar
garciay committed
                /**
                 * @desc    Send template for VCI-Info message
                 * @param   p_linkId    Link identifier of the CI
                 * @param   p_medType   Indicates requested type of medium as specified in ISO 21218
                 * @param   p_iciaClass Indicates requested CI access class as specified in ISO 21218
                 * @param   p_ciClass   Indicates requested CI class as specified in ISO 21218
                 * @param   p_status    Status of the CI
                 * @see ISO 24102-4 Table B.6 — VCI-update request PDU 
                 */
                template (value) VCI_Info m_vciInfo( 
                    in template (value) Link_ID p_linkId, 
                    in template (value) MedType p_medType,
                    in template (value) CIaClass p_iciaClass, 
                    in template (value) CIclass p_ciClass, 
                    in template (value) CIstatus p_status
                ) := {
                    linkId := p_linkId, 
garciay's avatar
garciay committed
                    medType := p_medType, 
                    ciaClass := p_iciaClass, 
                    ciClass := p_ciClass, 
                    status := p_status 
                } // End of template m_vciInfo
                
            } // End of group vciInfoSend
garciay's avatar
garciay committed
            group vciInfoRecv {
reinaortega's avatar
reinaortega committed
                template IICresponseRX mdw_iicResponseTx_vciInfoRes(
                    in template (present) ITS_scuId p_sourceItsScuId, 
                    in template (present) ITS_scuId p_destinationItsScuId, 
                    in template (present) VCI_info_res p_vciInfoRes 
garciay's avatar
garciay committed
                ) modifies mw_iicResponseTx_any := {
reinaortega's avatar
reinaortega committed
                    sourceITS_scuId := p_sourceItsScuId, 
                    destinationITS_scuId := p_destinationItsScuId, 
garciay's avatar
garciay committed
                    pduResponse := { 
                        responses := { 
reinaortega's avatar
reinaortega committed
                            vCI_info := p_vciInfoRes 
garciay's avatar
garciay committed
                        } // End of 'responses' field 
                    }, // End of 'pduResponse' field 
                    errorStatus := 0
                } // End of template mdw_iicRequestTx_VCIInfoReq 
                
                /**
                 * @desc    Receive template for VCI-info-res message
                 * @param   p_linkId    Link identifier of the CI
                 * @param   p_medType   Indicates requested type of medium as specified in ISO 21218
                 * @param   p_iciaClass Indicates requested CI access class as specified in ISO 21218
                 * @param   p_ciClass   Indicates requested CI class as specified in ISO 21218
                 * @param   p_status    Status of the CI
                 */
                template (present) VCI_Info mw_vciInfo(
                    in template (present) Link_ID p_linkId, 
                    in template (present) MedType p_medType,
                    in template (present) CIaClass p_iciaClass, 
                    in template (present) CIclass p_ciClass, 
                    in template (present) CIstatus p_status
                ) := {
                    linkId := p_linkId, 
garciay's avatar
garciay committed
                    medType := p_medType, 
                    ciaClass := p_iciaClass, 
                    ciClass := p_ciClass, 
                    status := p_status 
                } // End of template mw_vciInfo
                
            } // End of group vciInfoRecv
garciay's avatar
garciay committed
        group vciUpdate {
            
            group vciUpdateSend {
                
                
                /**
                 * @desc    Send template for IIC-Request PDU VCI-update message
                 * @param   p_vCI_update VCI-update message description
                 * @see ISO 24102-4 Clause B.2.4 VCI-update 
                 */
reinaortega's avatar
reinaortega committed
                template (value) PduRequest m_pduRequest_vciUpdate( 
                    in template (value) VCI_update_req p_vciUpdate 
garciay's avatar
garciay committed
                ) := {
                    fill := PX_PDU_REQUEST_FILL_FIELD_VALUE,
                    requests := {
reinaortega's avatar
reinaortega committed
                        vCI_update := p_vciUpdate
garciay's avatar
garciay committed
                    }
reinaortega's avatar
reinaortega committed
                } // End of template m_pduRequest_vciUpdate
garciay's avatar
garciay committed
                
            } // End of group vciUpdateSend
            
            group vciUpdateRecv {
                
                /**
                 * @desc    Receive template for IICrequestTX/SCU-Alive message
reinaortega's avatar
reinaortega committed
                 * @param   p_sourceItsScuId       The source ITS-SCU-ID
                 * @param   p_destinationItsScuId  The destination ITS-SCU-ID
garciay's avatar
garciay committed
                 * @param   p_vciUpdate             The VCI-update message 
                 * @see ISO 24102-4 Clause 8.2.1 IIC-Request PDU 
                 */
reinaortega's avatar
reinaortega committed
                template (present) IICrequestTX mdw_iicRequestTx_vciUpdate( 
                    in template (present) ITS_scuId p_sourceItsScuId, 
                    in template (present) ITS_scuId p_destinationItsScuId, 
                    in template (present) VCI_update_req p_vciUpdate 
garciay's avatar
garciay committed
                ) modifies mw_iicRequestTx_any := {
reinaortega's avatar
reinaortega committed
                    sourceITS_scuId := p_sourceItsScuId, 
                    destinationITS_scuId := p_destinationItsScuId, 
garciay's avatar
garciay committed
                    pduRequest := { 
                        requests := { 
reinaortega's avatar
reinaortega committed
                            vCI_update := p_vciUpdate 
garciay's avatar
garciay committed
                        } // End of 'requests' field 
                    } // End of 'pduRequest' field 
reinaortega's avatar
reinaortega committed
                } // End of template mdw_iicRequestTx_vciUpdate 
garciay's avatar
garciay committed
                
                template (present) VCI_update_req mw_vciUpdate := {
                } // End of template mw_vciUpdate
                
            } // End of group vciUpdateRecv
            
        } // End of group vciUpdate
        
                 * @desc    Send template for Iisc packet (Inter-ITS-SCU communication Primitives)
                 * @param   p_msgInOut Inter-ITS-SCU communication packet to send
                    template (value) IIC_Request p_msgInOut
                    msgInOut := p_msgInOut
                /**
                 * @desc    Send template for Iisc packet (Inter-ITS-SCU communication Primitives)
                 * @param   p_msgInOut Inter-ITS-SCU communication packet to send
                 */
                template (value) IicpResp m_iicpResp(
                    template (value) IIC_Response p_msgInOut
                ) := {
                    msgInOut := p_msgInOut
                } // End of template m_iicpResp
                
reinaortega's avatar
reinaortega committed
                    in template (value) ITS_scuId p_sourceItsScuId, 
                    in template (value) ITS_scuId p_destinationItsScuId, 
                    in template (value) PduRequest p_pduRequest 
reinaortega's avatar
reinaortega committed
                    sourceITS_scuId := p_sourceItsScuId, 
                    destinationITS_scuId := p_destinationItsScuId, 
                    pduCounter := p_pduCounter, 
                    pduRequest := p_pduRequest, 
                    seqRq := ''O 
                template (value) IIC_Response m_iicResponse( 
reinaortega's avatar
reinaortega committed
                    in template (value) ITS_scuId p_sourceItsScuId, 
                    in template (value) ITS_scuId p_destinationItsScuId, 
                    in template (value) PduCounter p_pduCounter, 
                    in template (value) PduErrStatus p_errorStatus, 
                    in template (value) PduResponse p_pduResponse 
                ) := { 
reinaortega's avatar
reinaortega committed
                    sourceITS_scuId := p_sourceItsScuId, 
                    destinationITS_scuId := p_destinationItsScuId, 
                    pduCounter := p_pduCounter, 
                    errorStatus := p_errorStatus, 
                    pduResponse := p_pduResponse, 
                    seqRs := ''O 
                } // End of template m_iicResponse 
                
            } // End of group iicpTemplatesSend
                
                /**
                 * @desc    Receive template for Iisc packet (Inter-ITS-SCU communication Primitives)
                 * @param   p_iicpMsg Inter-ITS-SCU communication packet to receive
                template (present) IicpReq mw_iicpRequest(
                } // End of template mw_iicpRequest
                
                /**
                 * @desc    Receive template for Iisc packet (Inter-ITS-SCU communication Primitives)
                 * @param   p_iicpMsg Inter-ITS-SCU communication packet to be received
                template (present) IicpResp mw_iicpResponse(
                } // End of template mw_iicpResponse
                
                /**
                 * @desc Unspecified receive template
                 * Used for:
                 * <li>modifying restrictif template</li>
                 * <li>default altstep</li>
                 * 
garciay's avatar
garciay committed
                 * @see ISO 24102-4 Clause 7
garciay's avatar
garciay committed
                template IIC_Request mw_iicpRequest_any := { 
                    sourceITS_scuId := ?,
                    destinationITS_scuId := ?,
                    pduCounter := ?,
garciay's avatar
garciay committed
                    pduRequest := { 
                        fill := ?,
                        requests := ?
                    }, // End of field 'pduRequest' 
                template (present) IIC_Request mdw_iicRequest_notify( 
reinaortega's avatar
reinaortega committed
                    in template (present) ITS_scuId p_sourceItsScuId, 
                    in template (present) ITS_scuId p_destinationItsScuId, 
                    in template (present) PduCounter p_pduCounter, 
reinaortega's avatar
reinaortega committed
                    in template (present) PduRequest p_pduRequest 
                ) modifies mw_iicpRequest_any := { 
reinaortega's avatar
reinaortega committed
                    sourceITS_scuId := p_sourceItsScuId,
                    destinationITS_scuId := p_destinationItsScuId,
                    pduCounter := p_pduCounter,
reinaortega's avatar
reinaortega committed
                    pduRequest := p_pduRequest
                } // End of template mdw_iicRequest_notify
                
                /**
                 * @desc Unspecified receive template
                 * Used for:
                 * <li>modifying restrictif template</li>
                 * <li>default altstep</li>
                 * 
garciay's avatar
garciay committed
                 * @see ISO 24102-4 Clause 7
                    sourceITS_scuId := ?,
                    destinationITS_scuId := ?,
                    pduCounter := ?,
garciay's avatar
garciay committed
                    pduResponse := { 
                        fill := ?,
                        responses := ?
                    },  // End of field 'pduResponse'
                /**
                 * @desc Receive template for success response
                 */
                template IIC_Response mdw_iicpResponse_success 
                modifies mw_iicpResponse_any := {
                    errorStatus := 0 // FIXME Check why TTWB does not accespt success
                } // End of template mdw_iicpResponse_success
                
            } // End of group iicpTemplatesRecv
garciay's avatar
garciay committed
                /**
garciay's avatar
garciay committed
                 * @desc Unspecified receive template for IICRequestTx service primitive
                 * Used for:
                 * <li>modifying restrictif template</li>
garciay's avatar
garciay committed
                 */
                template IICrequestTX mw_iicRequestTx_any := { 
                    sourceITS_scuId := ?, 
                    destinationITS_scuId := ?, 
                    pduCounter := ?, 
garciay's avatar
garciay committed
                    pduRequest := { 
                        fill := ?,
                        requests := ?
                    },  // End of field 'pduRequest'
garciay's avatar
garciay committed
                /**
garciay's avatar
garciay committed
                 * @desc Unspecified receive template for IICResponseTx service primitive
                 * Used for:
                 * <li>modifying restrictif template</li>
garciay's avatar
garciay committed
                 */
                template IICresponseTX mw_iicResponseTx_any := { 
                    sourceITS_scuId := ?, 
                    destinationITS_scuId := ?, 
                    pduCounter := ?, 
garciay's avatar
garciay committed
                    pduResponse := { 
                        fill := ?,
                        responses := ?
                    },  // End of field 'pduResponse'
                    errorStatus := ?, 
                    seqRs := ? 
                } // End of template mw_iicResponseTx_any
                
garciay's avatar
garciay committed
                group miCommands {
                    
                    /**
                     * @desc    Receive template for IICrequestTX/remote command message
reinaortega's avatar
reinaortega committed
                     * @param   p_sourceItsScuId       The source ITS-SCU-ID
                     * @param   p_destinationItsScuId  The other ITS-SCU-ID
garciay's avatar
garciay committed
                     * @param   p_mi_rcmd               The MI-COMMAND.request message
                     * @see ISO 24102-4 Clause 8.2.1 IIC-Request PDU 
                     */
                    template IICrequestTX mdw_iicRequestTx_miCommandRequest( 
reinaortega's avatar
reinaortega committed
                        in template (present) ITS_scuId p_sourceItsScuId, 
                        in template (present) ITS_scuId p_destinationItsScuId, 
                        in template (present) MI_Command_request p_miReqCmd 
garciay's avatar
garciay committed
                    ) modifies mw_iicRequestTx_any := {
reinaortega's avatar
reinaortega committed
                        sourceITS_scuId := p_sourceItsScuId, 
                        destinationITS_scuId := p_destinationItsScuId, 
garciay's avatar
garciay committed
                        pduRequest := { 
                            requests := { 
reinaortega's avatar
reinaortega committed
                                mi_rcmd := p_miReqCmd 
garciay's avatar
garciay committed
                            } // End of 'requests' field 
                        } // End of 'pduRequest' field 
                    } // End of template mdw_iicRequestTx_miCommandRequest 
                    
garciay's avatar
garciay committed
                    /**
                     * @desc    Receive template for IICresponseTX message with success status
reinaortega's avatar
reinaortega committed
                     * @param   p_sourceItsScuId       The source ITS-SCU-ID
                     * @param   p_destinationItsScuId  The destination ITS-SCU-ID
garciay's avatar
garciay committed
                     * @param   p_mi_rcmd               The MI-COMMAND.confirm message
                     * @see ISO 24102-4 Clause 8.2.2 IIC-Response PDU 
                     */
                    template IICresponseTX mdw_iicResponseTx_miCommandRequest( 
reinaortega's avatar
reinaortega committed
                        in template (present) ITS_scuId p_sourceItsScuId, 
                        in template (present) ITS_scuId p_destinationItsScuId, 
                        in template (present) MI_Command_confirm p_miReqCmd 
garciay's avatar
garciay committed
                    ) modifies mw_iicResponseTx_any := {
reinaortega's avatar
reinaortega committed
                        sourceITS_scuId := p_sourceItsScuId, 
                        destinationITS_scuId := p_destinationItsScuId, 
garciay's avatar
garciay committed
                        pduResponse := { 
                            responses := { 
reinaortega's avatar
reinaortega committed
                                mi_rcmd := p_miReqCmd 
garciay's avatar
garciay committed
                            } // End of 'requests' field 
                        }, // End of 'pduRequest' field
                        errorStatus := 0 
                    } // End of template mdw_iicResponseTx_miCommandRequest 
                    
garciay's avatar
garciay committed
                    /**
                     * @desc    Receive template for IICrequestTX/remote command message
reinaortega's avatar
reinaortega committed
                     * @param   p_sourceItsScuId       The source ITS-SCU-ID
                     * @param   p_destinationItsScuId  The other ITS-SCU-ID
                     * @param   p_mi_rreq               The MI-Request.request message
garciay's avatar
garciay committed
                     * @see ISO 24102-4 Clause 8.2.1 IIC-Request PDU 
                     */
                    template IICrequestTX mdw_iicRequestTx_miRequestRequest( 
reinaortega's avatar
reinaortega committed
                        in template (present) ITS_scuId p_sourceItsScuId, 
                        in template (present) ITS_scuId p_destinationItsScuId, 
                        in template (present) MI_Request_request p_miReqReq 
garciay's avatar
garciay committed
                    ) modifies mw_iicRequestTx_any := {
reinaortega's avatar
reinaortega committed
                        sourceITS_scuId := p_sourceItsScuId, 
                        destinationITS_scuId := p_destinationItsScuId, 
garciay's avatar
garciay committed
                        pduRequest := { 
                            requests := { 
reinaortega's avatar
reinaortega committed
                                mi_rreq := p_miReqReq 
garciay's avatar
garciay committed
                            } // End of 'requests' field 
                        } // End of 'pduRequest' field 
                    } // End of template mdw_iicRequestTx_miRequestRequest 
garciay's avatar
garciay committed
                    
garciay's avatar
garciay committed
                    /**
                     * @desc    Receive template for IICresponseTX message with success status
reinaortega's avatar
reinaortega committed
                     * @param   p_sourceItsScuId       The source ITS-SCU-ID
                     * @param   p_destinationItsScuId  The destination ITS-SCU-ID
                     * @param   p_mi_rcmd               The MI-COMMAND.confirm message