Skip to main content



      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 10:07 Go to next message
Eclipse UserFriend
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 04:03 Go to previous messageGo to next message
Eclipse UserFriend
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 04:05] by Moderator

Re: SIFB with ANY type plug/socket [message #1834279 is a reply to message #1834265] Fri, 06 November 2020 06:39 Go to previous message
Eclipse UserFriend
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: Wed Jul 16 01:00:30 EDT 2025

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

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

Back to the top