Commit 5d495689 authored by garciay's avatar garciay
Browse files

Bug fixed after first IICP validation

parent 8c96ac57
Loading
Loading
Loading
Loading
+28 −116
Original line number Diff line number Diff line
@@ -161,21 +161,7 @@ module LibItsIicp_Functions {
        function f_utIicpEvent( 
            in template (value) UtIicpEvent p_utIicpEvent 
        ) runs on ItsCalm { 
            var UtIicpEventInd v_utIicpEventInd;
            
            utPort.send(p_utIicpEvent);
/*            tc_noac.start;
            alt {
                [] utPort.receive(UtIicpEventInd:?) -> value v_utIicpEventInd { // FIXME Use altstep for UtPort
                    tc_noac.stop;
                    log("*** f_utIicpEvent: INFO: Unexpected message was received ***", v_utIicpEventInd);
                    // FIXME Check the content of the notification, not sure which fields should be set - repeat;
                }
                [] tc_noac.timeout {
                    log("*** f_utIicpEvent: INFO: CommandRequest succeed ***");
                }
            } // End of 'alt' statement 
*/
        } // End of function f_utIicpEvent
        
    } // End of group utFunctions
@@ -186,98 +172,34 @@ module LibItsIicp_Functions {
    group whenFunctions { 
        
        /**
         * @desc    Send a NFsapPrimitivesDown primitive and do not wait for the NFsapPrimitivesDown confirm response
         * @param   p_utIicpEvent    The NFsapPrimitivesDown primitive
         * @desc    Send a IIC-Request primitive
         * @param   p_IIC_Request    The IIC-Request primitive
         * @verdict Unchanged on success, fail otherwise
         */
        function f_iicpEvent( 
        function f_iicpEvent_IIC_Request( 
                                         in template (value) IIC_Request p_IIC_Request 
        ) runs on ItsCalm { 
            iicpPort.send(
                m_iicpReq(
                    p_IIC_Request
            ));
        } // End of function f_iicpEvent
        
    } // End of group whenFunctions
        } // End of function f_iicpEvent_IIC_Request
        
        /**
     * @desc Config tester functions
     */
    group cfFunctions { 
        
        /**
         * @desc    Requests to initialize the configuration tester 
         * @param   p_cfInitialize The initialisation to trigger.
         * @desc    Send a IIC-Request primitive
         * @param   p_IIC_Request    The IIC-Request primitive
         * @verdict Unchanged on success, fail otherwise
         */
/*        function f_cfIicpInitialize(template (value) CfInitialize p_cfInitialize) runs on ItsCalm {
        
            cfPort.send(p_cfInitialize);
            tc_wait.start;
            alt {
                [] cfPort.receive(CfResult:true) {
                    tc_wait.stop;
                    log("*** f_cfIicpInitialize: INFO: Configuration tester initialized ***");
                }
                [] cfPort.receive {
                    tc_wait.stop;
                    log("*** f_cfIicpInitialize: INFO: Configuration tester could not be initialized ***");
                    f_selfOrClientSyncAndVerdict("error", e_error);
                }
                [] tc_wait.timeout {
                    log("*** f_cfIicpInitialize: INFO: Configuration tester could not be initialized in time ***");
                    f_selfOrClientSyncAndVerdict("error", e_timeout);
                }
                [else] { // Shortcut defaults
                    repeat; 
                }
            } // End of 'alt' statement 

        } // End of function f_cfIicpInitialize 
*/        
        /**
         * @desc    Await for notification on MN-SAP 
         * @param   p_cfIicpEventInd    The MN_Request_request notification message.
         * @param   p_discard           Set to true if responses shall be discard, otherwise the function failed 
         * @verdict Unchanged on success, fail otherwise
         */
/*        function f_cfIicpAwaitNotificationToManagement( 
            in template CfIicpEventInd p_cfIicpEventInd, 
            in boolean p_discard 
        function f_iicpEvent_IIC_Response( 
                                          in template (value) IIC_Response p_IIC_Response 
        ) runs on ItsCalm { 
            var CfIicpEventInd p_result;
            
            log("*** f_cfIicpAwaitNotificationToManagement: INFO: Expected event: ", p_cfIicpEventInd, " ***");
            tc_wait.start;
            alt {
                [] cfPort.receive(p_cfIicpEventInd) {
                    tc_wait.stop;
                    log("*** f_cfIicpAwaitNotificationToManagement: INFO: Notification event received ***");
                }
                [] cfPort.receive(CfIicpEventInd: ?) -> value p_result { 
                    if (p_discard == false) { 
                        tc_wait.stop;
                        log("*** f_cfIicpAwaitNotificationToManagement: ERROR: Another event indicated at application layer ***", p_result);
                        f_selfOrClientSyncAndVerdict("error", e_timeout);
                    } else { 
                        log("*** f_cfIicpAwaitNotificationToManagement: INFO: Another event indicated at application layer, repeating check ***");
                        repeat;
                    } 
                }
                [] tc_wait.timeout {
                    if (p_discard == false) { 
                        log("*** f_cfIicpAwaitNotificationToManagement: ERROR: Timeout while waiting for event check result ***");
                        f_selfOrClientSyncAndVerdict("error", e_timeout);
                    } else { 
                        log("*** f_cfIicpAwaitNotificationToManagement: INFO: Event not indicated at application layer ***");
                    }
                }
            } // End of 'alt' statement
            iicpPort.send(
                m_iicpResp(
                    p_IIC_Response
            ));
        } // End of function f_iicpEvent_IIC_Response
        
        } // End of function f_cfIicpAwaitNotificationToManagement
*/    
    } // End of group cfFunctions
    } // End of group whenFunctions
    
    /**
     * @desc Test adapter setting functions
@@ -292,9 +214,7 @@ module LibItsIicp_Functions {
        function f_cf01Up() runs on ItsCalm {
            
            // Map
//            map(self:acPort, system:acPort);
            map(self:utPort, system:utPort);
//            map(self:cfPort, system:cfPort);
            map(self:iicpPort, system:iicpPort);
            
            // Connect
@@ -319,9 +239,7 @@ module LibItsIicp_Functions {
            deactivate;
            
            // Unmap
//            unmap(self:acPort, system:acPort);
            unmap(self:utPort, system:utPort);
//            unmap(self:cfPort, system:cfPort);
            unmap(self:iicpPort, system:iicpPort);
            
            // Disconnect
@@ -376,21 +294,6 @@ module LibItsIicp_Functions {

        } // End of function f_sendAliveMessage
        
        /**
         * @desc    Triggers a response command event in the test system adaptation.
         * @param   p_rCmd The remote commad to trigger
         * @return  FncRetCode
         */
