def generate_data_string(service_msg_number, sigparams, required_service_params)
      str = ''
      required_params = required_service_params[Integer(service_msg_number)] || required_service_params[service_msg_number]
      required_params.each do |param|
        val = sigparams[param].to_s # nil goes to ''
        str << func_p(val) << val
      end
      str
    end
def generate_data_string(service_msg_number, sigparams, required_service_params)
      str = ''
      required_params = required_service_params[Integer(service_msg_number)] || required_service_params[service_msg_number]
      required_params.each do |param|
        val = sigparams[param].to_s # nil goes to ''
        str << func_p(val) << val
      end
      str
    end
Generate a string to be signed out of service message parameters.
 p(x1 )|| x1|| p(x2 )|| x2 || ... ||p( xn )||xn
 || is string concatenation mark
 p(x) is length of the field x represented by three digits
 Parameters val1, val2, value3 would be turned into:
 '003val1003val2006value3'