How to send a string to CVI .c and get string return through TestStand sequence?

Hi, I am using TestStand 3.1 and I have the StringConverter.c with CVI 8.0 with the function:
char * string_concat_2 (char* str1,char* str2)
 char * str_ret;
 str_ret = calloc(200, sizeof(char*));
 str_ret = strcat (str_ret, str1);
 str_ret = strcat (str_ret, str2);
 return str_ret;
I would like to use it  through Teststand, so I add a sequence using 'StringValueTest'. I Spectify Module CVI &  link to StringConverter.c and type in Function Name: char * string_concat_2 (char* str1,char* str2)
1. How I define to send the string1 ("Hello") & string2 ("World") to the Module?
2. How I define to string return ("HelloWorld" from the Module?
Thanks

Hi plit string,
You will need to have a parameter passed by reference to return the
string.  To do this, use a "C String Buffer" instead of a "C String
(const)" parameter type.  There is documentation on this in TestStand
Help.  Here is a quote from there:
"When using string parameters, use the C String Buffer or Unicode
String Buffer type if you want the function to be able to change the contents of
the argument in TestStand. Use the C String or Unicode String type if the DLL
function does not modify the argument. You can pass a literal string, a
TestStand string property, or an expression that evaluates to a string as the
value of a string parameter."
Gavin Fox
Systems Software
National Instruments

Similar Messages

  • How to send ProRes FCP footage to iDVD and get a quality result

    Hello,
    I am editing on FCP5, for which I used a USB to transfer my ProRes footage. I want to use one of the themes in iDVD as a menu page for my final project, and understand that to do this I will have to export my FCP footage via QuickTime. I am worried about compromising the quality of my footage by doing this. My question is how can I then burn my final product, including the DVD menu, to disk and get the best quality result from my footage.
    Thank you!

    Have a feeling it's MPEG2. I've already spent time this week rendering another part of the movie using my old editing package (Pinnacle) and saving it as a .mov file to USB and it works on FCP without a hitch- Thankfully! I'm just gutted because I know MPEG is nowhere near as good quality as ProRes but I really don't know what else to do- This is literally my first week working on a Mac, let alone FCP!

  • How to send a request and get a response through xml

    How to send a request and get a response through xml files?

    This is the code that works for me. Hope you find it useful.
         public static String sendHttpGetRequest(String endpoint, String requestParameters){
              String result = null;
              // Send a GET request to the servlet
              try{
                   // Send data
                   String urlStr = endpoint;
                   if (requestParameters != null && requestParameters.length () > 0){
                        urlStr += "?" + requestParameters;
                   URL url = new URL(urlStr);
                   HttpURLConnection conn = (HttpURLConnection) url.openConnection();
                   conn.setRequestProperty("Accept", "application/xml");
                   // Get the response
                   BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
                   StringBuffer sb = new StringBuffer();
                   String line;
                   while ((line = rd.readLine()) != null){
                        sb.append(line);
                   rd.close();
                   result = sb.toString();
              } catch (Exception e){
                   e.printStackTrace();
              return result;
         }

  • How can I purchase an iTunes card online and get the code online to purchase apps.

    How can I purchase an iTunes card online and get the code online to purchase apps.

    iTunes Gift Options
    http://support.apple.com/kb/HT2736

  • How do I download a Adobe PDF file and get it converted to a Word document?

    How do I download a Adobe PDF file and get it converted to a Word document?

    Download: you just download it as you would any other document.
    Convert to Word: either using the ExportPDF online service, or Acrobat.

  • Hi, i purchased a 2 dvd digital set. i cant just download it straight to my ipad. they said i have to down load it to my i tunes, then can transfer to i pad. im not seeing how to click the files from my email, and get them into the i tunes acct... ugh.

    hi, i purchased a 2 dvd digital set. i cant just download it straight to my ipad. they said i have to down load it to my i tunes, then can transfer to i pad. im not seeing how to click the files from my email, and get them into the i tunes acct... ugh.
    i do not have a mac home pc. just a regular pc

    I had the same problem after I gave my old iPad to my parents and tried to install Netflix. This is what you have to do:  Open iTunes on your computer, the one you sync your iPad to. Then go to iTunes Store and search for and download Netflix app. After you download it, if your iPad is set to download new purchases it may start downloading on your iPad. If so, tap and hold to delete the app (because it is trying to install the new version on the iPad) Next step, go to the App Store on your iPad and find Netflix and it should say install since you already purchased it on the computer. Tap to install, and it will say the version is not compatible, tap to download a previous version. Click that and it will install the older version!    One more thing, if and when you sync to your computer again it will say something like " Unable to install Netflix on your iPad" Just click the box to never remind you again, because it's trying to sync the newer Netflix app to your iPad, but it doesn't work so it displays the message. The old app will remain on the ipad. Hope this helps, good luck

  • How can I undo a OS X update and get back my previous config

    How can I undo a OS X install and get back my previous config ?

    See: OS X Mavericks: Revert to a previous OS X version

  • MMS is not sending or receiving on iPhone 5s and gets an alert needs to be activated.

    MMS is not sending or receiving on Iphone 5s and gets an alert needs to be activated. Wind Mobile set up the MMS settings the data works the texts work but not MMS.

    Cellular data is not used with SMS only. SMS are exchanged over the same network as calls. MMS with the iPhone requires cellular data. If you have MMS Messaging and Cellular Data enabled, the problem lies with your carrier.

  • TS2446 How Can I Enable My Account?? And Get Free Apps

    How Can I Enable My Account?? And Get Free Apps

    Depending on why it's been disabled, you might be able to re-enable it via this page : http://appleid.apple.com, then 'reset your password'
    Or you might need to contact Apple : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page

  • How to send a String to a Servlet using a HTTP POST

    Well, I have designed a servlet that receives a HTTP POST, I was testing it using an HTML form to send (using POST) information, now, I have coded a Java App to send it a string, I don't know how to make the servlet recognize that info so it can make its work, I am posting both codes (Servlet & API) so anyone can guide me and tell me how and where to modify them
    Servlet:
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.sql.*;
    public class xmlwriter extends HttpServlet
    public void service(HttpServletRequest req, HttpServletResponse res)
    throws ServletException, IOException
    ServletOutputStream salida = res.getOutputStream();
    res.setContentType("text/HTML");
    String cadena = req.getParameter("cadena");
    File f1 = new File ("c:/salida.xml");
    FileWriter out = new FileWriter(f1);
    f1.createNewFile();
    out.write(cadena);
    out.close();
    salida.println("OK");
    Now, the JAVA API is:
    import java.io.*;
    import java.net.*;
    public class HTTPSender {
    public static void main(String[] args) throws Exception {
    URL url1 = new URL
    ("http://localhost:8080/XMLSender/xmlwriter");//internal site
    URLConnection UrlConnObj1 = url1.openConnection();
    HttpURLConnection huc1 = (HttpURLConnection)UrlConnObj1;
    huc1.setRequestMethod("POST");
    huc1.setDoOutput(true);
    huc1.setDoInput(true);
    huc1.setUseCaches(false);
    huc1.setDefaultUseCaches(false);
    String cadena = ""
    + "<root>\n"
    + "<tlf>$TLF$</tlf>\n"
    + "<op>$OP$</op>\n"
    + "<sc>$SC$</sc>\n"
    + "<body>$BODY$</body>\n"
    + "</root>";
         PrintWriter out = new PrintWriter(huc1.getOutputStream());
    System.out.println("string="+cadena);
    out.write(cadena);
    out.close();
    I'm a JAVA newbie, so, maybe I'm getting a bad idea of what I need to do, anyway, every (detailed) help is welcome. What my servlet should do (and it doesn't when I send the message through the API) is to write a file with the info received.

    I'm not trying to send a string from a WEB Page, I'm tryring to send it using a JAVA program, I mean, using a HTTPSender, in fact, I already have made the code to do that:
    import java.io.*;
    import java.net.*;
    public class HTTPSender {
    public static void main(String[] args) throws Exception {
    try {
    String cadena = "Message to be written";
    // Send data
    URL url = new URL("http://localhost:8080/XMLSender/xmlwriter");
    URLConnection conn = url.openConnection();
    conn.setDoOutput(true);
    OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());
    wr.write(cadena);
    wr.flush();
    // Get the response
    BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
    String line;
    while ((line = rd.readLine()) != null) {
    // Process line...
    wr.close();
    rd.close();
    } catch (Exception e) {
    And modified my servlet so it can receive anything:
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.sql.*;
    public class xmlwriter extends HttpServlet
    public void service(HttpServletRequest req, HttpServletResponse res)
    throws ServletException, IOException
    ServletOutputStream salida = res.getOutputStream();
    res.setContentType("text/HTML");
    String cadena = req.toString();
    File f1 = new File ("c:/salida.xml");
    FileWriter out = new FileWriter(f1);
    f1.createNewFile();
    out.write(cadena);
    out.close();
    salida.println("OK");
    Now the problem is that, the servlet in fact DOES create the file, but....the file is empty, that means that no info is arriving to the servlet, why?, how should I send it then? I repeat FORGET about a Web Page Form, that is in the past and I don't need that.

  • How to send a string thru UDP

    How can I send a string like this thru UDP:
    0x01 0x40 0x43 0x51
    Can I write it like this:
    data= 0x01, 0x40, 0x43, 0x51;
    Any help, please?

         InputStream in = null;
         HttpURLConnection urlConn =  null;
         int returnCode = 0;   
         try {
               URL url = new URL(URLEncoder.encode(urlStr));
               //Where urlStr is in the form "http://localhost/servlet/myServlet?param1=STRING TO BE PASSED"
              //Create the connection to the servlet url
               urlConn = (HttpURLConnection)url.openConnection();
               urlConn.setDoInput(true);
               urlConn.setDoOutput(true);
               urlConn.setUseCaches(false);
               urlConn.setRequestMethod("GET");
               urlConn.setRequestProperty("Accept-Language", "en");
               urlConn.setRequestProperty("content-type", "text/xml");
               in = urlConn.getInputStream();
               //Put code to read return string here
              } catch (Exception e) { System.out.println("Error : " + e); }
              urlConn.disconnect();

  • How to send query string to OSB Business Service?

    Hi
    I need to call a Servlet which is accepting http get request.
    My system design is
    I have a web service interface that I need to expose to Front end application. I am using Proxy service for this.
    Then I have a servlet at end system and using Business service to send request to servlet.
    I need to pass username, password, jndi context and payload using url encoding.
    What all steps do I need to follow for this? How to create query string , which variable I need to play with inbound or outbound?
    I have gone through all the answers on this forum but could not understand much.
    Thanks
    Vibhor

    Hii
    I am still unable to send http get request to end service.
    In flow I have setted $outbound/transport/request-http/query-string too.
    But I have to send request with url encoding.
    How to encode query string and how can I check whether my request is going correctly or not, is there any variable in which complete url would be stored.
    Thanks
    Vibhor
    Edited by: Vibhor Rastogi on Sep 15, 2010 9:49 AM

  • How to send a string from sender to receiver side using java

    I am doing a project on Digital Signature.I have already done with the GUI using java swing.
    Now i want to send a string from the sender side to the receiver side on the click of a button using socket programming.
    Please can anybody provide me with the code as early as possible.

    http://catb.org/~esr/faqs/smart-questions.html

  • How to send a string to yahoo messenger ?

    Hello,
    I just wonder whether it is possible to write an java app which automatic send a string yahoo messenger chatroom. It would be fine if somebody give me hint where to look at ... if possible.
    Thank in advance,
    hodydo

    I doubt that there's an API that you could call, but you might be able to do it with sockets. If you run a packet sniffer (like the open-source Ethereal) while running Yahoo messenger, you might be able to learn a bit about the protocol and try sending the tcp/ip data yourself using Java.

  • How to send group SMSes by using KvanttiSMS and JSP

    Hello again , I would want some help in implementing an SMS module that sends out a SMS message to a selected group of individuals from a database of several different groups .
    Now I have done a JSP GUI to allow the user to send a single SMS to one person .
    And my initial JSP codings for the Group SMS GUI were scrutinized and was said to be not functional by my lecturer .
    This is one of the technique that I know currently to send out an SMS :
    Connect to the database and get all the names of the groups .
    Using a while(column.next()) statement , the results will be placed into a drop down list in the JSP.
    The user selects the group from the drop down list and types the message as normal .
    The user presses the submit button and goes to the next JSP page (the 2nd JSP page sends out the SMS).
    The 2nd JSP page gets the group parameter and the message . Both parameters are placed into a string object.
    Using the string "group" object , another connection to the database is called .
    The database is called once again to retrieve handphone numbers that belong to groups that matches the string "group" object.
    using another while(column.next()) statement . The Sms terminal is called , initialized and used to send the message accordingly to the number of results .
    So is there any comment about this ? Please tell me what I should do if my method is wrong.

    I'm sorry ,
    actually the SQL statement uses the string "group" object to retrieve handphone numbers that belong to a person who is inside the same group as the string "group" object .

Maybe you are looking for

  • IPS event query ** Help needed badly**

    Greetings all. Apologies for the dramatic headline but I'm in a bit of a time crunch. I have a 4215 running 6.0(3)E1. The device is inline. Below is an event which triggered, ======================== evIdsAlert: eventId=1184881408377311643 severity=l

  • Quota warning message not working

    I have Quota warning messages turned on to be sent daily to users using over 90% of their limit. To test it I've had an account filled to 95% for a few days and no message yet. Anyone else having problems with this? Anyone have any suggestions what m

  • Can a Ethernet to Thunderbolt adapter fail?

    Have not been able to connect via ethernet to internet at multiple locations. I have exchanged the ethernet cables. I can connect with a USB to Thunderbolt adapter to internet. I can also connect wirelessly. The ethernet adapter seems to have stopped

  • Trying to import Windows Mail into Thunderbird.

    FAQ says to use Tools|Import/export|Import all messages from a directory. All I get is Import and nothing else. No Import/Export etc. When I proceed, only options are form Eudora, Outlook and Outlook Express and no Windows Mail. Picked OE but doesn't

  • Gaming on the new (2012) Mac Mini?

    Do you think the new Mac Mini would be able to adequately handle the latest games?  Thanks for your thoughts.