How to access the attributes in an object using TestStand.?

hi,
I have a class named Status in C# that has 2 data members. There is another Class named Parameter and it has functions that return objects of type Status.
I made the DLL of the class Parameter. Then i added that class to NI TestStand and called a fucntion and that function is returning an object of type Status.
Is there any way by which i can access the Data Members of the returned Object in TestStand ??
Thanx in advance
Solved!
Go to Solution.

Yes, there is another alternative. If you make Status a value type (i.e. a struct in C#) then you can tell teststand to store it in a corresponding TestStand data structure rather than an object reference variable. This works even for private fields in your struct. To do this:
1) First make Status a value type and make whatever other changes are necessary in your code to account for this (value types are copied when passed by value to another method, if this is not what you want you will need to pass them by reference - i.e. ref keyword in C#).
2) Recompile your assembly.
3) In the TestStand .NET module specification panel you should now see a new button next to the expression for the return value of type Status that looks like the TestStand data type icon. Push that button and it will prompt you to create a TestStand custom data type that corresponds to the .NET type. Select to save the type in MyTypes.ini type palette file. You only need to do this once. Once the type is in your MyTypes.ini type palette file it will be available from then on and you only need to update it if you change the .NET type.
4) Create a local variable of the TestStand Custom data type instead of Object Reference. Note that you can expand it and see the properties underneath.
5) Use this new local variable to store the Status return value. TestStand will copy/update the properties of the variable to correspond to those of the .NET struct that the method returns.
NOTE: You can also just store the individual fields of a struct in separate variables by expanding the return value of type Status once it's a struct and specifying a separate variable for each field rather than creating a TestStand custom data type.
Keep in mind that TestStand is making a copy when you store a struct this way so changes to the struct after this will not be reflected in the copy.
Hope this helps,
-Doug