/*        function f_iicpTriggerResponse(
            in template (value) IIC_Response p_rCmd
        ) runs on ItsCalm return FncRetCode {
            var FncRetCode v_ret := e_success;
            
            iicpPort.send(m_iicpResp(p_rCmd));
            
            return v_ret;
        }*/
        
    } // End of group messagesTriggering
    
    group iicpAltsteps {
@@ -624,13 +527,22 @@ module LibItsIicp_Functions {
            return PX_MI_RCMD_REGTYPE;
        }
        
        /**
         * @desc    Get the Link_ID value used for remote command
         * @return  The MI-Request value used for remote command
         * @see     PX_MI_RCMD_REGTYPE
         */
        function f_getIutRemoteCmdForMiRequestLinkID() return Link_ID {
            return PX_MI_RCMD_LINKID;
        }
        
        /**
         * @desc    Get the MM-Command value used for remote command
         * @return  The MM-Command value used for remote command
         * @see     PX_MN_RCMD_STATECINOTIFY
         */
        function f_getIutRemoteCmdForMnCommand() return DeleteFNTP {
            return PX_MN_RCMD_STATECINOTIFY;
            return PX_MN_RCMD_FWTDELETEFNTP;
        }
        
        /**
+10 −1
Original line number Diff line number Diff line
@@ -100,7 +100,7 @@ module LibItsIicp_Pixits {
     * @desc MN-Command value used for IICP/COM/xx TPs
     * NOTE that this PIXIT is used just for compiling purposes. The real PIXIT shall be written according to the IUT capabilities
     */
    modulepar DeleteFNTP PX_MN_RCMD_STATECINOTIFY := {
    modulepar DeleteFNTP PX_MN_RCMD_FWTDELETEFNTP := {
        reference := 10 
    } 
    
@@ -140,6 +140,15 @@ module LibItsIicp_Pixits {
        medType := 10 // FIXME Check why TTWB does not accespt MedType_iso17515_
    }
    
    /**
     * @desc Link-ID used for remote command
     * NOTE that this PIXIT is used just for compiling purposes. The real PIXIT shall be written according to the IUT capabilities
     */
    modulepar Link_ID PX_MI_RCMD_LINKID := {
        remoteCIID := '0000000000000000'O, 
        localCIID := '0000000000000000'O 
    } 
    
    /**
     * @desc MF-Command value used for IICP/COM/xx TPs
     * NOTE that this PIXIT is used just for compiling purposes. The real PIXIT shall be written according to the IUT capabilities
+305 −108

File changed.

Preview size limit exceeded, changes collapsed.

+40 −28
Original line number Diff line number Diff line
@@ -14,8 +14,13 @@ module LibItsIicp_TypesAndValues {
    import from CALMiitsscu language "ASN.1:1997" {
        type 
            McmdRq, McmdRs, 
            SimUt/*, 
            IICPpdu*/ // TODO Check if CfEventInd should be used 
            SimUt 
    };
	import from CALMmsap language "ASN.1:1997" {
        type 
		    MF_Command_request, MF_Command_confirm, MN_Command_request, MN_Command_confirm, MI_Command_request, MI_Command_confirm, 
		    MF_Request_request, MN_Request_request, MI_Request_request, 
		    MI_Get_request, MI_Set_request, MI_Get_confirm, MI_Set_confirm  
    };
    
    group utPrimitives {
@@ -37,50 +42,57 @@ module LibItsIicp_TypesAndValues {
         * @member mcmdRs McmdRs confirm 
         */
        type union UtIicpEvent { 
            McmdRs mcmdRs
            McmdRs mcmdRs,
			MF_Request_request mf_Request_request,
			MN_Request_request mn_Request_request,
			MI_Request_request mi_Request_request,
			MI_Get_request mi_Get_request,
			MI_Set_request mi_Set_request,
			MF_Command_confirm mf_Command_confirm, 
			MN_Command_confirm mn_Command_confirm, 
			MI_Command_confirm mi_Command_confirm,
			MI_Get_confirm mi_Get_confirm,
			MI_Set_confirm mi_Set_confirm
        }
        with {
            encode (mcmdRs) "LibItsIicp_asn1"  
            encode (mf_Request_request) "LibItsCALMmsap_asn1"  
            encode (mn_Request_request) "LibItsCALMmsap_asn1"  
            encode (mi_Request_request) "LibItsCALMmsap_asn1"  
            encode (mi_Get_request) "LibItsCALMmsap_asn1"  
            encode (mi_Set_request) "LibItsCALMmsap_asn1"  
            encode (mf_Command_confirm) "LibItsCALMmsap_asn1"  
            encode (mn_Command_confirm) "LibItsCALMmsap_asn1"  
            encode (mi_Command_confirm) "LibItsCALMmsap_asn1"  
            encode (mi_Get_confirm) "LibItsCALMmsap_asn1"  
            encode (mi_Set_confirm) "LibItsCALMmsap_asn1"  
        }
        
        /**
         * @desc Send a IICPpdu primitive from Facility layer through a SAP. FIXME Check the comment
         * @member TODO IICPpdu primitive 
         * @member mcmdRq McmdReq data structure 
         */
        type union UtIicpEventInd { 
            McmdRq mcmdRq
            McmdRq mcmdRq,
			MF_Command_request mf_Command_request, 
			MN_Command_request mn_Command_request, 
			MI_Command_request mi_Command_request, 
			MI_Get_request mi_Get_request, 
			MI_Set_request mi_Set_request 
        }
        with {
            encode (mcmdRq) "LibItsIicp_asn1"  
            encode (mf_Command_request) "LibItsCALMmsap_asn1"  
            encode (mn_Command_request) "LibItsCALMmsap_asn1"  
            encode (mi_Command_request) "LibItsCALMmsap_asn1"  
            encode (mi_Get_request) "LibItsCALMmsap_asn1"  
            encode (mi_Set_request) "LibItsCALMmsap_asn1"  
        }
        
    } with {
        encode "UpperTester"
    } // End of group utPrimitives
    
    group cfPrimitives {
        
        /**
         * @desc Trigger to initialize the IUT.
         */
        type record CfIicpInitialize {  
        }
        
        /**
         * @desc Send a IICPpdu primitive to the Management layer through a SAP. FIXME Check the comment
         * @member IICPpdu primitive 
         */
/*        type union CfIicpEventInd { 
            IICPpdu pduRequest
        }
        with {
            encode (pduRequest) "LibItsIicp_asn1"  
        }*/
    
    } with {
        encode "ConfigTester"
    } // End of group cfPrimitives
    
}
with {
    encode "LibItsIicp"
+12 −19
Original line number Diff line number Diff line
@@ -43,8 +43,7 @@ module LibItsCalm_Interface {
    };
    import from LibItsIicp_TypesAndValues { 
        type 
            UtIicpInitialize, UtIicpEventInd, UtIicpEvent,
            CfIicpInitialize//FIXME To be removed, CfIicpEventInd
            UtIicpInitialize, UtIicpEventInd, UtIicpEvent
    }; 
    import from LibItsAtsp_TypesAndValues { 
        type 
@@ -99,10 +98,7 @@ module LibItsCalm_Interface {
         * @desc Test component for ITS Management layer 
         * @member utPort        Upper tester port 
         * @member acPort        TA configuration port 
         * @member iicpPort        TODO 
//         * @member fsapPort        TODO 
//         * @member mgtMfSapPort    TODO
//         * @member mgtMnSapPort    TODO
         * @member iicpPort      IICP protocol port
         */
        type component ItsMgt extends ItsBaseComponent {
            
@@ -155,7 +151,7 @@ module LibItsCalm_Interface {
            group mgt1Ports {
                
                /**
                 * @desc MGT1 IISC Port (IISC/LAN) 
                 * @desc MGT1 IICP Port (IICP/LAN) 
                 */
                type port IicpPort message {
                    inout
@@ -222,13 +218,12 @@ module LibItsCalm_Interface {
            group mgt1Primitives {
                
                /**
                 * @desc MGT1 IISC Request Primitive 
                 * @desc MGT1 IICP Request Primitive 
                 */
                type record IicpReq {
                    IIC_Request msgOut 
                    IicpMsg msgOut 
                }
                with { 
                    encode (msgOut) "LibItsIicp_asn1"
                    encode "LibIts_Interface"
                }
                
@@ -236,16 +231,16 @@ module LibItsCalm_Interface {
                 * @desc TODO
                 */
                type union IicpMsg {
                    IIC_Request     msgIn_req,
                    IIC_Response    msgIn_resp 
                    IIC_Request     msg_req,
                    IIC_Response    msg_resp 
                } with { 
                    encode (msgIn_req) "LibItsIicp_asn1";
                    encode (msgIn_resp) "LibItsIicp_asn1";
                    encode (msg_req) "LibItsIicp_asn1";
                    encode (msg_resp) "LibItsIicp_asn1";
                    encode "LibIts_Interface"
                }                

                /**
                 * @desc MGT1 IISC Request/Indication Primitive 
                 * @desc MGT1 IICP Request/Indication Primitive 
                 */
                type record IicpInd {
                    IicpMsg msgIn, 
@@ -394,7 +389,7 @@ module LibItsCalm_Interface {
        /**
         * @desc Upper Tester message describing an action/event 
         */
        type union UtEvent { // TODO To be removed
        type union UtEvent { // TODO To be moved into each library (cf. CAM/DENM)
            UtFntpEvent utFntpEvent, 
            UtFsapEvent utFsapEvent,
            UtAtspEvent utAtspEvent
@@ -403,7 +398,7 @@ module LibItsCalm_Interface {
        /**
         * @desc Upper Tester message describing an incoming event 
         */
        type union UtEventInd { // TODO To be removed
        type union UtEventInd { // TODO To be moved into each library (cf. CAM/DENM)
            UtFntpEventInd utFntpEventInd, 
            UtFsapEventInd utFsapEventInd,
            UtAtspEventInd utAtspEventInd
@@ -426,14 +421,12 @@ module LibItsCalm_Interface {
        type union CfInitialize {
            CfFntpInitialize cfFntpInitialize, 
            CfFsapInitialize cfFsapInitialize,
//            CfIicpInitialize cfIicpInitialize,
            CfAtspInitialize cfAtspInitialize
        }

        type union CfEventInd { 
            CfFntpEventInd cfFntpEventInd, 
            CfFsapEventInd cfFsapEventInd,
//FIXME To be removed            CfIicpEventInd cfIicpEventInd,
            CfAtspEventInd cfAtspEventInd
        }
        
Loading