Static verse dynamic dispatch call

I'm just getting started with creating my own lab view classes using the class object but I'm having trouble with some of the basic concepts. Are there any good tutorials or knowledge base articles which talk about how to create and use LabVIEW classes? I'm getting hung on static verses dynamic dispatch calls specifically.
Any help would be appreciated!
Thank you,
Craig

I'm still getting a handle on LVOOP myself.
Those two different methods control which VI actually gets called when your app is running.
THe static method is very similar to calling a normal sub-VI in LV except you are passing LVOOP data.
The dynamic comes into play when you have more than one class and one is a child of the other. In that case you can create a VI for the child that has the same name as a VI in the parent, but because it has different data, the data it accepts and return is different. This OTHER VI in the child will under the right condition be called instead of the VI in the parent. I understand this to be concidered over-riding. Which versino will be called? It is dicated by the data you pass to the sub_VI call. If you pass the parent data, the parent versino will be called and vise versa.
So the VI to call is determined at run-time depending on the data.
I hope I got that right!
Ben
Ben Rayner
I am currently active on.. MainStream Preppers
Rayner's Ridge is under construction

Similar Messages

  • Can we call same VI statically and dynamically in same application ?

    Hi,
    I am having an application where i call a VI dynamically using VI server. However at some other place in the same application, i call the VI statically (i.e. the VI icon is placed in the block diagram of parent VI). But when i run the application i get following error message:
    "Possible reason(s):
    LabVIEW: The VI is not in a state compatible with this operation."
    Why is it so ?. Can we not call the same VI dynamically and statically at two differenct locations in the main program ?.
    Thanks for any inputs.

    If a VI is statically in a running hierarchy, it can be also called dynamically using "Call by Reference" node after opening it with a its type specifier refnum. However, you can't invoke the Run VI method, the same way you can't run it using the Run arrow.
    LabVIEW, C'est LabVIEW

  • Problem with combination of LabVIEW classes (dynamic dispatch), statechart module and FPGA module

    SITUATION:
    - I am developing a plug-in-based software with plug-ins based on LabVIEW classes which are instanced at run-time. The actual plug-in classes are derived from generic plug-in classes that define the interfaces to the instancing VI and may provide basic functionality. This means that many of the classes' methods are dynamic dispatch and methods of child classes may even call the parent method.
    - Top-level plug-ins (those directly accessed by the main VI) each have a run method that drives a plug-in-specific statechart.
    - The statechart of the data acquisition plug-in class (DAQ class) calls a method of the DAQ class that reads in data from a NI FPGA card and passes it on to another component via a queue.
    PROBLEM:
    - At higher sampling rates, an FPGA-to-host FIFO overflow occurs after some time. When I "burden" the system just by moving a Firefox browser window over the screen, the overflow is immediately triggered. I did not have this kind of problem in an older software, where I was also reading from an FPGA FIFO, but did not make use of LabVIEW classes or statecharts.
    TRIED SOLUTIONS (WITHOUT SUCCESS):
    - I put the statechart into a timed loop (instead of a simple while loop) which I assigned specifically to an own core (I have a quad-core processor), while I left all the other loops of my application (there are many of them) in simple while loops. The FIFO overflow still does occur, however. 
    QUESTION:
    - Does anybody have a hint how I could tackle this problem? What could be the cause: the dynamic dispatch methods, the DAQ statechart or just the fact that I have a large number of loops? However, I can hardly change the fact that I have dynamic dispatch methods because that's the very core of my architecture... 
    Any hints are greatly appreciated!
    Message Edited by dlanger on 06-25-2009 04:18 AM
    Message Edited by dlanger on 06-25-2009 04:19 AM
    Solved!
    Go to Solution.

    I now changed the execution priority of all the VIs involved in reading from the FPGA FIFO to "time critical priority (highest)". This seems to improve the situation very much: so far I did not get a FIFO overflow anymore, even when I move around windows on the screen. I hope it stays like this...

  • Perform static and dynamic check together on a customer?

    Hello All,
    Is it possible to perform static and dynamic check together on a customer?
    I believe standard SAP does not allow both options together.
    The scenario is: My client has customer who orders products 1 year in advance and create sales order with a future delivery date. The customer might have balance due on their account which is close to the credit limit. As a result the sale order should be blocked as if the automatic credit check is "Static". This would allow our customer service to call the customer and arrange for the payments.
    Then 11 months later, a dynamic check should be performed on the customer to make sure the past due is under the credit limit. If the past due is over credit limit, the sales order must be blocked for delivery as if the credit check was "Dynamic" with 30 days horizon. This would again give our customer service time to settle the payment with the customer.
    If anyone has implemented such a scenario, can you please give me an overview of how you did it?
    Thanks very much in advance and Text Removed.
    With Regards,
    AM
    Edited by: Lakshmipathi on Nov 13, 2010 9:23 AM
    Please dont include this text

    Static and Dynamic Cannot be Performed together. They are mutually exclusive events.
    Credit check can be performed either at Sale order level or at Delivery / PGI Level.
    FCV3 is a good report to see whether a customer would fail a credit check. ( suitable for your customer service )
    Coming to your Point , Assuming that the customer is eligible for a Credit of 50 Lacs. Now the Customer has placed an order for 60 Lacs. We set the Customer credit checking at  order level . The Customers Sale order would get blocked.
    The Customer service  will follow up for the payment and see to it that it is made. Assume the customer has made a payment for 70 Lacs.
    Now let us have a look at the account statement of the customer.
    Account Statement :     Customer Cr :  70 Lacs.   Dr   :  0.  ( because no delivery and invoice  so far has been made )  
    So we are supposed to deliver the Material worth value of 60 Lacs.
    The First sale order worth 60 Lacs has been unblocked in VKM3. Now at the time of Delivery level why would you want to chekc the Credit limit again ? It has already passed the credit check.
    It is not necessary to check credit limit . Because you have already performed the same at the order level.
    Now the customer has come again and raised another sale order for 80 Lacs. The System would block him.
    The system will never block the Previous delivery which you are, due for delivery  to the customer.
    If we keep on checking the Credits without delivering we would end up only raising in Sale orders and no Delivery to the Customer  at all. The Debit side of his account will always be 0.
    So i donot think Static and dynamic is needed . you can go for either Static or Dynamic.

  • Mixing static and dynamic content in a single outputText value causes NPEs

    Hi,
    I am having a problem and I'm wondering if it is a result of my error or if this is a bug.
    I am mixing dynamic and static content in the value attribute of tags (e.g., outputText). On initial page load, everything works fine. However, if the same view is reloaded (e.g., after a failed validation) I get an NPE from JSF:
    [#|2006-10-24T08:49:03.756-0500|SEVERE|sun-appserver-pe8.2|javax.enterprise.system.container.web|_ThreadID=12;|StandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
    java.lang.NullPointerException
            at com.sun.faces.el.MixedELValueParser.getNextToken(MixedELValueParser.java:140)
            at com.sun.faces.el.MixedELValueParser.parse(MixedELValueParser.java:123)
            at com.sun.faces.el.MixedELValueBinding.getValue(MixedELValueBinding.java:60)
            at javax.faces.component.UIOutput.getValue(UIOutput.java:147)
            at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:82)
            at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:201)
            at com.sun.faces.renderkit.html_basic.LabelRenderer.encodeBegin(LabelRenderer.java:128)
            at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:683)
            at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:443)
            at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:233)
            at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:701)
            at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:445)
            at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:130)
            at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:701)
            at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:445)
            at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:233)
            at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:701)
            at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:445)
            at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:130)
            at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:701)
            at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:445)
            at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:233)
            at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:701)
            at javax.faces.webapp.UIComponentTag.encodeChildren(UIComponentTag.java:609)
            at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:546)
            at com.sun.faces.taglib.html_basic.PanelGridTag.doEndTag(PanelGridTag.java:460)
            at org.apache.jsp.registration_jsp._jspx_meth_h_panelGrid_0(registration_jsp.java:324)
            at org.apache.jsp.registration_jsp._jspx_meth_h_form_0(registration_jsp.java:223)
            at org.apache.jsp.registration_jsp._jspx_meth_f_view_0(registration_jsp.java:157)
            at org.apache.jsp.registration_jsp._jspService(registration_jsp.java:118)
            at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336)
            at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:297)
            at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:247)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
            at sun.reflect.GeneratedMethodAccessor188.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
            at java.security.AccessController.doPrivileged(Native Method)
            at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
            at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
            at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
            at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
            at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
            at java.security.AccessController.doPrivileged(Native Method)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
            at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:723)
            at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:482)
            at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:417)
            at org.apache.catalina.core.ApplicationDispatcher.access$000(ApplicationDispatcher.java:80)
            at org.apache.catalina.core.ApplicationDispatcher$PrivilegedForward.run(ApplicationDispatcher.java:95)
            at java.security.AccessController.doPrivileged(Native Method)
            at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:313)
            at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:326)
            at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:132)
            at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
            at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:248)
            at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:194)
            at sun.reflect.GeneratedMethodAccessor202.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
            at java.security.AccessController.doPrivileged(Native Method)
            at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
            at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
            at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
            at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
            at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
            at java.security.AccessController.doPrivileged(Native Method)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
            at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:189)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doProcess(ProcessorTask.java:604)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:475)
            at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:371)
            at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:264)
            at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:281)
            at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:83)My code looks like this:
    <h:outputText escape="false"
              value='<link href="#{myBean.styleSheet}" rel="stylesheet" type="text/css"  />' />If I replace this with a much more convoluted set of tags, it works:
    <h:outputText escape="false"
              value='<link href="' /><h:outputText escape="false" value="#{myBean.styleSheet}"
              /><h:outputText escape="false" value='" rel="stylesheet" type="text/css" />' />So is the problem that I am mixing dynamic and static content with a single value? If so, why does it work on the first view, and not after?
    If it matters, I'm using the reference implementation version 1.1 (as included with NetBeans 5.5RC2) on SuSE 10.0 w/ JDK 1.5_09.
    Thanks,
    Bill

    Yes, that's how I originally had it, but then changed it to the outputText approach since a single tag could do what I wanted, as long as I was allowed to mix static and dynamic content within a single value.
    I think this is a bug in JSF 1.1, since if what I am doing is illegal, it should throw an exception on the first page view, not work on first view and throw an exception on subsequent views. I'm guessing that this has something to do with the fact that on first page view it only runs the restore view and render response JSF phases, while on subsequent requests all of the phases will be run, and it's in one of those other phases that the exception is thrown.
    For now, multiple tags is the work-around, I guess.
    Thanks,
    Bill

  • Double dynamic dispatch

    I'm just throwing an idea out here for a moment.....
    I'm fiddling about a bit with OOP at the moment (LVOOP to be precise) and I'm wondering if I can use it in a semi-nice way to do a certain task.
    I was wondering if it's possible to have a VI which takes an instrument class as an input (with Dynamic dispatching) and accepts a second class as secondary input (also Dynamic dispatching).  This would most likely mean I need a lot of VIs to cover all Class 1 & Class 2 options, but that's do-able.
    I'm toying with ideas still stemming from my nugget a while back.  I basically have a family of instruments (spectrometers) which have different parameter sets which I would like to have settable independently of each other.  It would be quite nice to have a single "set" function accepting two classes (one for the instrument, one for the data to be set), then causing the correct routine for this data set to be called without me having to parse strings, variants or anything like that.
    The LV help says "Note  Although a dynamic dispatch member VI can have no more than one dynamic input, the VI can include multiple dynamic outputs" but I was wondering if there's a workaround to allow something of this kind.
    Of course I could just try things out, but that'd take me quite a while as I'm not yet very proficient with LVOOP.
    Shane.
    Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)

    Thanks for the help,
    I have already implemented a small LVOOP routine, and it sure made sense when I was writing it myself.  But I downloaded some examples (LV2OOP) and I found it downright confusing.  I feed like a real n00b!
    I'm convinced there are some really powerful uses for it, but I just don't have the same feeling of "I know this" as with other areas of LV.  I've been working with 6.1 until recently.  I think I need some courses.  Learning from zero is easier than re-learning stuff you thought you'd already learned.....
    I can only imagine others feel the same way.  Some way to highlight what's going on behind the scenes with a LVOOP project would probably go a LONG way to converting people.
    Again, thanks
    Shane.
    Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)

  • OSB: Static Vs Dynamic Routing With "Get All Headers"

    Hi
    How Static and Dynamic Routing works when calling Business Service pointing to a service inside or out-side the domain with respect to carrying "Get All Headers".
    The scenario is
    I have two BIZ services of http protocol, B1 pointing to a serive with-in the same domain and B2 pointing to a serivce outside the domain.
    Now i am calling both BIZs throught Static and Dynamic Routing
    1. Proxy X calls BIZ1 using Static Routing
    2. Proxy X calls BIZ1 using Dynamic Routing
    3. Proxy X calls BIZ2 using Static Routing
    4. Proxy X calls BIZ2 using Dynamic Routing
    Question: In all 4 cases, does "Get All Headers" get passed to called service?. How is the behaviour?
    Thanks
    Venkata Madhu

    If you're getting errors like -
    ORA-12514: TNS:listener does not currently know of service requested in connect
    And you're database has been started you can -
    'alter system register'
    and that will register the database with the listener.
    If you are trying to start up databases remotely you need to have a static entry (listener.ora entry) otherwise you will not be able to connect to the database and will get the above error. I've seen people connect remotely, shutdown the database, try startup and they are not able to. Good way to shoot yourself in the foot.

  • Static or Dynamic

    I have residential Verizon Fios. What type of IP address do I have? Static or Dynamic?  According to IP lookup I have a Static IP. This has just happened over the last day or so.  While logged into my Actiontec router I noticed three Connections, 192.168.1.1 router, 192.168.1.2 This one is a REMOTE Connection, 192.168.1.6 is my PC. I think I'm having problems with someone hacking my  account.  Any thoughts would be helpful.

    There is the public IP and the Internal IP Addresses.
    For the public IP, unless you are on Business grade - then you are using Pure DHCP OR PPPoE DHCP.
    For the Internal IP Addresses, they can either be DHCP (Dynamic) or Static.
    If you have a Static Internal IP Address as shown in the router's screen, then that internal IP Address is used for some sort of server. This can be a print server or a web server.
    Someone might be trying to a run a server behind your router and allow users from the Internet to connect to that server (called portforwarding).
    If you are the original poster (OP) and your issue is solved, please remember to click the "Solution?" button so that others can more easily find it. If anyone has been helpful to you, please show your appreciation by clicking the "Kudos" button.

  • Dynamic dispatch too dynamic!

    It seems that the dynamic dispatch feature in 9i is too dynamic.
    Too dynamic because it's not possible to execute super methods
    in an overridden method. In Java, the keyword "super" is used to
    invoke the corresponding method on the super class, in C++ the
    programmer can control which class' method is called by using
    the class name.
    I'm trying to accomplish this with PL/SQL. At OpenWorld 2000 it
    was told that a keyword SUPER could be used to access the method
    on the super class but I cannot find this in the documentation
    and I've tried to invoke the given type's method directly, but
    the dynamic dispatch goes into a recursive loop because it calls
    the overridden method directly.
    Some examples are in place here:
    create or replace type person as object (
    name varchar2(30),
    address varchar2(100),
    member function print return varchar2
    ) not final;
    show errors
    create or replace type body person as
    member function print return varchar2 as
    begin
    return(/*super() ||*/ 'PERSON: { name = ''' || name ||
    ''', address = ''' || address || ''' }');
    end;
    end;
    show errors
    create or replace type student under person (
    dept varchar2(30),
    overriding member function print return varchar2
    ) not final;
    show errors
    create or replace type body student as
    overriding member function print return varchar2 as
    begin
    return(/*super() ||*/ 'STUDENT: { dept = ' || dept || ' }');
    end;
    end;
    show errors
    create or replace type part_time_student under student (
    numhrs number,
    overriding member function print return varchar2
    show errors
    create or replace type body part_time_student as
    overriding member function print return varchar2 as
    begin
    return(/*super() ||*/ 'PART_TIME_STUDENT: { numhrs = ' ||
    numhrs || ' }');
    end;
    end;
    show errors
    create table persons of person;
    insert into persons values (person('name', 'address'));
    insert into persons values (student('name', 'address', 10));
    insert into persons values (part_time_student('name', 'address',
    10, 15));
    select p.print()
    from persons p;
    In the PRINT method I would like to reuse the inherited method
    by calling it and let it do it's work without me having to copy
    the code to the overridden method. In other words, I would like
    to be able to call it using SUPER() or something similar. But
    SUPER isn't reckognized by the compiler so what should I use?
    I've also tried to call the method directly, eg in
    PART_TIME_STUDENT.PRINT call STUDENT.PRINT(SELF) but because the
    dynamic dispatch is too dynamic this actually calls
    PART_TIME_STUDENT.PRINT recursively -- endless loop :-(. I would
    consider this as a bug because I tell the compiler exactly which
    method I want to call, as opposed to O.PRINT where I invoke the
    most specialized method on an object O.
    How can this be done?
    Thanks.
    Finn Ellebaek Nielsen
    ChangeGroup ApS

    Finn,
    It was an oversight, that 'super' didn't make it into the
    release. The suggestd work around was to use the name of super
    type explicitly as you have tried and failed.
    Do you have a matalink customer id to file a iTAR? Let me know
    if you don't have one.
    Regards,
    Geoff
    It seems that the dynamic dispatch feature in 9i is too dynamic.
    Too dynamic because it's not possible to execute super methods
    in an overridden method. In Java, the keyword "super" is used to
    invoke the corresponding method on the super class, in C++ the
    programmer can control which class' method is called by using
    the class name.
    I'm trying to accomplish this with PL/SQL. At OpenWorld 2000 it
    was told that a keyword SUPER could be used to access the method
    on the super class but I cannot find this in the documentation
    and I've tried to invoke the given type's method directly, but
    the dynamic dispatch goes into a recursive loop because it calls
    the overridden method directly.
    Some examples are in place here:
    create or replace type person as object (
    name varchar2(30),
    address varchar2(100),
    member function print return varchar2
    ) not final;
    show errors
    create or replace type body person as
    member function print return varchar2 as
    begin
    return(/*super() ||*/ 'PERSON: { name = ''' || name ||
    ''', address = ''' || address || ''' }');
    end;
    end;
    show errors
    create or replace type student under person (
    dept varchar2(30),
    overriding member function print return varchar2
    ) not final;
    show errors
    create or replace type body student as
    overriding member function print return varchar2 as
    begin
    return(/*super() ||*/ 'STUDENT: { dept = ' || dept || ' }');
    end;
    end;
    show errors
    create or replace type part_time_student under student (
    numhrs number,
    overriding member function print return varchar2
    show errors
    create or replace type body part_time_student as
    overriding member function print return varchar2 as
    begin
    return(/*super() ||*/ 'PART_TIME_STUDENT: { numhrs = ' ||
    numhrs || ' }');
    end;
    end;
    show errors
    create table persons of person;
    insert into persons values (person('name', 'address'));
    insert into persons values (student('name', 'address', 10));
    insert into persons values (part_time_student('name', 'address',
    10, 15));
    select p.print()
    from persons p;
    In the PRINT method I would like to reuse the inherited method
    by calling it and let it do it's work without me having to copy
    the code to the overridden method. In other words, I would like
    to be able to call it using SUPER() or something similar. But
    SUPER isn't reckognized by the compiler so what should I use?
    I've also tried to call the method directly, eg in
    PART_TIME_STUDENT.PRINT call STUDENT.PRINT(SELF) but because the
    dynamic dispatch is too dynamic this actually calls
    PART_TIME_STUDENT.PRINT recursively -- endless loop :-(. I would
    consider this as a bug because I tell the compiler exactly which
    method I want to call, as opposed to O.PRINT where I invoke the
    most specialized method on an object O.
    How can this be done?
    Thanks.
    Finn Ellebaek Nielsen
    ChangeGroup ApS

  • Combining LVOOP DVR with Asynchronous Dynamic Dispatch and Preserve Run-Time Class

    OK, the title sounds like a cornucopia of LVOOP terms.  But there's a reason.  This is in a way an extension of THIS thread.
    What I'm doing recently is creating a LVOOP approach to loading Completely Asynchronous UI elements into subpanels.  This I have combined with a global repository for the objects (which are essentially singletons with a UI functionality) which are shared via DVR, thus eliminating a lot of synchronisation headaches).
    This means that I can ahve a universal framework for launching the UI elements into a subpanel.  The changes made on the Object there are automatically reflected in the global repository.
    So far so good.
    What I don't like too much is a combination of two seemingly awkward code constructs I need in order to keep things running.
    Weird construct 1:
    I have defined a "Launch UI" function in my parent class which is Dynamic Dispatch (Allowing each object to take care of launching its own UI).  This takes a parent object DVR as a second input which I make sure is of the exact same type as the object type being invoked by using the code shown below.  The ACTUAL Type of both inputs to the launch VI within the IPE are identical.  This is guaranteed because I require each new class to override this function.
    Here I pass the DVR from outside the IPE to the "Launch" VI but the Object obtained within the IPE retains information required for DD thus ensuring that the VI called for launching the UI is identical to the ACTUAL object type in the DVR.  This works OK and by placing this weird construct WITHIN the parent class, abuse is minimised, it works fine and seems to have no major side-effects.
    So now we have a VI running asynchronously in the background which belongs to a specific object but has a DVR which it *thinks* is of a Parent Type but, because of the steps taken earlier, is actually of the same type as the object itself.
    In order to make use of the functionality defined in this actual object type, I need to continuously re-interpret the Object within the IPE as shown below.  Otherwise only the Parent functionality is available.
    If I am accessing only methods of the parent class, then the Preserve functionality is not needed.
    Is there a more elegant way to do this?  I find the net result of this code and type-juggling to be really useful and much easier to manage than the non-DVR route since the synchronisation issues disappear.  By making the IPE usage near-atomic we remove the chances of deadlock.
    All editing done in the UI of the asynchronous VI is reflected automatically in any subsequent usage of the DVR.  Even if the DVRs are not shared between VIs, this makes (for me) the headache of synchronisation easier.  If you start expanding this beyond the limits of a single VI, the benefits in Synchronisation become really huge.  You can even have multiple UI objects operating on the same data in the background without extra synchronisation needs.  The only synchronisation required is a global "Data updated" for the object in question whereby the UI elements simply update their indicators and controls from the DVR again.  This is trivial.
    Thus I am convinced that the net result of this is very beneficial.
    My question is if there's a better, safer or more "official" way to do this?
    I was about to start a new Idea for combining the "Preserve Run time Class" and the DVR Terminal of the IPE so that the casting is done automatically.  We could then have a double input to the IPE, the DVR (of base type) plus the ACTUAL Type of the object but of course returning an error if the types are incompatible.  It would be like an "Imposter" DVR input for the IPE which allows a re-interpretation of the object type.
    Would all of this go away if we allowed Dynamic Dispatch to work with DVRs?  Probably.
    Shane
    Say hello to my little friend.
    RFC 2323 FHE-Compliant
    Solved!
    Go to Solution.

    You guys rock!
    I didn't even think of casting the DVR like that.  Kinds stupid of me but I never would have thought it would work.  Cool.
    Also, Yeah, the limitation of no IPE in the Launch VI was one I spotted quite early on.  this is why my Launch VI also doesn't accept more data than is absolutely neccessara because a DVR access in that VI will of course cause a lockup.  I have the system so far now that I can have a SINGLE Launch VI (Which is NOT overridden, so the limitation refers to only a single VI now which is certainly better.
    So again guys, thanks for helping out an old newbie.  I've been around for quite a while, have made many posts but I love the way I just keep learning from others in the Forum.  This is just why I absolutely LOVE it here. 
    Shane.
    Say hello to my little friend.
    RFC 2323 FHE-Compliant

  • Dynamic dispatch VISA and net

    Hi,
    I am learning to use LVOOP. I want to have hardware abstraction layer (HAL) for my test program so it works for different instruments.
    Most of the instruments are connected to the computer using GPIB so I can use VISA.Therefore, I created a hardware abstraction class called "meter" with a VISA as its property. So I have a dynamical dispatch VI called write VISA. This can work if all the child instruments are communicated with VISA.
    However, one instrument is connected using USB and the vendor's instrument driver is .Net. So this one instrument won't work with dynamical dispatch because I can't using write VISA.
    What is the best way to handle this situation?
    Thanks,
    Joseph
    Solved!
    Go to Solution.

    This would be an idication of a poor OOP design. What would be a prefered design would be to define a base class which contains the common methods for the device family you are abstracting. Rather than having a generic write you are better off to define methods interms of functionality , such as set power. You could make these methods be pure virtual which means chilredn classes must provide an implementation for that method. With this design you cannot create an instance of your base class but would create the correct child instance which is specific to the particular meter you are using. Also, having a method called "writeVISA" implies th eimplementation. Which as you found out makes it difficult for your to create USB or TCP implementations. If you want to provide a generic write methos simply call it write. Again, force the child classes to provide an implementation pof the method and they will provide the correct code necessary to communicate with the device. it may uise VISA, the native TCP or can and string methods. It doesn['t really matter. It is up to the child class ro provide the specific implementation.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • OOP debugging dynamically dispatched VI

    I'm using OOP to create a hardware abstraction layer (it's secondary to this question but search for "How to Mitigate Hardware Obsolescence in Next-Generation Test Systems" and look at version 2) and backed myself into a corner.  My code stopped at a breakpoint on a dynamic dispatch VI and I stepped into the dynamic VI.  After stepping partway through the VI I accidently closed the dynamic VI, with execution paused in it.  I couldn't find a way to get back to the paused block diagram to continue (double clicking on the VI call allowed me to opened a clean copy of the VI, but not the paused copy).  Is there a way to regain control short of killing everything and starting over?

    You can open a reference to the clone and then use a property node to open its FP or BD. To open a reference to the clone use a for loop and open a reference to My Class.lvclass:My VI.vi:X where My VI is your VI's name and X is a running number starting from 1 and going up to something (I would suggest a while loop you stop manually). One of these numbers will be the number of your clone (they are assigned when the clone is created in memory, so you can't know it in advance. Also, be sure to ignore the errors in the loop, as you will get them for all the clones that don't exist.
    Try to take over the world!

  • Load class from XML (Dynamic Dispatch)

    I'm continuing my voyage into the realms of LVOOP.....
    I have encountered a new problem which I am sure there's a solution to.....
    I have a certain hierarchy and I want to implement a single save and load routine for all objects int he hierarchy (located int he parent class of course).
    Using the "flatten to XML" I'm able to create some nice XML files with all parent and sibling information saved (as long as the values are non-default of course).
    Where I am running into problems is the loading of the data within this XML file.  I want to be able to take an object and basically re-initialise it to the values within the file.  All fine and good I thought, but it doesn't work.
    The problem is that when using the VI with Dynamic dispatch inputs, the output of the "Unflatten from XML" is giving me a conflict with the Dynamic dispatch output saying the obejct types do not  necessarily match.  Is it not possible to match the object type on the input and output of the "Unflatten from XML" primitive?
    If I try removing the "Dynamic Dispatch" input to a static input, then it only loads the data for the parent class regardless of the actual input class.
    Am I doing something silly here or is there no other way to properly load a sibling class from a file using only a method residing within the parent class?  I was hoping I could have a single "Save-Restore" function residing within my parent class to make life easier for me.
    Shane.
    Message Edited by Intaris on 06-17-2009 05:24 AM
    Say hello to my little friend.
    RFC 2323 FHE-Compliant

    Hi Tst,
    Problem is that in order for the cast to yield any useful results, I have to make the inputs and outputs non-Dynamic which results in ONLY the data for the parent class being loaded.
    If the inputs and outputs are Dynamic, then a cast will not solve the problem (It could be a grandchild class being cast as a child, thus breaking the dynamic dispatch tables).
    The only solution I see is for the "UnFlatten from XML" to RETAIN the true object type.
    Either that or use my beautiful solution 
    Shane.
    Ps I just did a bit of a test of the race condition probabilities.  I ran 100000 tests (100k) with a program stressing both cores AND ram of my machine in parallel and all 100k of 100k iterations worked out OK.  I suppose that lets me think I should be in the range of at least 99.99%....... 
    Say hello to my little friend.
    RFC 2323 FHE-Compliant

  • Dynamic Dispatch

    Hello,everybody,
       I am new to LVOOP,now I try to utilize LVOOP to current project, but  it seems that I encouter a strange dynamic dispatch problem, I draft two demo vi called System_CAN_Demo1.vi and Node_CAN_Demo1.vi respectively, they should have the same implement behivour. I add a break point on the block program  located " ..\CAN\Network management\Wake up line\Execute.vi", and it should be dynamic dispatched as the  execute method has been overriden. but It appears System__CAN_Demo1.vi normal while Node_CAN_Demo,vi abnomal.
    please check out the attachment code for details.
    Attachments:
    Dynamic Dispatch ---Debug.zip ‏375 KB

    Your subclasses have two copies of the st variable, one in the superclass and one in the subclass itself.
    By accessing it directly through a superclass reference, the "wrong" one is used.
    In other words, don't do that. Your superclass already has the st variable, so there's no reason to declare it in the subclasses.
    Also you should make the variables private and use getters/setters to access them.

  • AT0 : static and dynamic processing

    dear guru ,
    whose are the differences in assembly to order with planned
    order between static and dynamic processing ?
    Thanks.

    Hi,
    Static assembly processing :
    If you create a sales order for a material with the 'assembly processing' technique, the system carries out an availability check for the components needed for the assembly and creates a single procurement element in the background.
    The procurement element is assigned to the sales order directly. The number of the procurement element is determined in the sales order.
    Dynamic assembly Processing :
    If you create a sales order for a material with the 'assembly processing' technique, the system carries out an availability check for the components needed for the assembly. Depending on the results of the availability check, either one or several procurement elements are created. The quantity for a one-time delivery and/or the next possible deadline for a full delivery and/or a delivery proposal with then ext possible deadline are displayed on the availabililty control screen.
    During dynamic assembly processing, you can not change the quantities and deadlines. You can, however, select the 'fix date and quantity' field, if necessary. The 'check scope' and 'other plants' functions are not available here.
    The procurement element numbers are not saved in the sales order. The link between the procurement element and the sales order is created using the number of the individual stage (sales order number/item). For this reason, it is possible to carry out another availability check taking into account incoming stock and additional, manually entered procurement elements.
    In Requirements class definition (OVZG), The assembly type indicator determines:
    - Which procurement element is created
    - Whether a 1:1 link exists between the sales order and the procurement element (static procedure) or whether a loose link exists with the option of splitting dates and quantities (dynamic procedure).
    In the case of static assembly order processing, you make the changes to the production order directly from the sales order.
    In the case of dynamic assembly order processing, you must call the production orders separately.
    Also refer link below for more details:
    http://help.sap.com/saphelp_47x200/helpdata/en/41/191eab45fd11d188ff0000e8322f96/frameset.htm
    Regards,
    Ashok

Maybe you are looking for

  • External monitor resolution in Vista on MacBook Pro

    I am running Vista Ultimate on a MacBook Pro. I have a Dell 24" external monitor plugged in, which supports a top resolution of 1920 x 1200. But Vista thinks it's a generic non-PnP monitor with a top resolution of 1024 x 768. I have installed the Win

  • Graphics problem.

    I use a pair of Vison 19" LCD screens that have a refresh rate of up to 75. So to stay on the safe side and not get the "Out of Range" sign, I keep my rates set to 60. Since upgrading to Leopard and doing updates, whenever I have more than one screen

  • Itunes stops working when accessing itunes match, Windows 8

    I installed itunes match a few months ago and it worked well once, but now whenever i start iTunes, it tries to access iTunes match for about 2 minutes, than I get a window "iTunes has stopped working" and it shuts down. I tried reinstalling, but no

  • OID 11g - OID AD sync: Error Bootstrapping Synchronization Profile

    I am seeing this error in the wls_ods1-diagnostic.log when I try to run sync [2010-04-02T14:13:28.714-04:00] [wls_ods1] [NOTIFICATION] [DIP-85022] [oracle.dip.mbean.sync] [tid: [ACTIVE].ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tun

  • How to open glassfish log file?

    I go to Program File/glassfish/domains/domain1/ but I not found anything. It's empty folder. How to open glassfish log file . please help me.