Axelwlt Posted December 19, 2018 Report Share Posted December 19, 2018 Hi I would like to add some more information to the Actor Framework's Message Enqueuer class, so I thought about inheriting from it, with some additional members. However, the issue is that the only way to get the Message Enqueuer of an actor is with Read Self Enqueuer.vi, which returns a Message Enqueuer.lvclass. And I don't find any way to transform this value into my child enqueuer class. Message Enqueuer.lvclass does not have data accessors to let me copy its internal data, and I can't modify Message Enqueuer.lvclass. Is what I would like to achieve impossible? Quote Link to comment
Francois Normandin Posted December 21, 2018 Report Share Posted December 21, 2018 The Message Enqueuer instance is created within Actor.vi and encapsulates the receiving queue of the actor. The Actor launcher does not expose any way to specify a more specific type of message enqueuer, so I'm afraid that even though you wish to extend this class, it is impossible to instantiate it with your child type. The reason the Message Enqueuer does not let you access its private data is that it is specifically meant as a wrapper to prevent anyone from accessing the Priority Queue class. I assume the intent is to make sure you cannot mess with the message delivery principles such as rerouting messages before they arrive at the Actor Core. If it were allowed, it could cause thread safety problems, security issues (possible hacking target) or mess with the #1 feature of actors: trust that messages are processed by the core in the order the messages were enqueued. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.