Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » 4DIAC - Framework for Distributed Industrial Automation and Control » SIFB with ANY type plug/socket(How to use AnyAdapter?)
SIFB with ANY type plug/socket [message #1833904] Tue, 27 October 2020 14:07 Go to next message
Noname Noname is currently offline Noname NonameFriend
Messages: 6
Registered: October 2020
Junior Member
I would like to create a SIFB with a plug or socket any type of adapter.
I found an implementation of the concept in the source files (anyadapter.h), but could not find documentation that explains how to use it.
Unlike the ANY data type, 4DIAC does not seem to allow me to create an ANY type plug or socket in the SIFB.
Are there any examples of this available that I could study?
Thanks in advance for your time.
Re: SIFB with ANY type plug/socket [message #1834265 is a reply to message #1833904] Fri, 06 November 2020 09:03 Go to previous messageGo to next message
Noname Noname is currently offline Noname NonameFriend
Messages: 6
Registered: October 2020
Junior Member
I'll answer my own question. Not sure if this is the intended way, but here's how I got it to work.

-Create an empty adapter (i.e. delete all event and data connections) called "ANY_ADAPTER" into you project. 4DIAC lets you connect this to any other adapter type.

-Export your FB with the ANY_ADAPTER plug/socket.

-In the FB source files, change all instances of FORTE_ANY_ADAPTER to CAnyAdapter.

-Don't forget to include anyadapter.h!

-Now you can use the methods in CAnyAdapter to access the adapter interface.

[Updated on: Fri, 06 November 2020 09:05]

Report message to a moderator

Re: SIFB with ANY type plug/socket [message #1834279 is a reply to message #1834265] Fri, 06 November 2020 11:39 Go to previous message
Martin Melik-Merkumians is currently offline Martin Melik-MerkumiansFriend
Messages: 99
Registered: March 2016
Member
Hi,

sorry for the late reply. COVID is taking a lot of my time right now.
Your approach is correct, although the step for change all instances to CAnyAdapter seems to be a bug. When I implemented/fixed the AnyAdapter this was not necessary as far as I remember.

The ANY_ADAPTER is the adapter equivalent of the ANY type, which is why the IDE let you connect any other adapter to it.

Best regards,
Martin
Previous Topic:Compilation error: MQTT for raspberry PI
Next Topic:Sting to BOOL and vice versa not working on raspberry PI
Goto Forum:
  


Current Time: Tue May 18 01:33:37 GMT 2021

Powered by FUDForum. Page generated in 0.01592 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top