|
|
|
|
|
|
|
|
Re: Problem with assigning values to large byte arrays [message #1780400 is a reply to message #1780378] |
Mon, 22 January 2018 08:22 |
|
I'm sorry but printf is no gdb. The reason I aksed for gdb is that I strongly expect an exception in the thread where your fb is executed. As forte is running in your setup at least 4 to 5 threads even if one thread is throwing an exception the others will continue. Even things like monitoring or deploying new resources will work. I've seen that. So please just run forte with gdb so that we get maybe a stacktrace or more information what is wrong here. You don't need to debug with gdb just running:
|
|
|
|
|
|
Re: Problem with assigning values to large byte arrays [message #1780916 is a reply to message #1780914] |
Mon, 29 January 2018 22:54 |
|
I'm currently traveling a lot and its hard form me to get access to a raspi. Maybe someone else can also perform some tests.
Regarding your event sending question. This strongly depends what kind of event you would like to send. If the event to sound is a result of an input event (e.g., INIT, REQ) then sendOutputEvent is the correct method. However if you write a resource initiated FB (aka Responder, e.g., simialr to a subscribe) and you would like to send an output event because of some non application event then a little bit more complicated process is needed.
The latter situation we call in 4diac external event (e.g., a message on the network arrived, an interrupt occurred). As these are somehow disturbances to the execution in 4diac they need to be treated with an external event handler (ie.., a class deriving from CExternalEventHandler). Typically you have one instance of such a class per external event source. From forte 1.9.0.M2 on you need to specially register such handlers in your CMakeList.txt. There are several examples for that.
In the interupthandling function of your external event handler you can determine which FB needs to be activated and hand over any data to the FB. However you must not call sendOutputEvent in this exeuction context. What you need to do is to invoke the method startNewEventChain provided by CExternalEventHandler and hand over a reference to your FB, which by the way needs to derive from CEventSourceFB. this will result that the special event "cg_nExternalEventID" will be sent to your FB in a thread capable of handling IEC 61499. in your FB's executeEvent you can check for this event perform any data post processing steps, apply the data to the FB's outputs and then invoke sendOutputEvent with the event to trigger.
I hope this helps.
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.29913 seconds