Commit b30df59a authored by garciay's avatar garciay
Browse files

STF500: Add f_addPaddedBytes2Length function

parent d159264e
Loading
Loading
Loading
Loading
+16 −0
Original line number Original line Diff line number Diff line
@@ -3322,6 +3322,22 @@ module LibDiameter_Templates {
           return lengthof(p_bitstring) / 8;
           return lengthof(p_bitstring) / 8;
        } // End of function f_getEncvalueLength
        } // End of function f_getEncvalueLength
        
        
 
        /** @desc Calculates leghth of AVP with padded bytes (padded bytes are added in TA)
         */
        function f_addPaddedBytes2Length(integer p_currLength) return integer {
            var integer v_currLength;
            
            select(p_currLength mod 4){
                case (0) {v_currLength := p_currLength}
                case (1) {v_currLength := p_currLength+3}
                case (2) {v_currLength := p_currLength+2}
                case (3) {v_currLength := p_currLength+1}
            }
            return v_currLength;
            
        } // End of f_addPaddedBytes2Length

    }//end group FunctionsForTemplates
    }//end group FunctionsForTemplates


}//end module LibDiameter_Templates
}//end module LibDiameter_Templates
 No newline at end of file