Actor Framework Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Actor Framwork in CLA Exam

Solved!
Go to solution

Hi,

I am more used to QMH and a novice for LVOOP. However, "Tom's LabVIEW Adventure" youtube channel inspired me to start using Actor Framework and now I am loving it!

Thinking about 4 hour CLA exam (which I am preparing for), I am bit worried that I am not practised enough to cover the requirements on time. I having been trying this on ATM sample exam available in CLA Exam Kit. Please see attached ActorTree.JPG - my thought process in implemeting it.

I really appreciate if you can advise on following questions I am having:

1. ATM Controller at top level of the actor tree, it nests 4 APIs. Then I created 2 child classes for Simulated (SIM) and Physical (PHY). I created abstract message for every control (user event) from each API, so that their is no dependency from calling actor. Please see attached ATM.zip - the way I have done Sensor Interface module. Is there is a more efficient way of doing this in the exam?.

2. If an error occur in Sensor Interface SIM helper loop, how can I,

    a. Warn user with a popup allowing to clear the error and continue?

    b. Log the error? I guess I have to propergate it to ATM Controller in a masage and get the controller to log it?

 

Any further tips on Actor Framwork in CLA exam would be really appreciate

 

 

 

Download All
Message 1 of 4
(4,220 Views)

Hey London,

I'm glad you're enjoying using the Actor Framework.

 

I had a quick look at the attachment and my thoughts are:

  • The abstraction layers you show in the UML is a good approach. However, I noticed in your code the Sensor Interface SIM defined some of its own messages, this removed the advantage of the abstraction layer. Instead, you should make Dynamic dispatch methods in your abstraction layer and associated messages. Then just override the methods in the child classes (without re-scripting messages).
  • It looks like you have mostly implemented the user events to update the UI. In the exam, I don't think you'll have to do as much work. If you just put a 'Create user event' into pre-launch init, 'Generate User Event' into the methods and destroying them in stop core, would be enough with a label describing what you want a developer to do, should be enough.
  • Defining the abstract messages is part of the architecture the CLA exam is testing you on, so I think you'll have to create those. However, like before, I would create them and put the various components of the abstract messages on the appropriate block diagrams and leave a label of how to complete the functionality.

2. If an error occur in Sensor Interface SIM helper loop, how can I,

    a. Warn user with a popup allowing to clear the error and continue?

    b. Log the error? I guess I have to propergate it to ATM Controller in a masage and get the controller to log it?


a) Make an override of 'Handle Error.vi', then simply use a case-structure with a dialog box and clear the error.

b) Assuming you want this to happen for every actor/every sensor actor, make an override of 'Handle Error.vi' in the parent class and add the logging to file functionality (or send a message to an error handling actor). Because of the stacked nature of AF actors, all child actors will then inherit that functionality.

 

I hope that helps,

Let me know how you get on with the exam and practice.

 

Best regards,

Tom

 

nb: 'Main Launcher.vi' is missing from the project you attached.

Message 2 of 4
(4,163 Views)

Tom, Many thanks for your reply.

  • Now I understood about abstraction layer better
  • Regarding error handling...
    • my strategy was, passing any error occur in any actor up to the ATM Controller, then it handles them as well as logging them. (rather than having a dedicated actor for error handling.)
    • but the problems are..... I found overriding the Handle Error.vi, only trigger when an error occur in Actor Core branch - but not in side the helper loop (obviously because it is executing independently). I can insert "Simple Error Handler" on to the error wire just after the event structure and handle that error. but then, I am not passing it up to the ATM Controller for logging.
    • secondly, in order to detect the errors by overriding the "Handle Error.vi" works only if the helper loop stop; thus the actor stops and propagate the error up to the caller.

So I don't quite see how handle error would solve that. That's why I am sending an abstract message to the caller with the error message (occurd in the helper loop) and let it decide whether to kill the actor or clear the error.

Where am I wrong in my understanding?   

 

0 Kudos
Message 3 of 4
(4,146 Views)
Solution
Accepted by London

I think all you're missing is the 'Send Error Report.vi'. You can use this VI to send errors from your helper loops into the actor core. That way, the 'Handle Errors.vi' will receive them.

Message 4 of 4
(4,143 Views)