PUBLISH/SUBSCRIBE and CLIENT/SERVER

127 views
Skip to first unread message

Reza

unread,
Apr 9, 2013, 11:45:41 AM4/9/13
to fb...@googlegroups.com
Hello Everybody

I have two questions regarding the Communication:

1. I'm using two laptops for Publish and Subscribe Communication over wireless network by means of a router. When I try to send a BOOL variable it works fine without any problem. However when I try to send another type of variable such as INT or ANY, it fails. I receive "null" and the STATUS of SUBSCRIBE says "Object Error" or something. What could be the problem?

2. This time I used Client and Server for bi directional communication, however I have "SOCKET ERROR" for sending. What could be the problem for this?

Thank You in advance for your time and help.
Reza



James Christensen

unread,
Apr 9, 2013, 4:38:23 PM4/9/13
to fb...@googlegroups.com
It is not possible to do a diagnosis without knowing the system
configuration that was used to perform the test. Please attach copies
of the respective *.sys files.

Reza Abrishambaf

unread,
Apr 10, 2013, 5:26:57 AM4/10/13
to fb...@googlegroups.com
Dear Sir

Attached you may find the *.sys files along with a simple function called Basic.fbt used in PUB. Due to the Gmail restriction for the attachments, I changed the extension of the files to *.xml.
I appreciate your help. 

Regards




--
You received this message because you are subscribed to the Google Groups "FBDK" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fbdk+uns...@googlegroups.com.
To post to this group, send email to fb...@googlegroups.com.
Visit this group at http://groups.google.com/group/fbdk?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.



SUBS.xml
PUB.xml
Basic.fbt

James Christensen

unread,
Apr 10, 2013, 9:35:25 PM4/10/13
to fb...@googlegroups.com
Just from examining the contents of the files, it appears that you are
using an obsolete version of the FBDK. Try the current (20110212)
version. You will have to rebuild your examples "from scratch" because
the XML formats are slightly different due to changes in the standard.
A few other hints:
1. Don't save a FB type with the same name as one that is already in
the library, e.g., "Basic".
2. When writing an algorithm in Java, don't try to replace an output
variable with an input variable, e.g., QQ = X3. These variables are
declared as final by the Java code generator. Instead, use
QQ.copyFrom(X3). Better yet is to write the algorithm in ST:
QQ := X3; then the Java generator is responsible for producing the
correct replacement statement.
3. Update all the "Properties" as the very first thing you do when
building a new library element, as listed in
http://www.holobloc.com/doc/fbdk/propsfrm.htm
--
Best regards,
Jim Christensen

James Christensen

unread,
Apr 11, 2013, 11:03:18 AM4/11/13
to fb...@googlegroups.com
For starters, attached is the old "Basic" FB type, appropriately
renamed, coded and documented. This can be compiled and launched in
the 20110212 version of the FBDK.

By the way, I was wrong: this version of the FBDK does not correctly
generate Java from the ST statement AOUT := AIN, where AOUT and AIN
are of type ANY. I need to check that this is fixed in the upcoming
FBDK release!
--
Best regards,
Jim Christensen

On Wed, Apr 10, 2013 at 8:35 PM, James Christensen
TEST_COPY_ANY.fbt

Reza Abrishambaf

unread,
Apr 12, 2013, 11:36:11 AM4/12/13
to fb...@googlegroups.com
Dear Sir

Thank you for your time and help.

Regards
Reza



Reply all
Reply to author
Forward
0 new messages