LibItsFsap_Templates.ttcn3 15.6 KB
Newer Older
garciay's avatar
garciay committed
/**
 *  @author     ETSI / STF422_EETS
 *  @version    $URL:$
 *              $Id:$
 *  @desc       Templates definitions for Fast service advertisement protocol (ISO 24102-5)
 */
module LibItsFsap_Templates {
    
    // LibIts
    import from CALMmanagement language "ASN.1:1997" {
        type 
            ITS_scuId, StationID
    };
    import from CITSapplMgmtApplReg language "ASN.1:1997" {
        type 
            ITSaid
    };
    import from CALMmsap language "ASN.1:1997" {
        type 
            MF_Command, 
            MF_Request_request, MF_Request 
    };
garciay's avatar
garciay committed
    import from CALMllsap language "ASN.1:1997" {
        type
            IN_SAPaddress, Link_ID, 
		 	UserPriority 
    };
    import from CALMfsap language "ASN.1:1997" {
        type 
            ApplicationID, 
            CTX, CTXrxNot, GCctxTxCmd,  GCregServer, GCregClient, GCderegClient, GCschedule, 
            ServiceDataReg, SAMserviceData, 
garciay's avatar
garciay committed
            SAM, SAMrxNot 
    };
    import from LibItsFsap_Pixits {
        modulepar PX_USER_PRIORITY
    };
garciay's avatar
garciay committed
    import from LibItsCommon_TypesAndValues all;
    
