Is it possible to make a type cast in TestStand?

I've got the following problem.
I use a receive function which waits for an undefined package. (struct package).
The problem is i can't specify the module with the exaxt package.
Generally in C i define a Pointer and create enough buffer for it. Is it the same in TestStand?
Is it possible to make a type cast?
for example:
i've got these packages
struct packet;
struct  data;
the function does not know which structure to receive.
err = receive(buffer,maxlen);
how do i specify the buffer variable?
can i create a type "void" with a String to have enough buffer.
and then to make a type cast, for example "Locals.dataobject = ((data)Locals.buffer)"
any ideas?
thx for help

Unfortunately there is no way to do type-casts in TestStand. What you could do is write a wrapper-dll in C, that has for example two parameters for both possible structs. The dll then takes one of the parameters, does the typecast and passes it on to your original dll.
From TestStand you can pass the struct(or better container in the "TestStand language") you want to use to the accoridng parameter of the wrapper-dll, leaving the other parameter empty or with some default-value.
Hope this helps!
André

Similar Messages

  • Is it possible to make this type of network with router i have?

    I have Linksys WRT54GC router at home and i share internet to all my PCs through the router.
    Is it possible to share internet firstly through my PC, and then through this router to all other pcs? If it is possible how i should configure my router? If not - do i have to buy some kind of switch to make this type of network?
    Example scheme:
    (Net)
    ---------------------------- PC1 (with 2 NIC)
    (routing) /
    router ------/
    | |___ PC2
    \___ PC3
    I have now this configuration of my PC's and router, but internet on PC2 is not working, but PC2 and router see each other. But ping between PC1 and router (192.168.0.1 192.168.0.2) says "no response":
    MY FIRST PC:
    http://www.improx.info/mypc.JPG
    http://www.improx.info/mypc_2.JPG
    Router:
    http://www.improx.info/router_1.JPG
    http://www.improx.info/router_2.JPG
    http://www.improx.info/router_3.JPG
    PC2:
    http://www.improx.info/pc2.JPG
    or i tried this:
    http://www.improx.info/pc2_var2.JPG
    http://www.improx.info/router_var2.JPG
    Sorry for bad english.
    Best regards,
    Arnas
    Message Edited by imuk on 12-19-2007 07:24 AM

    It is not clear to me what the exact problem is. The screenshots show that everything is correct. The second PC should have internet with this setup. PC1 won't be able to ping the router on 192.168.0.2 if you block ICMP (anonymous WAN requests) on the router. That setting should be on the Security tab.
    I would suggest to set up the WRT as simple wireless access point. That way you still have full LAN connectivity between all your computers. To do that, you have to temporarily wire a computer to a LAN port of the router. Unplug the gateway computer from the router! There is only a single computer connected to the WRT at the moment.
    Open http://10.10.10.1/ or whatever LAN IP address you have set on the WRT at the moment. On the Setup tab, change the internet connection type to "Automatic/DHCP", change the LAN IP address from 10.10.10.1 to 192.168.0.2, disable the DHCP server. Now press the save settings button. You'll loose the connection to the router. That's OK.
    Now rewire the router. Connect a LAN port of the router to the gateway computer. Do not use the internet port on the WRT! That is the basic setup.
    Now wired computers connected to the remaining 3 LAN ports on the WRT should have LAN and internet access. In the same way, wireless clients connect into the ICS LAN and have internet.

  • Is it possible to make two type of partitions onto an external drive?

    Hi,
    I'm on an intel iMac using Tiger and I know to back up my hard drive I need to choose the GUID partition and Mac OS Extended (Journaled) in order to be able to boot from the partition.
    So if I make 4 partitions is it possible to make 3 partitions GUID Mac Extended (Journaled) and then make 1 that is Apple Partition Map? I tried it and I couldn't figure it out using my Tiger Install disk and selecting Disk Utility option.
    My sister is using a Powerbook PC G4 also using Tiger and I want to make a bootable copy for her as well but just wondering if this can be done?
    S.

    Niel,
    Thanks, so if I format it all as APM I can either clone OSX 10.4.11 which I have on my internal now. If I do a backup of my intel and Powerbook PC both of those will already have Tiger on them so do I need to do another Tiger install on each of those partitions?
    Also by doing it this way I can't boot from a parition onto my intel can I?
    Guess I'll have to weigh whose system is more important or just back up her drive as GUID on my computer and she can restore from it if she has too but won't be able to boot from it.
    S.

  • Is it possible to make all type bold? I have trouble reading the weak type.

    example: Your "Fill ouy this...." is so weak I can't read it.

    You can use the NoSquint extension to set font sizes (text/page zoom) and text colors on web pages.
    *NoSquint: https://addons.mozilla.org/firefox/addon/nosquint/
    You can choose a default font that looks best for you.
    You can use this font test to see if you can find a font that suits you.
    *http://browserspy.dk/fonts-flash.php?detail=1

  • Type casting in TestStand 2012

    Hello,
    I really do not understand why my TestStand 4.2.1 sequences are not working in 2012. Here is a simple example.
    SequenceCall: GetTime
    Sequence: GetTime
    Everything worked perfect till I installed new Version of TesStand.
    Now in GetTime Sequence writing aTestDuration gives error because it says aTestDuration is not of type UInt64, so I used Typecase i.e.
    in TestStand2012 I use:
    But no use because result is always 0.
    I have already tried formatting aTestDuration as %ui64 etc. etc. Nothing helps.
    After giving up, I tried using object with Number as attribute. It works but:
    - How will I convert this object to UInt64?
    - Secondly, I do not want to use object because then I have to change 1000s of sequence calls in my source code and then let the program run which is weeks long unnecessary task for me.
    I am sure that am missing something. I hope you people can help.
    Regards
    Ricky

    The .NET adapter in TestStand 4.2.1 was storing the UInt64 in a double precision floating point number. This was somewhat of a bug in that numbers at the higher end of the values a UInt64 stores cannot be accurrately represented in a double precision floating point number. Thus, in order to avoid unintended loss of precision with 64-bit integer values, we now no longer allow you to directly store a 64-bit integer in a double precision floating point number. Perhaps in your use case you will never use the higher values of the 64-bit integer, but if you had, you would have run into problems when storing such values in a double precision floating point number.
    (NOTE: The .NET adapter was the only adapter in 4.2.1 doing this, no other adapters supported 64-bit integers at all until we added the 64-bit integer types in TestStand 2010)
    Hope this helps explain things. Let me know if this explanation is unclear or if you have additional questions related to this.
    -Doug

  • Make movement type 201 as follow on for 311

    Would like to know if it is possible to make movement type 201 as a follow on for 311. The requirement is to first transfer an item from one storgae location to another location and then issue it in the receiving location.
    Thanks and regards,
    Jon

    Hi,
    I think any option that you follow to do this will require some form of ABAP. Either you could create a bespoke screen which will complete both movements, or you could investigate the option of adding an output to the first movement to automatically complete a 201 movement. It depends on the info you need to complete the 201 movement and where you are going to source this information from.
    Steph.

  • Is there a way to type cast an array of strings to numbers and back again?

    I'm working on an application where I want to type cast a string like "power supply" into an array of existing numbers. Then sort the existing numbers, and finally convert the casted numbers back into a string so it can be read by the user. In the attachment, you can see my latest attempt with flatten/unflatten data and the 'convert string to byte array'. I can't seem to make this work. Any ideas?
    Thanks - Paul
    Attachments:
    Paul's Temp scan for components.vi ‏56 KB

    OK, here's a quickie (LabVIEW 7.0).
    Simply get the sort key from the 1D array, then build the table.
    Message Edited by altenbach on 10-27-2006 01:34 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    SortedTable.png ‏4 KB
    SortedTable.vi ‏37 KB

  • Dynamic [Runtime] type casting in Java

    Hello,
    This is my requirement.
    I have a method that takes class name as a parameter.
    Ex:
    Object myMethod(String classname){
    Object xyz = getObject(); //userdefine method which returns some object
    /*<b>I need to typecast above object with the class name passed as the method parameter</b>*/
    /*<b>How can i type cast this object</b>*/
    Object obj = (classname) xyz;
    return obj;
    In the above example, how can i dynamically typecast the object with class whose name is passed as the method parameter?

    Hello,
    This is my requirement.
    I have a method that takes class name as a parameter.
    Ex:
    Object myMethod(String classname){
    Object xyz = getObject(); //userdefine method which
    returns some object
    /*<b>I need to typecast above object with the class
    name passed as the method parameter</b>*/
    /*<b>How can i type cast this object</b>*/
    Object obj = (classname) xyz;
    return obj;
    In the above example, how can i dynamically typecast
    the object with class whose name is passed as the
    method parameter?Perhaps a little more background on the project (what you are trying to do) will help the experts here answer?
    /*with a class that takes a noarg constructor*/
    public Object getObject(String classname) throws Exception
      //might want to get a bit more specific with which exceptions it will throw
      return Class.forName(classname).newInstance();
    }Do I think this sometimes is indicative (perhaps even more often than not), of a possible design flaw? Yes..
    It gets a little trickier if you have constructors (you have to create a Class object representing the string with the .forName(..) ..and then use some reflection to determine constructors and then a bit of logic to determine which of those to use...)
    ~Dave

  • Is it possible to make a partition in Windows 7 and then place OS X on that partition?

    My employer just gave me a new MBP 13" with Windows 7 on it.  It has bootcamp running, but no option to boot in Mac OS.  IT dept. said they deleted Mac OSX Lion due to security concerns (?).  In any case, as I travel quite a bit and have and ipad and iphone, I would like to use Mac OSX for personal use and Windows 7 for work.
    Is it possible to make a partition in Windows 7 and then place Mac OSX Lion on the partition so that I do not need to reinstall Windows?   I know it would be possible to wipe the HDD and then add Mac OS, then bootcamp, then Windows 7, but adding again would get my IT dept involved which would put me back to square one.
    Any help would be appreciated!!
    JF

    Ok let me ask you IF the IT department of your workplace does NOT want OS X installed on "THEIR" (The Companies) computers because of what they think is some type of security issue why are you trying to go against their wishes and install OS X on a computer that is NOT owned by you.
    That could cost you your job.
    If you continue down this path you will screw up the Windows install and have to take the system back to the IT department to get it fixed. What do you think they will say at that point?
    Do as you like but you would be better off just buying your own Mac computer if you are set on using OS X as your personal operating system.

  • Is it possible to make an multi-protocol IM in JAVA ???

    Is it possible to make an multi-protocol IM in JAVA
    ( like "pidgin IM")
    for the simultaneous chat with yahoo,MSN,gtalk
    rediff,XMMP clients IM.
    I m a newbie in java and know java up to Awt ,
    IO & Exception handling.
    what concept I have to learn for making this
    type of messenger.
    plss help..
    Thanks !!!!

    > but can you tell me how to connect in spark IM ??
    spark IM is multi-protocol IM or not ??
    Read the documentation or contact support for Spark IM. This forum isn't conducive to third-party application support.
    > From where should I start for making this
    multi-protocol IM ...
    This has already been answered in reply #1.
    ~

  • Is it possible to make a form in iWeb for people to fill in

    Is it possible to make a form in iWeb for people to fill in for people to subsribe

    There  are two possible form types that you can add to your website.  One is using a 3rd party form provider that, when filed in and sent, goes directly to you.  Expamples of them, JotForm and Wufoo can be seen here: Add Form
    Further down that page is the second type,  Form action forms, that use the visitors email application to send the response.  That may put off responders.  Take a look at both types.
    OT

  • Is it possible to make a button with multiple paths?

    Hello and good day Everyone
    I want to make a flash game with a map leading to various places for example school or beach like this http://www.yotreat.com/sites/default/files/190-160_1286.jpg
    if the player goes to the school she will find the teacher, and if the player goes to the beach se will find the coach.
    How can I make the player (for example) talks to the teacher at school, returns to the main map, and goes to the beach to talk with the coach, yet if she goes to the school again, the dialogue with the teacher won't be the same with first dialogue?
    =>>> Is it possible to make a button with different paths to go? As if you've watched frame A, then you push the same button again it will take you to frame B??? <<<=
    Sorry for my confusing description... I hope you get the idea >,<
    Im so desperate... I've been searching for articles about this since yesterday and I still can't find one to solve this problem of mine.
    Making games is my dream... I've made some very simple games, but I want to try a new level of difficulty
    Please help me? (>o<

    Thank you for the advice, sir Ned Murphy!
    Yes, I try to use variables now, but face another problem with it... would you please tell me what's wrong with my script?
    Here, in label: "School" I type:
    on (release) {
    if (point = 0){
    gotoAndStop("dialogue1");
    else if (point = 10){
    gotoAndStop("dialogue2");
    else {
    gotoAndStop("dialogue3");
    (it's only a testing, so I only use these 4 labels)
    and in label: "dialogue1", "dialogue2",and "dialogue3" I type:
    on (release) {point += 10;}
    on (release) {
    _root.gotoAndStop("school");
    The result when I test movie:
    1. At "School" (shows point=0), I click the button,
    2. then occurs "dialogue2" (shows point=10), I click the button,
    3. then back at "school" (shows point=20), I click the button,
    4. then occurs "dialogue2" again (shows point=10)
    even the first shot is wrong
    point=0 should be the entrance to "dialogue1", but all I can get is "dialogue2"...
    Please tell me what's wrong with my script, sir Ned Murphy,
    Thank you very  much
    Regards,
    Tami

  • Dynamic Type casting

    Can we dynamically type-cast an object reference passed to Object Clss to that specific class?
    Here is what I want to do.
    I am going to pass an object reference to a method, which has Object class as parameter to it, as shown below. Using getClass() or some other way, I want to dynamically typecast this reference to the original Class and call some method of this Class.
    void test (Object ref1){
    ((ref1.getClass())ref1).writeLog();
    By doing this, am I violating the basic Object Orineted rules?

    I mean, consider an hypothetical case (which is wrong
    from OO point of view) that there are suppose 10
    classes in my system. None of them related to each
    other, all are independent classes. But each one has a
    method called, writeLog(). Now I want to write one
    method which will be called by each of these classes
    (in some 11th class), which will have "Object" as a
    parameter. Now using the actual reference I want to
    call the corresponding writeLog() method.
    1 - Point out to management that the design is now officially broken.
    2 - Point out that if the design is not fixed then any solution that impliments the changes will cost more to maintain in the future and will likely lead to instabilities in the system (due to complexity.)
    3 - Implement one of the suggested solutions and make sure that you put in a lot of error checking and logging in the hacked solution.
    4 - Produce extensive documentation about the impact of changing any of the objects that you are relying on. Push it to anyone and everyone that might ever touch or even suggest changes to the code.
    Doing all of the above allows you to live stress free when the next revision breaks because someone didn't understand the implications of your hacked solution. You will be able to find the problem quickly and point out that it had nothing to do with your code but rather because someone else did not follow the complete documentation that you produced. And then when they complain that your solution was a hack you can point out that you explained that previously as well.

  • PR-is it possible to make a pr without entring valuation field?

    Hi all expert,
    i have required one scenarion in purchase rquisition. in our company they want that they make a purhase requisition for issuing a Truck Or ant fleets. and the authorised person could release it.
    but the problem is in purchase requisition w dont want valuation .
    is it possible to make a pr without entring valuation field.
    regards,
    santosh

    First go to SPRO-MM-Purchasing-Purchase Requistion-Define Document types and Identify the Field Selection Screen for Document types.
    Now Using the Same Path go to Define Screen layout at Document level and Change the Field Price & Price Unit as Optional and Save and Try again.
    Regards,
    Ashok

  • Why we use type casting  ' ?='

    Hii Team
    sample code for fetching the input value from search view which is connected to btq1order contextnode
    DATA : lr_qs TYPE REF TO cl_crm_bol_dquery_service,
           lr_qr TYPE REF TO if_bol_bo_col,
    lr_qs ?= me->typed_context->btq1order->collection_wrapper->get_current( ).
    lr_qr = lr_qs->get_query_result( ).
    I am new to SAP CRM .while understanding the code i got stuck in one problem that ,
    1.what is the main purpose behind
    TYPE CASTING ie;  '?='
    2.what happens if we write ?=  becoz if we write  '='  instead of  '?='  the system thows an error.
    3.when to use this operator ?= and when we cannot use ?
    It is used almost every where in BOL coding .please help me  by giving complete explaination with an example if possible.
    Thanks in Advance

    Hi Abhishek,
    Please check returning parameter type for get_current_dquery() method. In case returning type is mutually convertible then you don't have to use type casting.
    But in case where you are taking results in some other type where results are compatible but with different structure then you use type casting.
    best example would be cl_crm_bol_entity and if_bol_bo_property_access. Here property access is an interface to class and hence we use type casting.
    Please refer to:
    type casting
    You can find more documentation on internet if you search for type casting.
    Regards,
    BJ

Maybe you are looking for

  • Itunes wont open...still

    Okay so a while back my itunes was working perfectly normal and i wanted to update. So i did to Itunes 10.5 i belive then the error 7 (windows error 5) kept appearing. So i tried the whole uninstall and reinstall (getting rid of everything) and updat

  • How to convert varchar to int in MSSQL?

    Hi, I am using mssql. how can i convert varchar to int type. for eg. id (int) txt(varchar) 1 ---------10 2 ---------10a 3 ---------10b i want to convert varchar to int. HOw? pls explain with query. Thanks edward

  • Create quotation from DP81

    Hello Experts, I run DP81for creating quotation from the sales pricing which comes from the planned cost of my project. Dynamic items are created based on the activity type. Eg: Junior consultant - 100 hrs - $10000, Senior Consultant-100hrs-$20000 Wh

  • Original apps from the phone all desapeared. settings, app store, safari..

    I was using the IM app about 30 min ago and when i closed it i noticed the apps on the botton were gone. (phone safari and txts) i went to look for the rest and they were all gone as well. i have all the games and stuff i bough from the app store sti

  • FORIEGHN TRADE

    Hi Gurus.,               Can any one send me the information or step by step information on Forieghn Trade., Pls mail me to [email protected] Points are awarded to all the gurus helped Narayana Message was edited by:         manam narayana Message wa