Array of objects in class private data and calling overridden VIs on these objects?

Hello
I am developing part of an application using the actor framework and have run into problems.
I have a several actors and will try briefly describe them and their intended functionality. All actors are started by a Controller actor and in the actor core for the controller I have the possibility to do a lot of intiliazation etc.
Logger:
Has a message (Send Log Message) that other actors can use to write to the log. It is supposed to take a string input and a log level (error, warning, debug etc). This message chain sends data to the actor core with a user event.
The Actor Core of Logger is supposed to save the incoming message to a log, but should be able to do it in several different ways (file, database, email or whatever).
Logger Output:
Abstract class that has a dynamic dispatch vi called "Write Output" that all it's children are supposed to overwrite.
Logger Output File
Child of Logger Output and overwrites "Write Output" to save the string to a file on disk.
Problem:
I want to be able to set up the actor core for Logger once and for all but still be able to create new children of "Logger Output" and have them be handled in the Logger actor core.
My idea was to have Logger use an array of objects as private data and initialize this array in the Controller actor core.
In the logger actor core I could then auto index the array and use each element (each Logger Output child) and the abstract "Write Output" vi to get the correct functionality.
HOWEVER, I cannot get this to work properly and I think I have misunderstood something or stared myself blind on this problem. I have tried 3 different methods when it comes to private data for Logger.
1. Labview Object
2. Array of Labview Object
3. Array of Logger Output Object
Of these 3 methods, I can only get the first one to work and that doesn't accomplish what I want in the end (being able to add more classes without changing private data / actor core for Logger).
I have included 3 screenshots that show snippets of 2 of the actor cores and the private data. File names should correspond to my description above.
The screenshot "Logger actor core.png" shows a very fast test of the 3 different methods I described above. Each of the 3 tunnel inputs to the event structure can be wired to the "Reference" input of "To More Specific Class", but only method 1 (Labview Object) works.
If you need additional information / screenshots or whatever please ask.
Thanks in advance
Attachments:
Logger ctl.PNG ‏8 KB
Logger actor core.PNG ‏25 KB
Controller Actor Core.PNG ‏11 KB

Thanks for the reply and sorry for the confusing OP. It was meant as a quick test and a way to skip making 10+ screenshots .
I updated the actor core for the Controller and Logger to be less confusing (hopefully) and attached 2 screenshots.
I agree with you that it would be a good idea to make a message for the controller that can launch new children of the L" abstract actor, but for these tests I have just launched it the easy way (dragging it to the controller actor core).
Both Logger Output and Logger Output File are actors and in Logger Output there is a dynamic dispatch vi called Write Output that I want to override in all its children.
The problem is when I run the actor core of Logger (see the screenshot) only the abstract version (the one in Logger Output) of Write Output is executed, not the overridden version from Logger Output File.
When I did the same thing with the actor cores looking like the did in my original post, then the correct overridden version got executed when I used the method with one Labview Object in private data (not any array or an array of Logger Output objects).
 EDIT: I just tried to have the Logger private data be a single Logger Output object and writing the Logger Output File to that piece of private data in the Controller and the correct Write Output override method gets called now. So apparently I have done something stupid when it comes to creating the array of Logger Output objects and writing them in the controller? The private data is in the Logger actor so I have simply right clicked and chosen "New VI for Data Member Access" and chosen "Write" for "Element of Array of Logger Output Objects".
Attachments:
Controller Actor core updated.PNG ‏10 KB
Logger actor core updated.PNG ‏24 KB

