Commit f19b5f7a authored by mogos's avatar mogos
Browse files

* configurationTemplates are now constants

* split events and commands between mno and modem
* renamed ConfigParameters to ModemConfiguration
parent f5ee671e
Loading
Loading
Loading
Loading
+201 −244
Original line number Diff line number Diff line
@@ -57,7 +57,6 @@ module LibItsECall_Templates {
        }
    }


    /**
     * @desc Same as expandMsd but only works on values
     *
@@ -77,54 +76,6 @@ module LibItsECall_Templates {
        return p_eCallMessageUnion;
    }
    
    /**
     * @desc 
     */
    template ECallMessageUnion ANY_DECODED_ECALL := { decoded := ? }

    group configurationTemplates {
        
        /**
         * @desc Default IVS simulator configuration
         */
        template (value) ConfigParameters m_defaultIVSSimulatorConfiguration := {
            mode := IVS,
            t3Timer := 2.0,
            t5Timer := 2.0,
            t6Timer := 5.0,
            t7Timer := 20.0,
            eCallMessage := f_expandMsdValue(PX_ECALL_MESSAGE),
            inbandState := OFF,
            inbandControl := AUTO,
            inbandDirection := PULL,
            internalSubscriber := "",
            ignoreAlClearDown := false,
            simulateCrcError := false
        }
        
        /**
         * @desc Default PSAP simulator configuration
         */
        template (value) ConfigParameters m_defaultPsapSimulatorConfiguration := {
            mode := PSAP,
            t4Timer := 2.0,
            t6Timer := 5.0,
            t8Timer := 20.0,
            sendNecDisabler := false,
            numberOfAlAcks := 4,
            numberOfLlAcks := 4,
            automaticAlAck := true,
            alAckValue := 0,
            inbandState := OFF,
            inbandControl := AUTO,
            inbandDirection := PULL,
            internalSubscriber := "",
            simulateCrcError := false,
            ignoreSendSignal := false
        }    
    
    } // end configurationTemplates
    
    group eventTemplates {
        
        group anyEventTemplates {
@@ -136,13 +87,6 @@ module LibItsECall_Templates {
                configChanged := ?
            }

            /**
             * @desc Receive template for any CallOutgoing event
             */
            template Event mw_anyCallOutgoing := {
                callOutgoing := ?   
            }
            
            /**
             * @desc Receive template for any InbandNackSent event
             */
@@ -157,27 +101,6 @@ module LibItsECall_Templates {
                inbandSendSignalReceived := ?
            }
            
            /**
             * @desc Receive template for any CallRejected event
             */
            template Event mw_anyCallRejected := {
                callRejected := ?   
            }
            
            /**
             * @desc Receive template for any CallAborted event
             */
            template Event mw_anyCallAborted := {
                callAborted := ?   
            }
            
            /**
             * @desc Receive template for any CallHangUp event
             */
            template Event mw_anyCallHangUp := {
                callHangUp := ?   
            }
            
            /**
             * @desc Receive template for any TimerExpired event
             */
@@ -196,7 +119,7 @@ module LibItsECall_Templates {
        template Event mw_ivsConfigChanged (
            template(present) integer p_worker,
            template(present) charstring p_time,
            template(present) ConfigParameters p_parameters
            template(present) ModemConfiguration p_parameters
        ) := {
            configChanged := {
                worker := p_worker,
@@ -235,7 +158,7 @@ module LibItsECall_Templates {
        template Event mw_psapConfigChanged (
            template(present) integer p_worker,
            template(present) charstring p_time,
            template(present) ConfigParameters p_parameters
            template(present) ModemConfiguration p_parameters
        ) := {
            configChanged := {
                worker := p_worker,
@@ -439,13 +362,119 @@ module LibItsECall_Templates {
            }
        }
        
        /**
         * @desc  Receive template for CallVoiceConnectionEstablished event
         * @param p_worker  Target worker process
         * @param p_time    Event timestamp
         */
        template Event mw_callVoiceConnectionEstablished (
            template(present) integer p_worker,
            template(present) charstring p_time := ?
        ) :={
            callVoiceConnectionEstablished := {
                worker := p_worker,
                time := p_time
            }
        }
        
        /**
         * @desc  Receive template for InbandStartSignalReceived event
         * @param p_worker      Target worker process
         * @param p_time        Event timestamp
         * @param p_count
         * @param p_reliable
         */
        template Event mw_inbandStartSignalReceived (
            template(present) integer p_worker,
            template(present) charstring p_time := ?,
            template(present) PositiveInteger p_count := ?,
            template(present) boolean p_reliable := ?
        ) := {
            inbandStartSignalReceived := {
                worker := p_worker,
                time := p_time,
                count := p_count,
                reliable := p_reliable
            }
        }
        
        /**
         * @desc  Receive template for TimerExpired event
         * @param p_worker  Target worker process
         * @param p_time    Event timestamp
         * @param p_name    Timer name
         * @param p_val     Timer value in seconds
         */
        template Event mw_timerExpired (
            template(present) integer p_worker,
            template(present) charstring p_time := ?,
            template(present) charstring p_name := ?,
            template(present) float p_val := ?
        ) := {
            timerExpired := {
                worker := p_worker,
                time := p_time,
                name := p_name,
                val := p_val
            }
        }
        
        /**
         * @desc  Receive template for T7 expiration event
         * @param p_worker  Target worker process
         */
        template Event mw_t7Expired(
            template(present) integer p_worker
        ) := mw_timerExpired(p_worker, ?, "t7", ?);

        /**
         * @desc  Receveive template for T8 expiration event
         * @param p_worker  Target worker process
         */
        template Event mw_t8Expired(
            template(present) integer p_worker
        ) := mw_timerExpired(p_worker, ?, "t8", ?);
        
    } // end eventTemplates

    group mnoEventTemplates {
        group anyMnoEventTemplates {
            /**
             * @desc Receive template for any CallOutgoing event
             */
            template MnoEvent mw_anyCallOutgoing := {
                callOutgoing := ?
            }

            /**
             * @desc Receive template for any CallRejected event
             */
            template MnoEvent mw_anyCallRejected := {
                callRejected := ?
            }

            /**
             * @desc Receive template for any CallAborted event
             */
            template MnoEvent mw_anyCallAborted := {
                callAborted := ?
            }

            /**
             * @desc Receive template for any CallHangUp event
             */
            template MnoEvent mw_anyCallHangUp := {
                callHangUp := ?
            }
        }
        
        /**
         * @desc  Receive template for CallCancelled event
         * @param p_worker      Target worker process
         * @param p_time        Event timestamp
         * @param p_callRef     INTERNAL/EXTERNAL
         */
        template Event mw_callCanceled (
        template MnoEvent mw_callCanceled (
            template(present) integer p_worker,
            template(present) charstring p_time := ?,
            template(present) CallRefType p_callRef := EXTERNAL
@@ -465,7 +494,7 @@ module LibItsECall_Templates {
         * @param p_to          Calling ID
         * @param p_callRef     INTERNAL/EXTERNAL
         */
        template Event mw_callIncoming (
        template MnoEvent mw_callIncoming (
            template(present) integer p_worker,
            template(present) charstring p_time,
            template(present) TelephoneNumber p_from,
@@ -489,7 +518,7 @@ module LibItsECall_Templates {
         * @param p_to          Calling ID
         * @param p_callRef     INTERNAL/EXTERNAL
         */
        template Event mw_callOutgoing (
        template MnoEvent mw_callOutgoing (
            template(present) integer p_worker,
            template(present) charstring p_time,
            template(present) TelephoneNumber p_from,
@@ -511,7 +540,7 @@ module LibItsECall_Templates {
         * @param p_time        Event timestamp
         * @param p_callRef     INTERNAL/EXTERNAL
         */
        template Event mw_callEstablished (
        template MnoEvent mw_callEstablished (
            template(present) integer p_worker,
            template(present) charstring p_time := ?,
            template(present) CallRefType p_callRef := EXTERNAL
@@ -529,7 +558,7 @@ module LibItsECall_Templates {
         * @param p_time        Event timestamp
         * @param p_callRef     INTERNAL/EXTERNAL
         */
        template Event mw_callRejected (
        template MnoEvent mw_callRejected (
            template(present) integer p_worker,
            template(present) charstring p_time := ?,
            template(present) CallRefType p_callRef := EXTERNAL
@@ -547,7 +576,7 @@ module LibItsECall_Templates {
         * @param p_time        Event timestamp
         * @param p_callRef     INTERNAL/EXTERNAL
         */
        template Event mw_callHangUp (
        template MnoEvent mw_callHangUp (
            template(present) integer p_worker,
            template(present) charstring p_time := ?,
            template(present) CallRefType p_callRef := ?
@@ -566,7 +595,7 @@ module LibItsECall_Templates {
         * @param p_callRef     INTERNAL/EXTERNAL
         * @param p_reason      Abortion description
         */
        template Event mw_callAborted (
        template MnoEvent mw_callAborted (
            template(present) integer p_worker,
            template(present) charstring p_time,
            template(present) CallRefType p_callRef,
@@ -579,81 +608,72 @@ module LibItsECall_Templates {
                reason := p_reason
            }
        }
    }
    
    group mnoCommandTemplates {
        /**
         * @desc  Receive template for CallVoiceConnectionEstablished event 
         * @desc  Send template for CallAccept command
         * @param p_worker  Target worker process
         * @param p_time    Event timestamp
         */
        template Event mw_callVoiceConnectionEstablished (
            template(present) integer p_worker,
            template(present) charstring p_time := ?
        template (value) CallAcceptCmd m_callAccept (
            integer p_worker
        ) := {
            callVoiceConnectionEstablished := {
            worker := p_worker,
                time := p_time
            }
            callRef := EXTERNAL
        }
    
        /**
         * @desc  Receive template for InbandStartSignalReceived event 
         * @desc  Send template for CallHangUp command
         * @param p_worker  Target worker process
         * @param p_time        Event timestamp
         * @param p_count
         * @param p_reliable
         */
        template Event mw_inbandStartSignalReceived (
            template(present) integer p_worker,
            template(present) charstring p_time := ?,
            template(present) PositiveInteger p_count := ?,
            template(present) boolean p_reliable := ?
        template (value) CallHangUpCmd m_callHangUpC (
            integer p_worker
        ) := {
            inbandStartSignalReceived := {
                worker := p_worker,
                time := p_time,
                count := p_count,
                reliable := p_reliable
            }
            worker := p_worker
        }
    
        /**
         * @desc  Receive template for TimerExpired event 
         * @desc  Send template for CallRejectBus command
         * @param p_worker      Target worker process
         * @param p_time    Event timestamp
         * @param p_name    Timer name
         * @param p_val     Timer value in seconds
         * @param p_callRef     EXTERNAL
         */
        template Event mw_timerExpired (
            template(present) integer p_worker,
            template(present) charstring p_time := ?,
            template(present) charstring p_name := ?,
            template(present) float p_val := ?
        template (value) CallRejectBusyCmd m_callRejectBusy (
            template(value) integer p_worker,
            template(value) CallRefType p_callRef := EXTERNAL
        ) := {
            timerExpired := {
            worker := p_worker,
                time := p_time,
                name := p_name,
                val := p_val
            }
            callRef := p_callRef
        }
        
        /**
         * @desc  Receive template for T7 expiration event 
         * @desc  Send template for CallCreate command
         * @param p_worker      Target worker process
         * @param p_to          Call destination
         * @param p_callRef     EXTERNAL
         */
        template Event mw_t7Expired(
            template(present) integer p_worker
        ) := mw_timerExpired(p_worker, ?, "t7", ?);
        template (value) CallCreateCmd m_callCreate (
            template(value) integer p_worker,
            template(value) charstring p_to,
            template(value) CallRefType p_callRef := EXTERNAL
        ) := {
            worker := p_worker,
            to_ := p_to,
            callRef := p_callRef
        }
     
        /**
         * @desc  Receveive template for T8 expiration event
         * @desc  Send template for CallCancel command
         * @param p_worker      Target worker process
         * @param p_callRef     EXTERNAL
         */
        template Event mw_t8Expired(
            template(present) integer p_worker
        ) := mw_timerExpired(p_worker, ?, "t8", ?);
        
    } // end eventTemplates
        template (value) CallCancelCmd m_callCancel (
            template(value) integer p_worker,
            template(value) CallRefType p_callRef := EXTERNAL
        ) := {
            worker := p_worker,
            callRef := p_callRef
        }
    }

    group commandTemplates {
        
@@ -664,7 +684,7 @@ module LibItsECall_Templates {
         */
        template (value) SetConfigCmd m_setConfig (
            integer p_worker,
            template(value) ConfigParameters p_parameters
            template(value) ModemConfiguration p_parameters
        ) := {
            worker := p_worker,
            parameters := p_parameters
@@ -703,69 +723,6 @@ module LibItsECall_Templates {
            }
        }

        /**
         * @desc  Send template for CallAccept command 
         * @param p_worker  Target worker process
         */
        template (value) CallAcceptCmd m_callAccept (
            integer p_worker
        ) := {
            worker := p_worker,
            callRef := EXTERNAL
        }
    
        /**
         * @desc  Send template for CallHangUp command 
         * @param p_worker  Target worker process
         */
        template (value) CallHangUpCmd m_callHangUpC (
            integer p_worker
        ) := {
            worker := p_worker
        }
    
        /**
         * @desc  Send template for CallRejectBus command 
         * @param p_worker      Target worker process
         * @param p_callRef     EXTERNAL
         */
        template (value) CallRejectBusyCmd m_callRejectBusy (
            template(value) integer p_worker,
            template(value) CallRefType p_callRef := EXTERNAL
        ) := {
            worker := p_worker,
            callRef := p_callRef
        }
        
        /**
         * @desc  Send template for CallCreate command 
         * @param p_worker      Target worker process
         * @param p_to          Call destination
         * @param p_callRef     EXTERNAL
         */
        template (value) CallCreateCmd m_callCreate (
            template(value) integer p_worker,
            template(value) charstring p_to,
            template(value) CallRefType p_callRef := EXTERNAL
        ) := {
            worker := p_worker,
            to_ := p_to,
            callRef := p_callRef
        }
     
        /**
         * @desc  Send template for CallCancel command 
         * @param p_worker      Target worker process
         * @param p_callRef     EXTERNAL
         */
        template (value) CallCancelCmd m_callCancel (
            template(value) integer p_worker,
            template(value) CallRefType p_callRef := EXTERNAL
        ) := {
            worker := p_worker,
            callRef := p_callRef
        }
            
        /**
         * @desc  Send template for InbandRequestMsd command
         * @param p_worker  Target worker process