LibItsFntp_Functions.ttcn3 45.9 KB
Newer Older
        /**
         * @desc    Get the  host scuID value
         * @return  The host scuID value
         * @see     PX_HOST_SCU_ID
         * @verdict Unchanged
         */
        function f_getIutHostScuIdValue() return ITS_scuId {
            return PX_HOST_SCU_ID;
        }
        
        /**
         * @desc    Get a service port number
         * @return  The service port number
         * @see     PX_SERVICE_PORT
         * @verdict Unchanged
         */
        function f_getIutServicePortValue() return PortNumber {
            return PX_SERVICE_PORT;
        }
        
        /**
         * @desc   Get the reception access parameter
         * @return The reception access parameter
         * @see PX_CIP_RX_SETTINGS
         * @verdict Unchanged
         */
        function f_getIutRXcipValue() return RXcip {
            return PX_CIP_RX_SETTINGS;
        }
        
        /**
         * @desc   Get the transmission access parameter
         * @return The transmission access parameter
         * @see PX_CIP_TX_SETTINGS
         * @verdict Unchanged
         */
        function f_getIutTXcipValue() return TXcip {
            return PX_CIP_TX_SETTINGS;
        }
        
        /**
         * @desc    Get the remote port number value
         * @return  The remote port number value
         * @see     PX_REMOTE_PORT_NUMBER
         * @verdict Unchanged
         */
        function f_getIutRemotePortNumberValue() return PortNumber {
            return PX_REMOTE_PORT_NUMBER;
        } // End of function f_getIutRemotePortNumberValue
        
        /**
         * @desc    Get the second remote port number value
         * @return  The second remote port number value
         * @see     PX_SECOND_REMOTE_PORT_NUMBER
         * @verdict Unchanged
         */
        function f_getIutSecondRemotePortNumberValue() return PortNumber {
            return PX_SECOND_REMOTE_PORT_NUMBER;
        } // End of function f_getIutSecondRemotePortNumberValue
        
    } // End of group iutFunctions
    
    group fntpAltsteps {
        
        /**
         * @desc The base default.
         */
        altstep a_fntpDefault() runs on ItsNt {
            // FIXME Check why TTWB detect an error here?
//            [] fntpPort.receive(mw_fntpInSapPrimitiveReq(mw_inUnitDataReq_any)) {
//                log("*** a_fntpDefault: INFO: IN-UNITDATA.request received in default ***");
//                repeat;
//            }
// FIXME Add support of response to NF-FNTP-PORT.confirm & NF-FNTP-COMM.confirm
            [] fntpPort.receive {
                log("*** a_fntpDefault: INFO: Unkown FNTP NDPU received in default ***");
                repeat;
            }
            [] tc_wait.timeout {
                log("*** a_fntpDefault: ERROR: Timeout while awaiting reaction of the IUT prior to Upper Tester action ***");
                f_selfOrClientSyncAndVerdict("error", e_timeout);
            }
            [] tc_ac.timeout { // For security because it should be done in main altsetp bloc
                log("*** a_fntpDefault: ERROR: Timeout while awaiting the reception of a message ***");
                f_selfOrClientSyncAndVerdict("error", e_timeout);
            }
            [] any timer.timeout {
                log("*** a_fntpDefault: INCONC: An unknown timer has expired in default ***"); 
                f_selfOrClientSyncAndVerdict("error", e_timeout);
            }
            [] a_shutdown() {
                f_poDefault();
                log("*** a_fntpDefault: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***");
                if(self == mtc) {
                    f_cf01Down();
                }
                stop;
            }
        } // End of altstep a_fntpDefault()
        
        /**
         * @desc Default handling cf01 de-initialisation.
         */
        altstep a_cf01Down() runs on ItsNt {
            [] a_shutdown() {
                f_poDefault();
                f_cf01Down();
                log("*** a_cf01Down: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***");
                stop;
            }
        } // End of altstep a_cf01Down()
        
        /**
         * @desc Default handling cf02 de-initialisation.
         */
        altstep a_cf02Down() runs on ItsNt {
            [] a_shutdown() {
                f_poDefault();
                f_cf02Down();
                log("*** a_cf02Down: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***");
                stop;
            }
        } // End of altstep a_cf02Down()
        
    } // End of group fntpAltsteps
    
} // End of module LibItsFntp_Functions