Similar Messages

  • How get controls name from a class private data?

    How can i get the names of the controls inside a class private data?
    I am using Actor Framework and trying to create a method tha will be executed when launch the actor. This method need a list o all the control names inside the class data to search for the initial value inside a configuration file (config.ini), the key on the configuration file will be the name of the control.
    Thanks.
    Solved!
    Go to Solution.

    You are already making the overriding method just because you have to write to the Bundle By Name.  And then how are you going to handle all of the data types the keys could be.  You are making things more difficult than it should be for really very little benefit.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Parent class private data accessable in Child class?

    Hi!
    I thought that this would be obvious, but my search foo fails me.  Hopefully someone would be kind enough to answer my newbie LVOOP question.
    I have a a parrent class.  This parrent class contains a cluster of class private data.  I setup all the accessor methods to this data.  I create a child class that has functions that need to access data stored in its parrent class.  Its inheritence is set, but when I try to unbundle the class data all I can seem to get to is what is setup in the child class' data cluster.
    I've watched a video and it looked like the data cluster magically appeared and was accessable through the children methods.  What am I missing?
    Thanks for input!
    -nic
    Solved!
    Go to Solution.

    Nickerbocker wrote:
    Well, that makes sense.
    One other quick question.  Is the procedure, New->"VI for Override..." from the context menu of my child class the only way to create a method that overrides the parents method?  Where is the property that defines this newly created VI as overriding my parent's VI?  Can I simply create a VI that is named the same and it have the same effect?
    That is the only method I use but I believe if you get all of your icon patterns and terminal marking as dynamic and all of the other rules, you should be able to do the same thing by hand (I base this guess on the fact I messed with those things and broke my ever-rides).
    The only thing I think has to be done from the project (scripting aside) is to set-up the inheritance.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • What to do to back Clear private data and other things I loose?

    It has about 15 days ago, it appear window Firefox on my desktop, to download 3.6.13 version. Inside this window wrote "URGENT" in yellow color, and attention, "computer online attack". When I finish to install this Firefox, I saw that I loose Clear Private Data and other things I had in the first line, on the top of computer (sign of mail etc.), and things where is the star and flash. 1. Was it yours or send it to me someone else...? 2. Does this 3.6.13 include Clear private data? 3. What to do to have again Clear private data? Please, wrote step by step, 4. What to do to back other important things I loose?

    You may have picked up a malware infection by allowing that install.<br />
    You should never respond to such unrequested pop-ups.
    Do a malware check with some malware scanning programs.<br />
    You need to scan with all programs because each program detects different malware.<br />
    Make sure that you update each program to get the latest version of their databases before doing a scan.<br />
    * http://www.malwarebytes.org/mbam.php - Malwarebytes' Anti-Malware
    * http://www.superantispyware.com/ - SuperAntispyware
    * http://www.microsoft.com/windows/products/winfamily/defender/default.mspx - Windows Defender: Home Page
    * http://www.safer-networking.org/en/index.html - Spybot Search & Destroy
    * http://www.lavasoft.com/products/ad_aware_free.php - Ad-Aware Free
    See also:
    * "Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked
    * [[Searches are redirected to another site]]

  • LabVIEW crashes when modifying OOP parent class private data control or typedef contained in that control

    I've been seeing strange behaviour when I modify the private data control of a class, especially if it is a parent class.  It seems that those changes are not always propagated to all the VI's in the project.  This sometimes causes my project to crash with an exception error, or sometimes the problem is more subtle as it will simply write data to the wrong elements in the control (when bundling/unbundling).
    I solve the problem by opening the typedef or class control by itself (i.e. not as part of the project), and then saving it.
    The next time I open the project all problems are solved.  This is a difficult error to track down but I now know to keep a list of typedefs or class controls that I have modified (using subversion helps here), and then when this strange behaviour or crashes happen, I simply close the project and open each modified typedef or class outside of the project and save them individiually.
    Anyone seen something like this too?

    Hmmm.... Have not seen what you are describing -- though occasionally I will see a class that appears broken until I open it by itself outside the project.
    How large is your application?
    How many classes do you use?
    How extensively do you use classes in the application?
    Could you post a screen shot of your project and how things are arranged in it?
    Does the problem seem to be related to any particular class or group of classes?
    Have you tried mass-compiling your code?
    Are the VIs set to separate the object code from the source?
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Why not Deprecate java.util.Date and java.util.Calendar

    With the introduction of java.time, why did you not flag java.util.Date and java.util.Calendar. These classes have been a bane to every Java developer and should never be used again with the introduction of Java 1.8.

    Adding the @Deprecated annotation would only just provide a warning about an old API and recommendation to the developer(s) to no longer use it. Doing so would not break any existing library out there; in fact quite a number of constructors and methods on the Date class have already been flagged deprecated.
    The new java.time package is far superior to Date/Calendar.

  • Possible to prevent Acrobat 7 saving private data from a form to temp file?

    I have a PDF order form with interactive fields that I want to post on my client's website. The form, created in Acrobat 7, is meant to be completed online then printed for faxing or mailing. It includes a field for a VISA number. I notice that once the form is filled in, the information persists even after closing and re-opening the PDF and the browser (in Windows XP, which I use, at least). If a user fills this form out at home, no problem. However, if a user fills it out at a public place such as an internet cafe, this is disastrous because anyone who opens the PDF thereafter will see the previous user's private information.
    Since I have no control over where users will be opening and completing this order form, is there any way I can set the PDF form to "purge" the field data when the file is closed, instead of saving it?
    Private data and especially credit card fraud is such a sensitive issue that any help would be much appreciated.

    You can clear the fields on the document will close event.

  • ANNA BROWSER - cleap private data

    Hello
    I just upgraded my N8 to ANNA, I like the new browser but I don't know I go to get to the menu that shows "clear private datas" and do clear the datas.
    I can change the settings of privacy but I cannot actually clear the datas.
    Can you help please?
    Solved!
    Go to Solution.

    It's not at all clear, but have found it with a bit of playing.
    On the settings page that you have found, (settings > Privacy) if you saelect the "All" under "Clear Privacy Data" and then select whichever set of data you want to clear it will do so. Selecting "all" brings up a confirmation request, the other options just go ahead and delete.
    N8-00 pc059C9F6 Belle
    808 PureView pc059P6W5
    Attachments:
    scr000029.jpg ‏41 KB
    scr000030.jpg ‏37 KB

  • Where will you keep your device's private data?

    Hi:
    It seems we have 3 choices to keep a device's private data:
    1. call ddi_soft_state_zalloc and store private data in the allocated structure.
    2. allocate a block of kernel memory and call ddi_set_private_data with pointer to this memory.
    3. allocate a block of kernel memory and set gldm_private to point to this area (for gld only).
    Could you please tell me which one you prefer and the reason for your choice?
    Thanks
    Best regards
    Steven

    I had the 6 for a couple months and it fit in my cup holder but the plus does not and so I will either keep it on my lap or in this small space in between the cup holder and the middle console.  I used to have a suction cup holder for my IPhone but it was too hard to keep grabbing it and replacing it whenever I'd receive a text message so I did away with that.  I saw a phone mount at the bestbuy the other day but I can't recommend it.  Have you considered turning on the handicapped assistance function where it will read to you what a text message says when it comes through or it will alert you of the caller when the phone rings?  It may compromise some privacy if you are in your vehicle with others or become annoying as you have to turn it off and on when you get in and out of your car but that way it'll allow you to keep your phone either in a pocket, purse, wallet, etc etc without having to look at it to see who's trying to reach you.

  • Date and Time coruption...

    I'm getting a lot of system hanging (beachball) when I access the date and time preference pane on my MacBook Pro. If I wait long enough I don't have to force quite the system preferences. It's hanging for about 30 seconds.
    I switched to another user account and everything works fine.
    I've tried trashing all the preferences. I think it might be affecting iPhoto as well. I used photo sharing to imported a bunch of photos from a trip to my G5 from the MacBook and all the time stamps were changed. I recently moved to the UK and I think it is no coinsidence. The photos were cahnged to a date/time stamped 5 hours too early. But the camera and the G5 and the MacBook Pro were all set to the correct UK time zone before I took or transfered any pictures.
    I'm looking for the correct file to trash to get my MacBook's date and time working. I know it's specifc to my user acount on the MacBook because, as I said, the other user accounts have responsive date and time panes.

    Try moving these two to the Desktop, restarting, and try the prefPane again:
    com.apple.recentitems.plist and com.apple.systempreferences.plist
    I do know that those settings (at least for time zone) are stored in
    /Library/Preferences/.GlobalPreferences which is an invisible file. See the discussion in the tread Global Date & Time Settings
    G4 450 MP Gigabit   Mac OS X (10.4.9)  

  • Where i will give the date and time of the session background process

    Hi.
    I created a program on XD01 by using Session Method.
    It is executed properly and process in forground also fine.
    What my problem is i want execute process of session in Back ground on that time i want give the Date and Time. I do not know where i will provide date and Time.
    I want Process the BDC Session after 2 days. How it is possbile. Where i will give the date and Time?
    With in these 2 days i want know the status of the Session Process. How i will check the status?
    Any body will explain these things with full flow of sequence.
    I do not want use the BDC Session by using RSBDCSUB. In that program there is no options for giving the Date and Time.
    Thank You.
    B. Krishna.

    Hi,
    While creating session through BDC_OPEN_GROUP function, populate HOLDDATE field to set lock on the created session till that date, say 31.12.2008 and you would like to execute your session on 1.1.2009 at 2:00 AM.
    Once session is created, create a batch job for program RSBDCSUB and schedule it on 1.1.2009 at 2:00 AM (server time).
    I am confident that it solves your problem.
    Regards,
    Prasanth

  • To eliminate date and extract only time component

    hi i am getting an input from a table which is of varchar2 type and the field has data like
    8:00 am-8:00 pm
    now i want to insert 8:00 am as start_time and 8:00 pm as end time in the columns start_time and end_time in another table.the 2 columns are of date type.
    HOW do i remove the date and just insert time in these columns
    because if i do
    insert into..
    to_date(substr(peak_time,1,7),'hh:mi am') ......
    then along with time current date gets appended.

    to be honest? If that was the requirement (eg. scheduling items to run between two times), I'd store it as numbers - probably as minutes. - eg. 8 hours = 8*60 minutes
    Then I'd do something like:
    select my_date + start_time_in_mins/1440 from my_table

  • How can I transfer dates and locations from excel file to iCal?

    I received an Excel file with dates and locations to visit for 45 days. Is there a way to transfer over to iCAL and then to iPhone?

    how to input all those addresses into my Garmin as well.
    I can't help you with that one.
    Could have I also input somehow from excel to entourage and then ical??
    I don't think Entourage has the data detectors feature.
    AK

  • Contacts saved from messages and calls do not appear in contacts?

    Hi, I've been having a problem with my contacts recently. Ever since I got my phone, I saved a few important contacts, however received messages and calls off people who were not in my contacts. I saved these from the messages, and calls but none of these saved contacts have appeared in the contacts app. It's really very frustrating. The contacts have been saved into my phone, as I can find them under spotlight search and in recent calls etc, they just do not appear in my contacts app. Can anyone help me sort this frustrating issue out? I'm on an iPhone 5c, under the updated software

    Hi, I've been having a problem with my contacts recently. Ever since I got my phone, I saved a few important contacts, however received messages and calls off people who were not in my contacts. I saved these from the messages, and calls but none of these saved contacts have appeared in the contacts app. It's really very frustrating. The contacts have been saved into my phone, as I can find them under spotlight search and in recent calls etc, they just do not appear in my contacts app. Can anyone help me sort this frustrating issue out? I'm on an iPhone 5c, under the updated software

  • Accessing protected and private data of a class

    Hi friends,
    I have writen a sample code in oops abap but iam facing some problem.
    CLASS MAIN DEFINITION.
        public SECTION.
          DATA : VAR1(10) TYPE C VALUE 'NEW VALUE'.
          METHODS : PUBLIC.
      ENDCLASS.
      CLASS MAIN IMPLEMENTATION.
         METHOD : PUBLIC.
           WRITE : /5 VAR1.
              VAR1 = 'CHANGED'.
           WRITE : /5 VAR1.
         ENDMETHOD.
      ENDCLASS.
    START-OF-SELECTION.
        DATA :
               O_MAIN TYPE REF TO MAIN.
               CREATE OBJECT O_MAIN.
               CALL METHOD O_MAIN->PUBLIC.
    now its working fine as public methods can be access by all the people where as protected methods can be access by class and subclass so i can inherit the properties of above class and access the protected data.
    where as to access private data , private data can be access by class itself...
    so now how do i access the private data within the class...ie : how do i get the above output when i use a private section instead of public..
                CLASS MAIN DEFINITION.
        private SECTION.
          DATA : VAR1(10) TYPE C VALUE 'NEW VALUE'.
          METHODS : Private.
      ENDCLASS.
      CLASS MAIN IMPLEMENTATION.
         METHOD : Private.
           WRITE : /5 VAR1.
              VAR1 = 'CHANGED'.
           WRITE : /5 VAR1.
         ENDMETHOD.
      ENDCLASS.
    START-OF-SELECTION.
        DATA :
               O_MAIN TYPE REF TO MAIN.
               CREATE OBJECT O_MAIN.
               CALL METHOD O_MAIN->Private.
    iam getting a error saying you cannot access the private section...
    now private section can be accessed within the class but nt by others...
    to access the private section within the class how should i correct it...
    Regards
    kumar

    HAI,
    Private attributes or methods can be accessed directly by the Object but within the Scope of the Class, but not outside.
    Look at this:
    CLASS MAIN DEFINITION.
    public  SECTION.
    METHODS : Public.
    private SECTION.
    DATA : VAR1(10) TYPE C VALUE 'NEW VALUE'.
    METHODS : Private.
    ENDCLASS. " END of CLASS DEFINITION
    CLASS MAIN IMPLEMENTATION.
    METHOD : Public.
    CALL METHOD Private.
    ENDMETHOD.
    METHOD : Private.
    WRITE : /5 VAR1.
    VAR1 = 'CHANGED'.
    WRITE : /5 VAR1.
    ENDMETHOD.
    ENDCLASS. " END of CLASS IMPLEMENTATION
    START-OF-SELECTION.
    DATA:  O_MAIN TYPE REF TO MAIN.
    CREATE OBJECT O_MAIN.
    CALL METHOD O_MAIN->Public.
    PS: If there is any better alternative solution please share it .
    Best Regards,
    rama

Maybe you are looking for