AnsweredAssumed Answered

vrf Using the "To/From Socket" - A vee echo server using Freeware ActiveX

Question asked by ptarso on Sep 26, 2002
Hi Georg Nied

Thanks a lot for the great ideas and hints.

Regarding the int32 array issue I nee to say that I had already tried to
convert the integer to chars but the first CR ( 10 ) on the string caused
the control to interpret the string scalar as a string array, and an error
was generated by the control. That is why in your VeeEchoServer you transmit
one line of text at a timed.

My goal is to transmit a Spectrum Analyzer trace data in only one packet an
use UDP to overcome a 250mS delay on a satellite circuit. The trace needs to
be updated about 10 times per second to emulate real time is more like
Processing time is precious.

By now I can only say that because I did not "digest" all information that
you transmitted to me via your great VeeEchoServer example.

In some days I will bother you again

Good Health.
Thanks al lot,

Paulo de Tarso Bastos
P.S.:
Shawn , thanks a lot as well.




Paulo

----- Original Message -----
From: "Georg Nied" <g.nied@gn-software.de>
To: "VEE vrf" <vrf@it.lists.it.agilent.com>
Sent: Thursday, September 26, 2002 7:25 AM
Subject: [vrf] Re: Using the "To/From Socket" - A vee echo server using
Freeware ActiveX


> Paulo,
>
>
> > Thanks for the hint on the Catalyst freeware
>
> > I was trying to use the control to send a Spectrum Analyzer trace
> > data( an integer16 array ) but
> > I could not find a way to it.
> > I am assuming that it is VEE limitation since it works ok on VB
> > (considering the examples that come with the control).
> > Any ideas?
>
> Yes
>
> As Shawn mentioned, you are having problems with sending integer data that
> may have zero values because the control needs text and VEE - in contrast
> to Visual Basic - cannot include a char(0) inside a string. My solution to
> this was to use the FileEncoder Control wich is also included in the
> catalyst package. I encode the data by the Base64 code (this is the same
> that is used by transmitting binary date through the internet).
> If the data size is an issue you can also compress your data (before
> encoding) by using this control.
>
> And here are some more tips:
>
> 1) Put your socket controls on the main panel. This way you do not need to
> have a global object var for each socket, cause they are already global.
>
> 2) Rename your socket vars as 'Client0' to 'Clientx' with no 0 being the
> listening socket and client1..clientx being the communication sockets.
> (That makes life easier when looping).
>
> 3) Build a record array for each client socket. This should at least hold
> the transmitted data and can store some status vars like connection time
> etc.
>
> 4) VERY IMPORTANT Dont try to process all your events (when a socket
> received data) in your event handler routines. You will surely come to the
> point when more than one event handler wants to use a vee function that is
> currently executing. This will stop your vee program because vee functions
> are not reentrant! The soulution is to serialize this: use the event
> handler for only appending the incoming data to a buffer for each socket.
> Then - in an infinite loop - take the data from your buffers and do what
> you like.
>
> I do some changings on your example and send it back
>
>
>         Georg Nied
>    Software-Development
> Hansestr.7 - 51149 Cologne
>         Germany
>  Mail: info@gn-software.de
>
> ---
> You are currently subscribed to vrf as: ptarso@wnetrj.com.br
> To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
> To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
> To send messages to this mailing list,  email
"vrf@it.lists.it.agilent.com".
> If you need help with the mailing list send a message to
"owner-vrf@it.lists.it.agilent.com".
>
>


---
You are currently subscribed to vrf as: rsb@soco.agilent.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list,  email "vrf@it.lists.it.agilent.com". 
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".

Outcomes