RTT::Events
| Submitted by Vandenbroucke Sander on Mon, 2007-05-14 09:50. |
Hi,
I'm having problems with making the RTT::Event class send/receive
commands over CAN.
I have a EventProxy derived from the signal<Signature> template
implementing a RTT::LocalCommand with a overridden operator()(). In this
operator I do:
void CLocalEventProxy<void(void)>::operator()()
{
if(m_El) m_El->sendEvent(m_Id); //--> send a CAN message. this->emit();
}
Where I receive the CAN message I just call emit() thus preventing an
other CAN message being sent.
Using this construction I can fire an event over the CAN network from a
proxy to a server. It is the other way around I can't get away with.
For Commands and DataPorts I change the implementation to a
server-implementation if they are in the interface of the TaskContex's I
want to export over CAN (using commands() and ports()). I was hoping I
could do the same thing with Events. The problem is that the objects
stored in the EventService, returned by events(), are already
implementations. So I can't just change them can I? Or are the shared
pointers smart enough to handle this?
Kind regards,
Sander Vandenbroucke