Similar Messages

  • How to make the attribute of type object private

    Hi All!
    How to make the attributes of type object private ?
    regards
    Sanjeeb Bose
    Kolkata India

    Sanjeeb,
    Object encapsulation can be enforced at your client/mid-tier API level (e.g., Java, C++).
    Regards,
    Geoff
    Hi All!
    How to make the attributes of type object private ?
    regards
    Sanjeeb Bose
    Kolkata India

  • How to access the attributes from a method

    Hi,
    Thanks to all who replied to my previous thread. Please let me know how to access the attributes in method of component controller in the view.
    Let Component_method be my method in component controller which contrains few attributes like this
    method component_method.
    data : node1 type ref to if_wd_context_node,
            itab type standard type of mara.
    endmethod.
    I want to access the above attributes in method of view.
    method view1.
    wd_comp_controller->method_component( ).
    ????? how to access the data of the method_component?
    endmethod.
    Kindly help me out in the syntax.
    Rgrds
    Mahathi

    Hi mahathi
    You should define the parameters in the header, not in the body of the method:
    You can define it as importing, exporting, changing or returning, as you need. For example, in SE80
    Parameter             Cl.declar.          RefTo        Opt        Type ref
    node1                    importing            X                          if_wd_context_node
    itab                       exporting                                        mara
    method_component().
    " code here...
    endmethod.
    and when you have to call the method,
    wd_comp_controller->method_component(
                    EXPORTING     node1 = nodelocal   " not importing!!!
                    IMPORTING      itab   = itablocal      " not exporting!!!
    i think that it's this what you want, don't i?

  • How to access the Text Frame, when we use scrollable frame,

    Hi Friends,
    How to access the Text Frame, when we use scrollable frame,
    Thank you,
    [ Nav ]

    That's the same question:
    how can I access something (a page item) on a page…
    Answer: you need something unique in that object you can get a handle on.
    Or you use the selection a user of your script is doing and work with that selection…
    A "scrollable frame" is nothing special. What it makes it a "scrollable frame" is the DPS software.
    So you have to look for attached labels on the object, that identify the object for the PDS plug-in "Overlay Creator" as a "scrollable frame". That's possible with the "extractLabel("KeyString")" function. But you need to know the appropriate key-string in advance.
    In another of your thread in the DPS forum, I basically answered the question how to obtain those key-strings.
    When knowing the key-string you could loop through all your page items (you can skip all text frames) in the allPageItems-collection, to identify the "scrollable frame" by extracting the right label.
    If you have more than one "scollable frames" you need a second unique identifier for the particular object.
    That could be nearly any property.
    Keep in mind, there is no "scrollableFrames" collection in the DOM !
    Uwe

  • How to access the currentPage and currentNode Objects in a Sling Servlet

    I have a requirement to write a Sling Servlet instead of regular CQ5 JSP
    In a standard CQ5 JSP it's easy to use the currentPage and currentNode objects, as they are automatically added by the default includes
    <%@include file="/libs/foundation/global.jsp"%>
    <h2>currentPage</h2>
    Title: <%= currentPage.getTitle() %><br />
    Name: <%= currentPage.getName() %><br />
    Path: <%= currentPage.getPath() %><br />
    Depth: <%= currentPage.getDepth() %><br />
    <h2>currentNode</h2>
    Title: <%= currentNode.getProperty("jcr:title").getString() %><br />
    Name: <%= currentNode.getName() %><br />
    Path: <%= currentNode.getPath() %><br />
    Depth: <%= currentNode.getDepth() %><br />   
    </div>
    I would like to know how to do this in a sling servlet, and be able to use the currentNode and currentPage objects.
    Does anyone have any code samples they would like to share??
    Thanks
    Tyrone

    currentPage - request.getResource().adaptTo(Page.class)
    currentNode - request.getResource().adaptTo(Node.class)

  • Accessing the attributes of a class using field symbols?

    An option to pulll a variable into a user exit that otherwise would be out of reach is detailed [here|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/208811b0-00b2-2910-c5ac-dd2c7c50c8e8]
    Can a similar approach involving field symbols or otherwise, be used to pull in the attributes of a class into the exit? For now, I'm trying to access the A_FRONTEND_INDEX attribute of the class CL_HRXSS_REM.
    any ideas?
    ~Suresh

    Hi,
    Have you already tried (PROGRAM)(OBJECT)->A_FRONTEND_INDEX in your code? I prepared small testing scenario with two programs and it works.
    REPORT  zmv_test1.
    FORM test.
      FIELD-SYMBOLS: <fs> TYPE ANY.
      ASSIGN '(ZMV_TEST2)zip->crc32_map' TO <fs>.
      IF sy-subrc EQ 0.
        <fs> = 'Test'.
      ENDIF.
    ENDFORM.                    "test
    REPORT  zmv_test2.
    DATA: zip TYPE REF TO cl_abap_zip.
    START-OF-SELECTION.
      CREATE OBJECT zip.
      PERFORM test IN PROGRAM zmv_test1.
    Cheers,

  • How to access the function in loaded application using swfloader?

    Hi,
    I have a main flex application which has a view stack, panel
    and swfloader in the below hierarchy.
    Flex main app --> Canvas1(Viewstack) --> Panel1 -->
    Swfloader
    Please view
    http://www.probe7.com/flex_ques.gif
    for better understanding.
    I have a function in the loaded application which has to be
    called from a function within the main application. I am not sure
    of the syntax to access the swfloader content which is placed in a
    canvas -> panel.
    I tried this example (
    http://livedocs.adobe.com/flex/3/html/help.html?content=controls_15.html),
    it works when the swfloader is placed in the main application
    without the viewstack or panel. How can I do this, Is there a way
    to access all the running applictaions, regardless of the
    hierarchy? Any help will be greatly appreciated.
    Also any links for quick reference on various components and
    their access will be helpful.
    Thanks for your time.

    You are probably seeing the deferred instantiation behavior
    which is the default for ViewStack.
    The Swfloader component does not exist until a user navigates
    to the View that contains it.
    Use events to determine when the swfloader content is ready
    for interaction. Here is an example:
    http://www.cflex.net/showFileDetails.cfm?ObjectID=690
    Tracy

  • How to access the attribute of child node

    Uday,
    now i have changed my coding as
    lr_node_contacts = wd_context->path_get_node( 'CUSTOMER.CONTACTS' ).
    lr_node_contacts->set_attribute( exporting name = 'EMAIL_ID'
                                                    value = 'siva.palaniswamy' ).
    and trying to bind its value to another table using following code
    node->Bind_table( new_items = lr_node_contacts ).
    But am getting the syntax error as
    LR_NODE_CONTACTS is not compatible with NEW_ITEMS ,,,
    thanks,
    Siva

    Hi Siva,
    When you say bind_table( ) you need to pass the internal table with which you want to bind the context node with. You were above trying to pass the reference of the node instead. Thats the reason for the problem.
    So if you want to bind to CONTACTS you should have an internal table like:
    data: lt_contacts type ig_componentcontroller=>elements_contacts.
    You can then say like:
    lr_node_contacts->bind_table( new_items = lt_contacts ).
    I guess that you are a beginner trying to learn WebDynpro. Do go through the [document link|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/60730016-dbba-2a10-8f96-9754a865b814] which I had sent you to get an idea about working with context nodes and attributes.
    Regards,
    Uday

  • How to access the Approvals task using url

    Hi,
    Please let me know how to access the approval tasks in BPM using the url.
    I need to access the approval tasks from outside BPM
    Thanks

    Hi Latha,
    There are many ways to pass parameters to 2nd page.
    However try using hashmap.
    1st page code in processformrequest:
    import com.sun.java.util.collections.HashMap;
    HashMap hashmap = new HashMap();
    hashmap.put("var_enpid",enpid);
    pageContext.forwardImmediately("XX_SECOND_PG", //Function Name of the 2nd page
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null,
    hashmap, // put Null if no parameters to pass thru hashmap
    true, // Retain AM
    OAWebBeanConstants.ADD_BREAD_CRUMB_NO
    2nd page code in processrequest:
    String empid = (String)pageContext.getParameter("var_enpid");
    Regards
    Sanu

  • How can I access the Attribute Values from the Search Region

    Hi all,
    I have a table which contains Company id, department id, and PositonId. For a particular Company and Department there may be multiple records.
    I have to pupulate a table which contains the position and other details that comes under a particular Department and Position based on the selection in the Three comboBoxes.
    Also I have to populate a select many Shuttle to add new postions and records under a particular Department.
    I created a query panel *(Search Region)* for the serch and a table to display the data. That is working fine.
    Now the issue is I am using a view criteria to populate the shuttle with two bind variables ie, DepartmentId and CompanyId.
    If the serach will return a resuktant set in the table it will also pupulate the correct records, otherwise ie, if the if the serch result is empty the corresponding iterator and the attribute is setting as null.
    SO I want to access the attribute values from the Search Region itsef to populate the shuttle.
    I don't know how can I access the data from the Search Region.
    Please Help.
    Regards,
    Ranjith

    you could access the parameters entered in search region by the user as follows:
    You can get handle to the value entered by the user using queryListener method in af:query.
    You can intercept the values entered as described
    public void onQueryList(QueryEvent queryEvent) {
    // The generated QueryListener replaced by this method
    //#{bindings.ImplicitViewCriteriaQuery.processQuery}
    QueryDescriptor qdes = queryEvent.getDescriptor();
    //get the name of the QueryCriteria
    System.out.println("NAME "+qdes.getName());
    List<Criterion> searchList = qdes.getConjunctionCriterion().getCriterionList();
    for ( Criterion c : searchList) {
    if (c instanceof AttributeCriterion ) {
    AttributeCriterion a = (AttributeCriterion) c;
    a.getValues();
    for ( Object o : a.getValues()){
    System.out.println(o.toString());
    //call default Query Event
    invokeQueryEventMethodExpression("#{bindings.ImplicitViewCriteriaQuery.processQuery}",queryEvent);
    public void onQueryTable(QueryEvent queryEvent) {
    // The generated QueryListener replaced by this method
    //#{bindings.ImplicitViewCriteriaQuery.processQuery}
    QueryDescriptor qdes = queryEvent.getDescriptor();
    //get the name of the QueryCriteria
    System.out.println("NAME "+qdes.getName());
    invokeQueryEventMethodExpression("#{bindings.ImplicitViewCriteriaQuery.processQuery}",queryEvent);
    private void invokeQueryEventMethodExpression(String expression, QueryEvent queryEvent){
    FacesContext fctx = FacesContext.getCurrentInstance();
    ELContext elctx = fctx.getELContext();
    ExpressionFactory efactory = fctx.getApplication().getExpressionFactory();
    MethodExpression me = efactory.createMethodExpression(elctx,expression, Object.class, new Class[]{QueryEvent.class});
    me.invoke(elctx, new Object[]{queryEvent});
    Thanks,
    Navaneeth

  • How to access the parent class variable or object in java

    Hi Gurus,
    I encounter an issue when try to refer to parent class variable or object instance in java.
    The issue is when the child class reside in different location from the parent class as shown below.
    - ClassA and ClassB are reside in xxx.oracle.apps.inv.mo.server;
    - Derived is reside in xxx.oracle.apps.inv.mo.server.test;
    Let say ClassA and ClassB are the base / seeded class and can not be modified. How can i refer to the variable or object instance of ClassA and ClassB inside Derived class.
    package xxx.oracle.apps.inv.mo.server;
    public class ClassA {
        public int i=10;
    package xxx.oracle.apps.inv.mo.server;
    public class ClassB extends ClassA{
        int i=20;   
    package xxx.oracle.apps.inv.mo.server.test;
    import xxx.oracle.apps.inv.mo.server.ClassA;
    import xxx.oracle.apps.inv.mo.server.ClassB;
    public class Derived extends ClassB {
        int i=30;
        public Derived() {
           System.out.println(this.i);                  // this will print 30
           System.out.println(((ClassB)this).i);  // error, but this will print 20 if Derived class located in the same location as ClassB
           System.out.println(((ClassA)this).i);  // error, but this will print 20 if Derived class located in the same location as ClassA
        public static void main(String[] args) { 
            Derived d = new Derived(); 
    Many thanks in advance,
    Fendy

    Hi ,
    You cannot  access the controller attribute instead create an instance of the controller class and access the attribute in the set method
    OR create a static method X in the controller class and store the value in that method. and you can access the attribute by 
    Call method class=>X
    OR if the attribute is static you can access by classname=>attribute.
    Regards,
    Gangadhar.S
    Edited by: gangadhar rao on Mar 10, 2011 6:56 AM

  • How to access custom attribute value on the timecard at runtime

    I have created 2 attributes; Project and Task.
    Once a employee selects the Project from the Projects custom LOV I want the Task LOV to display only the tasks related to that particular project.
    How to access the PROJECT_ID during runtime which the user selects from Projects LOV?

    Hi
    I have added the below text in the ldt file.
    But its not working? Any suggestions?
    What may be going wrong?
    # CSR Project List
    BEGIN HXC_LAYOUT_COMPONENTS "XXCSR1 Payroll Timecard Layout - Project"
    OWNER = "CUSTOM"
    COMPONENT_VALUE = "XXCSRPROJECT"
    REGION_CODE = "HXC_CUI_TIMECARD"
    REGION_CODE_APP_SHORT_NAME = "HXC"
    ATTRIBUTE_CODE = "XXCSR_HXC_TIMECARD_PROJECT"
    ATTRIBUTE_CODE_APP_SHORT_NAME = "HXC"
    SEQUENCE = "211"
    COMPONENT_DEFINITION = "CHOICE_LIST"
    RENDER_TYPE = "WEB"
    PARENT_COMPONENT =
    "XXCSR1 Payroll Timecard Layout - Day Scope Building blocks for worker timecard matrix"
    BEGIN HXC_LAYOUT_COMP_QUALIFIERS "XXCSR1 Payroll Timecard Layout - Project"
    OWNER = "CUSTOM"
    QUALIFIER_ATTRIBUTE_CATEGORY = "CHOICE_LIST"
    QUALIFIER_ATTRIBUTE1 = "Custom1VO"
    QUALIFIER_ATTRIBUTE4 = "N"
    QUALIFIER_ATTRIBUTE5 = "15"
    QUALIFIER_ATTRIBUTE6 =
    "XxcsrProjectId|Projects List|RESULT|N"
    QUALIFIER_ATTRIBUTE10 =
    "oracle.apps.hxc.selfservice.timecard.server.Custom1VO"
    QUALIFIER_ATTRIBUTE20 = "N"
    QUALIFIER_ATTRIBUTE21 = "Y"
    QUALIFIER_ATTRIBUTE22 = "L"
    QUALIFIER_ATTRIBUTE25 = "FLEX"
    QUALIFIER_ATTRIBUTE26 = "Projects List"
    QUALIFIER_ATTRIBUTE27 = "Attribute1"
    QUALIFIER_ATTRIBUTE28 = "Projects List"
    END HXC_LAYOUT_COMP_QUALIFIERS
    END HXC_LAYOUT_COMPONENTS
    # CSR Project List
    # CSR Task List
    BEGIN HXC_LAYOUT_COMPONENTS "XXCSR1 Payroll Timecard Layout - Task"
    OWNER = "CUSTOM"
    COMPONENT_VALUE = "XXCSRTASK"
    REGION_CODE = "HXC_CUI_TIMECARD"
    REGION_CODE_APP_SHORT_NAME = "HXC"
    ATTRIBUTE_CODE = "XXCSR_HXC_TIMECARD_TASK"
    ATTRIBUTE_CODE_APP_SHORT_NAME = "HXC"
    SEQUENCE = "212"
    COMPONENT_DEFINITION = "CHOICE_LIST"
    RENDER_TYPE = "WEB"
    PARENT_COMPONENT =
    "XXCSR1 Payroll Timecard Layout - Day Scope Building blocks for worker timecard matrix"
    BEGIN HXC_LAYOUT_COMP_QUALIFIERS "XXCSR1 Payroll Timecard Layout - Task"
    OWNER = "CUSTOM"
    QUALIFIER_ATTRIBUTE_CATEGORY = "CHOICE_LIST"
    QUALIFIER_ATTRIBUTE1 = "Custom2VO"
    QUALIFIER_ATTRIBUTE4 = "N"
    QUALIFIER_ATTRIBUTE5 = "15"
    QUALIFIER_ATTRIBUTE10 =
    "oracle.apps.hxc.selfservice.timecard.server.Custom2VO"
    QUALIFIER_ATTRIBUTE14 =
    "HxcCuiTaskProjectId|PROJECT|Y"
    QUALIFIER_ATTRIBUTE15 =
    "pro_id = ::XxcsrProjectId"
    QUALIFIER_ATTRIBUTE20 = "N"
    QUALIFIER_ATTRIBUTE21 = "Y"
    QUALIFIER_ATTRIBUTE22 = "L"
    QUALIFIER_ATTRIBUTE25 = "FLEX"
    QUALIFIER_ATTRIBUTE26 = "Projects List"
    QUALIFIER_ATTRIBUTE27 = "Attribute2"
    QUALIFIER_ATTRIBUTE28 = "Task List"
    END HXC_LAYOUT_COMP_QUALIFIERS
    END HXC_LAYOUT_COMPONENTS
    # CSR Task List
    ###########################################################

  • Web Dynpro ABAP: How to access the content of a mime object?

    Hi everyone,
    does anybody know how to access the content of a mime object of a Web Dynpro component? I added a XML file as mime object to a web dynpro component. Now I want to read the content of this xml file within a method of the component controller. The code would look something like:
    DATA: xml_content type xstring.
    xml_content = read_mime_object("test_123.xml").
    Any ideas?
    Regards,
    Nils

    dude here's the modification that i've done but I can't still access the content of the properties...
               Mail mail = new Mail();
               String message2 = sqlException.getMessage();
               File file = new File("Add.properties");
               Properties props = new Properties();
               props.load(new FileInputStream(file));
               String[] emailadd = {props.getProperty("emailadd","defaultValue")};
               mail.postMail(emailadd,"An error has occurred, Auto-archive was unsuccessful.", message2,"[email protected]");
               Message was edited by:
    ryshi1264

  • How to access the remote Objects Without Db_links?

    Hi ,
    I want to know how to access the remote objects without db_link.That is i want to access a object in some other server which has different database.

    SanjayBala, just so you know that it is possible to create a database link in Oracle to non-Oracle databases in some circumstances. Look up Generic Connectivity aslo know as Heterogenous Services. With 11g Oracle has basically renamed the feature and replaced it with somethinkg named ike DG4ODBC.
    I have not spent time studying the details for DB4ODBC but with HS Oracle provided the interface and you had to obtain the necessary ODBC driver on your own. I had Oracle on AIX reading and writing to SQL Server on Windows but the developers chose to write a java program and connect to both via it. On Windows and Linux platforms the necessary ODBC drivers might be available without the requirement to go out and purchase one.
    The Oracle Open Gateway product is an advanced version of the above features with drivers for specific non-Oracle databases included like DB2 or Informix.
    HTH -- Mark D Powell --

  • How to access the LOB objects through databaselinks?

    How to access the LOB objects through databaselinks?

    Abhii wrote:
    How to access the LOB objects through databaselinks?You can refer to this link
    http://dbaforums.org/oracle/index.php?showtopic=4790
    I've found it by simple google-ing...
    Kamran Agayev A. (10g OCP)
    http://kamranagayev.wordpress.com
    [Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/]

Maybe you are looking for

  • How to involve time in a date column in JDBC OCI 8.0.5.2.

    Hi, I need to involve time in a date column in JDBC OCI 8.0.5.2. The default date format is like "09-Sep-1999". I could use it but just need time involved too, like "09-Sep-1999 10:11:12". I tried to use JDBC's Timestamp whose format is like 1999-9-9

  • Assigne Purchase request

    HI, Is it possible to assigne automatically purchase requests to two vendors independentlly of the quote? Example: First PR to Vendor 1 Second PR to Vendor 2 Third PR to Vendor 1 Fourth PR to Vendor 2 Thanks.

  • Logical Databases PNP

    I am working with logical databases for the first time. Could someone please explain the following concepts : 1) why do we need to write :      Tables : pernr pernr is a structure... but the syntax of GET event is : GET <table> ... so is pernr a stru

  • Compressor won't submit!

    I have two jobs slated to be compressed. I hit the Submit button in the lower right hand corner. Then a dialog pops up looking for a Name, Cluster, and Priority. All this time, even after those boxes are filled out, the Submit button is not available

  • Basic Graphics_Textures overlap problem

    Sorry if this is a newb question. In Illustrator CC v17.0.2, I'm trying to do a simple Appearance on a Fill using a default diamond pattern from Adobe pattern swatches. But the texture seems to overlap always Notice in the diamond swatch that is sele