    group fsapPrimitives {
    
        group utPrimitives {
        
            /**
             * @desc    Initializes the FSAP IUT
garciay's avatar
garciay committed
             */
            template (value) UtInitialize m_fsapInitialize := {
                utFsapInitialize := {
                }
            } // End of template m_fsapInitialize
            
            /**
             * @desc    TODO
             * @param   p_mfRequestReq TODO
             */
            template (value) UtCommandRequest m_generateMFRequestReq( 
                in template (value) MF_Request_request p_mfRequestReq 
            ) := { 
                utFsapCommandRequest := {
                    mfRequestReq := p_mfRequestReq
                } // End of field 'utFsapCommandRequest'
            } // End of template m_generateMFRequestReq
garciay's avatar
garciay committed
            
        } // End of group utPrimitives
        
        group taPrimitives {
            
            /***
             * @desc  TODO
             * @param p_serverID TODO
             */
            template (value) SAM m_sam(
                in template (value) StationID p_serverID
            ) := {
                fmtID := 0, // FIXME Use PIXIT PX_FMTID_SAM
                version := 0, // FIXME Use PIXIT PX_VERSIONFSAP
                serverID := p_serverID,
                serviceList := { },
                channelList := { },
                ipServList := { }
            } // End of template m_sam
            
            /***
             * @desc  TODO
             * @param p_clientID TODO
             */
            template (value) CTX m_ctx(
                in template (value) StationID p_clientID
            ) := {
                fmtID := 0, // FIXME Use PIXIT PX_FMTID_CTX
                version := 0, // FIXME Use PIXIT PX_VERSIONFSAP
                clientID := p_clientID,
                servContextList := { },
                ipContextList := { }
            } // End of template m_ctx
            
        } // End of group taPrimitives
        
        group cregServerMessagePDU {
            
            group send_ {
                
                template (value) MF_Request m_mfRequest_GCregServer(
                    in template (value) ApplicationID p_applicationID,
                    in template (value) GCschedule p_gCschedule,
                    in template (value) ServiceDataReg p_serviceDataReg
                ) := {
                    fill := '0000'B,
                    mfReq := {
                        gCregServer := {
                            applicationID := p_applicationID,
                            gCschedule := p_gCschedule,
                            priority := PX_USER_PRIORITY,
                            serviceDataReg := p_serviceDataReg
                        } //  // End of field 'gCregServer'
                    } // End of field 'mfReq'
                } // End of template m_mfRequest_GCregServer
                
            } // End of group send_
garciay's avatar
garciay committed
            
            group recv_ {
                
                template GCregServer mw_gCregServer_any := {
                    applicationID := {
                        hostITS_scuId := ?,
                        seqNumber := ?
                    }, // End of field applicationID''
                    gCschedule := ?,
                    priority := ?,
                    serviceDataReg := {
                        fill := ?,
                        datareg := {
                            nonipData := ?
                        } // End of field 'datareg'
                    } // End of field 'serviceDataReg'
                } // End of template mw_gCregServer
                
            } // End of group recv_
garciay's avatar
garciay committed
            
        } // End of group cregServerMessagePDU
        
        group cregClientMessagePDU {
            
            group send_ {
                
                /**
                 * @desc ITS-S application shall register its supported service at the groupcasting manager using the services of the groupcasting registration handler
                 * @param p_hostITS_scuId  The ITS-SCU-ID of the ITS-S host where the service provider ITS-S application resides together with an ITS-S application reference number being unique at this ITS-SCU
                 * @param p_serviceID      The globally unique ITS-AID of the ITS-S application
                 * 
                 * See ISO/CD 24102-5 Clause 8.5
                 */
                template (value) MF_Request m_mfRequest_GCregClient(
                    in template (value) ApplicationID p_applicationID,
                    in template (value) ITSaid p_serviceID
                ) := {
                    fill := '0000'B,
                    mfReq := {
                        gCregClient := {
                            applicationID := p_applicationID,
                            priority := PX_USER_PRIORITY,
                            serviceID := p_serviceID,
                            contextData := ''O
                        } // End of field 'gCregClient'
                    } // End of field 'mfReq'
                } // End of template m_mfRequest_GCregServer
                
            } // End of group send_
garciay's avatar
garciay committed
            
            group recv_ {
                
                template (value) GCregClient m_gCregClient(
                    in template (value) ITS_scuId p_hostITS_scuId,
                    in template (value) ITSaid p_serviceID
                ) := {
                    applicationID := {
                        hostITS_scuId := p_hostITS_scuId,
                        seqNumber := 0
                    }, // End of 'applicationID' field
                    priority := 0,
                    serviceID := p_serviceID,
                    contextData := ''O
                } // End of template m_gCregClient
                
                /**
                 * @desc  Confirmation of the ITS-S application shall deregistration
                 * @param p_hostITS_scuId  The ITS-SCU-ID of the ITS-S host where the service provider ITS-S application resides together with an ITS-S application reference number being unique at this ITS-SCU
                 * @param p_serviceID      The globally unique ITS-AID of the ITS-S application
                 * 
                 * See ISO/CD 29281-2 Clause 8.1 
                 * See ISO/CD 24102-5 Clause 8.3.1
                 */
                template GCregClient mw_gCregClient(
                    in template (present) ITS_scuId p_hostITS_scuId,
                    in template (present) ITSaid p_serviceID
                ) := {
                    applicationID := {
                        hostITS_scuId := p_hostITS_scuId,
                        seqNumber := ?
                    }, // End of 'applicationID' field
                    priority := ?,
                    serviceID := p_serviceID,
                    contextData := ?
                } // End of template mw_gCregClient
                
            } // End of group cregMessagePDU
garciay's avatar
garciay committed
            
        } // end of group recv_
garciay's avatar
garciay committed
        
        group cderegClientMessagePDU {
            
            /**
             * @desc ITS-S application shall deregister its supported service at the groupcasting manager using the services of the groupcasting registration handler
             * @param p_hostITS_scuId  The ITS-SCU-ID of the ITS-S host where the service provider ITS-S application resides together with an ITS-S application reference number being unique at this ITS-SCU
             * 
             * See ISO/CD 24102-5 Clause 8.3.3
             */
            template (value) GCderegClient m_gCderegClient(
                in template (value) ITS_scuId p_hostITS_scuId
            ) := {
                applicationID := {
                    hostITS_scuId := p_hostITS_scuId,
                    seqNumber := 0
                }
            } // End of template m_gCderegClient
            
            /**
             * @desc  Confirmation of the ITS-S application shall deregistration
             * @param p_hostITS_scuId  The ITS-SCU-ID of the ITS-S host where the service provider ITS-S application resides together with an ITS-S application reference number being unique at this ITS-SCU
             * 
             * See ISO/CD 29281-2 Clause 8.1 
             * See ISO/CD 24102-5 Clause 8.3.3
             */
            template GCderegClient mw_gCderegClient(
                in template (present) ITS_scuId p_hostITS_scuId
            ) := {
                applicationID := {
                    hostITS_scuId := p_hostITS_scuId,
                    seqNumber := ?
                }
            } // End of template mw_gCderegClient
            
        } // End of group cderegClientMessagePDU
        
        group samMessagePDU {
            
            template (value) SAMrxNot m_sAMrxNot(
                in template (value) IN_SAPaddress p_csap,
                in template (value) Link_ID p_linkID,
                in template (value) StationID p_serverID
            ) := {
                link := {
                    csap := p_csap,
                    linkID := p_linkID
                },
                sam := {
                    fmtID := 0, // FIXME Use PIXIT PX_FMTID_CTX
                    version := 0, // FIXME Use PIXIT PX_VERSIONFSAP
                    serverID := p_serverID,
                    serviceList := { },
                    channelList := { },
                    ipServList := { }
                }
            } // End of template m_sAMrxNot
            
            /**
             * @desc 
             */
            template MF_Command mw_mfCommad_gCSAM(
                in template (present) ApplicationID p_applicationID,
                in template (present) StationID p_serverID,
                in template (present) SAMserviceData p_serviceData
            ) := {
                fill := ?,
                mfCmd := {
                    gCsam := {
                        applicationID := p_applicationID,
                        serverID := p_serverID,
                        serviceData := p_serviceData
                    } // End of header 'gCsam'
                } // End of header 'mfCmd'
            } // End of template mw_mfCommad_gCSAM
            
garciay's avatar
garciay committed
            template SAMrxNot mw_sAMrxNot(
                in template (present) IN_SAPaddress p_csap,
                in template (present) Link_ID p_linkID,
                in template (present) StationID p_serverID
            ) := {
                link := {
                    csap := p_csap,
                    linkID := p_linkID
                },
                sam := {
                    fmtID := 0, // FIXME Use PIXIT PX_FMTID_CTX
                    version := 0, // FIXME Use PIXIT PX_VERSIONFSAP
                    serverID := p_serverID,
                    serviceList := ?,
                    channelList := ?,
                    ipServList := ?
                }
            } // End of template m_sAMrxNot
            
        } // End of group samMessagePDU
        
        group ctxMessagePDU {
            
            /**
             * @desc Send "Service Table Context" (STC) to FAST networking protocol for the purpose of unicast delivery to the selected peer station
             * @param p_csap      Source address - see ISO 21218 Clause 5.4.2.1 & 5.4.2.2
             * @param p_linkID    Destination link ID - see ISO 21218 Clause 5.4.2.2
             * @param p_clientID  Station ID of the client ITS station
             * 
             * See ISO/CD 24102-5 Clause 7.2.3
             */
            template (value) GCctxTxCmd m_gCctxTxCmd(
                in template (value) IN_SAPaddress p_csap,
                in template (value) Link_ID p_linkID,
                in template (value) StationID p_clientID
            ) := {
                link := {
                    csap := p_csap,
                    linkID := p_linkID
                },
                ctx := {
                    fmtID := 0, // FIXME Use PIXIT PX_FMTID_CTX
                    version := 0, // FIXME Use PIXIT PX_VERSIONFSAP
                    clientID := p_clientID,
                    servContextList := { },
                    ipContextList := { }
                }
            } // End of template m_gCctxTxCmd
            
            /**
             * @desc  TODO
             * @param p_csap        TODO
             * @param p_linkID      TODO
             * @param p_clientID    TODO
             */
            template (value) CTXrxNot m_cTXrxNot(
                in template (value) IN_SAPaddress p_csap,
                in template (value) Link_ID p_linkID,
                in template (value) StationID p_clientID
            ) := {
                link := {
                    csap := p_csap,
                    linkID := p_linkID
                },
                ctx := {
                    fmtID := 0, // FIXME Use PIXIT PX_FMTID_CTX
                    version := 0, // FIXME Use PIXIT PX_VERSIONFSAP
                    clientID := p_clientID,
                    servContextList := { },
                    ipContextList := { }
                }
            } // End of template m_cTXrxNot
            
            /**
             * @desc  Confirmation of Service context message transmission
             * @param p_csap      Source address - see ISO 21218 Clause 5.4.2.1 & 5.4.2.2
             * @param p_linkID    Destination link ID - see ISO 21218 Clause 5.4.2.2
             * @param p_clientID  Station ID of the client ITS station
             * 
             * See ISO/CD 24102-5 Clause 7.2.3
             */
            template GCctxTxCmd mw_gCctxTxCmd(
                in template (present) IN_SAPaddress p_csap,
                in template (present) Link_ID p_linkID,
                in template (present) StationID p_clientID
            ) := {
                link := {
                    csap := p_csap,
                    linkID := p_linkID
                },
                ctx := {
                    fmtID := 0, // FIXME Use PIXIT PX_FMTID_CTX
                    version := 0, // FIXME Use PIXIT PX_VERSIONFSAP
                    clientID := p_clientID,
                    servContextList := ?,
                    ipContextList := ?
                }
            } // End of template mw_gCctxTxCmd
            
        } // End of group ctxMessagePDU
        
    } // End of group fsapPrimitives
    
} // End of module LibItsFsap_Templates