|
|
|
|
|
Re: Does 4DIAC support Bluetooth Low Energy connection? [message #1859790 is a reply to message #1859789] |
Tue, 27 June 2023 11:45 |
|
Did you have a look on our communication architecture document I posted above? We are currently doing all of our communication via either PUBLISH/SUBSCRIBE or CLIENT/SERVER.
But if you develop your own communication FBs you don't need PUBLISH SUBSCRIBE. However I don't understand what you meen with -> Ethernet or Application ->
|
|
|
|
|
|
|
Re: Does 4DIAC support Bluetooth Low Energy connection? [message #1860515 is a reply to message #1859950] |
Fri, 11 August 2023 08:15 |
Han Nguyen Thanh Tuyet Messages: 24 Registered: June 2023 |
Junior Member |
|
|
Hi, thanks for your reply. I have another problem. Currently, I want to start a kind of round running independently and within each round I need to perform a chain of actions at a fixed time.
Let's say: Round 1 starts at time 10ms, then action A should be called at 30ms, then action B is called at 40ms, and action C is called at 60ms.
Then Round 2 starts at time 110ms..... will perform those chains of actions again.
Which class should I inherit from to perform those task? I reviewed CEventSourceFB, CExternalEventHandler, CThread, CEventChainExecutionThread, and CThreadBase but not quite clear what's the difference between those and how it works. Can you provide a short description of those and if possible suggest which one I should use?
Again, many thanks for your support.
[Updated on: Fri, 11 August 2023 08:16] Report message to a moderator
|
|
|
|
|
|
|
Re: Does 4DIAC support Bluetooth Low Energy connection? [message #1860551 is a reply to message #1860549] |
Tue, 15 August 2023 19:11 |
|
In general yes it is possible. But not sure if you should do this with standard communication FBs. What you could do is to write your one communication layer that is doing something what you need. But as said in my comments above I think separating the fb and the timing behavior may be the better option.
|
|
|
|
|
Re: Does 4DIAC support Bluetooth Low Energy connection? [message #1860633 is a reply to message #1860627] |
Tue, 22 August 2023 13:44 |
|
Sorry I was rather busy.
Before coming to your question a few points for clarification: An ExternalEventHandler is a class that represents one single source of external events (e.g., a network interface, a timer interrupt). As External Events are something critical you should use them sparsely and well considered.
With the information that you provide I'm still not sure what you would like to achieve and why this has to be in a communication layer. We have blocks that can generate timed events which you can then use to trigger the sending of data. Reception of data is currently linked to the arriving of the data.
If we could have a bit more background we can also give better guidance on how to best implement certain features in Eclipse 4diac.
|
|
|
|
Re: Does 4DIAC support Bluetooth Low Energy connection? [message #1860672 is a reply to message #1860655] |
Thu, 24 August 2023 19:04 |
|
Is it necessary that you do that in a communication layer. I'm not perfectly sure if publish, subscribe, client or server are fitting. Would it make more sense to develop your one communication FB?
Does all this code has to be in C++. What speaks against using FBs for the timing and data processing decisions? And use a Subscribe for the data reception and a Publish for the data sending. You could wrap everything into a CFB or Subapp if that makes it better to use.
Do you need timed activities for sending?
|
|
|
|
Re: Does 4DIAC support Bluetooth Low Energy connection? [message #1860687 is a reply to message #1860684] |
Fri, 25 August 2023 07:09 |
|
Quote:Is it possible to develop my own communication FB using a standard CComLayer class? If possible, yes, I think it will be easier for the users.
I think this is a lot of effort. Would not be my first step if I where you.
Quote:Got, your point. So, within the sub-app, there will be 1 FB for timing, 1 FB for data processing decisions, and then a Subscriber and a Publisher? Is it possible to send structure data with adjustable size to subscribers? Or it should be a fix data type?
If you set it up with ANY and use Communication layers that will handle the any's correctly it should work. I guess using PUBLISH_ / SUBSCRIBE_1 and STRUCT data should work best in your case.
The reason I suggested the discrete approach with FBs is that you can get quicker to first results and see how it is working and do first measurements. If 4diac FORTE has then to much overhead you can always improve later.
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.13835 seconds