1 Reply Latest reply on Sep 10, 2001 8:28 AM by DevConGuest NameToUpdate

    Determining the Parameter Type in PSL


      Is it possible to determine the Style (as in "Text", "Gauge", Graph" etc), from a PSL script? I cannot see an obvious namespace variable which would simply tell me the Style, but I need to check because I need to export a list of all the parameters currently in alarm, and Text parameters can cause problems because their values can be multi-line!

      Ian Dent
      Ambassador House, Concord Business Park, Wythenshaw, M22 0NE
      Telephone : +44 (0)1924 812100
      Personal Fax: +44 (0)870 063 4162
      Mobile: 07867 832157
      VPN: 7383 2157
      Email: ian.dent@icl.com
      Website : http://www.icl.com

      This e-mail is intended only for the addressee named above. As this e-mail may contain confidential or privileged information if you are not, or suspect that you are not, the named addressee or the person responsible for delivering the message to the named addressee, please telephone us immediately. Please note that we cannot guarantee that this message or any attachment is virus free or has not been intercepted and amended. The views of the author may not necessarily reflect those of the Company.

      International Computers Limited, Registered in England no 96056, Registered Office 26, Finsbury Square, London, EC2A 1SL

        • 1. Determining the Parameter Type in PSL

          You cannot get the style directly from PSL, but you can ask PEM to get it for you with the following PSL script and attached PEM executable and source:

          Make whatever modifications you want.

          function getOutputMode(mode)
          modes = [ "None", "Text", "Gauge", "Graph", " ", "State Boolean", "Stoplight" ];

          ret = trim(nthlinef(modes, trim(mode,"\n")), "\n");

          return ret;

          print("================ GetParamAttributes================\n");
          cmd = get("/patrolHome")."pemapi/paramtype.exe";
          output = execute("OS", cmd);

          print("Output Mode = ".getOutputMode(nthlinef(output, "7") + 1));

          print("================ End GetParamAttributes================\n");