I'm using QPCPP under linux with the posix port. Everything is working great but I'm having a hard time safely removing HSMs. I have a network AO that creates HSMs whenever a new TCP session is added. This HSM then goes into a local map in the network AO. This allows that HSM to handle only the things needed for that connected client. This works great. The issue is when the client disconnects and I have to remove the HSM. It's causing crashes sometimes probably because I'm dumb and have some sort...
Thank you, this is exactly the information I was looking for.
I'm using QPCPP on a largish yocto linux system (RAM not an issue) and wondering if it's "safe" to use classes as members of events. I'm guessing that it's probably ok as long as the classes don't contain any dynamically allocated memory (vectors, maps, etc). Basically, I just want to create a small wrapper around an enum or a struct that allows me to convert to string for easy debugging. Instead of having a typedef enum I want to make it a class with an enum inside with a to_string() method. Is...
You posted this as I was writing up my post above. I ended up making an almost identical solution to dpp_comp.
Alright, I tried to be lazy and ask here first but then my impatience beat out my laziness and I went ahead and tried it. Basically, what I described is possible. 1. I created a new event type that extend QP::TimeQEvt and add a parameter. The only trick here is that you have to manually create and $define() a new constructor that calls the base class constructor. hpp: class ExtQTimeEvt : public QP::QTimeEvt { public: //! ID of the HSM this is for uint16_t id; public: ExtQTimeEvt( QP::QActive * const...
Looking to extend the time event discussion some more. I have multiple HSMs in one AO and each HSM has its own timer. I would like to use the same signal for all HSM time events. Can I create a new event type that is based on QP::QTimeEvt that contains some params (id that identifies the the HSM the even belongs to for example) so that when the timer associated with that HSM goes off, it will automatically fill in the ID parameter so the AO knows which HSM to dispatch the event to? If this is possible,...
Looking to extend the time event discussion some more. I have multiple HSMs in one AO and each HSM has its own timer. I would like to use the same signal for all HSM time events. Can I create a new event type that is based on QP::QTimeEvt that contains some params (id that identifies the the HSM the even belongs to for example) so that when the timer associated with that HSM goes off, it will automatically fill in the ID parameter so the AO knows which HSM to dispatch the event to? If this is possible,...
Alright, I think that's probably what I have to do. Thanks for the quick response.