EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: drvAsynIPServerPortConfigure
From: "Mark Rivers" <[email protected]>
To: "Paul Hamadyk" <[email protected]>, "EPICS tech-talk" <[email protected]>
Date: Wed, 20 Jan 2010 07:57:20 -0600
Hi Paul,
 
You are correct, drvAsynIPServerPortConfigure can only handle TCP, and the documentation is wrong.
 
Eric Norum looked at adding UDP support to this code back in December.  He concluded it was a fairly big job, but he did fix the sscanf problem for the next release.  If you or someone else wants to add UDP support that would be great!
 
Mark
 

________________________________

From: [email protected] on behalf of Paul Hamadyk
Sent: Wed 1/20/2010 2:59 AM
To: EPICS tech-talk
Subject: drvAsynIPServerPortConfigure



Hello,

The asyn documentation says that drvAsynIPServerPortConfigure can be a
TCP or UDP server but the source code in
asyn/drvAsynSerial/drvAsynIPServerPort.c does a

listen(tty->fd, tty->maxClients);

There is no recvfrom call so surely this is TCP only?

Also this code below fails to convert the protocol string in the string
"localhost:9600 udp" because the format string uses %ud which looks for
an unsigned integer followed by a 'd'. It should be just "%u". This
stops it from ever seeing the "udp" protocol specifier. This exists in
all of the version of asyn I have looked at (4-9 to 4-12).

/*
 * Parse configuration parameters
 */

  protocol[0] = '\0';
  if (((cp = strchr(serverInfo, ':')) == NULL)
     || (sscanf(cp, ":%ud %5s", &tty->portNumber, protocol) < 1))
  {
    printf("drvAsynIPPortConfigure: \"%s\" is not of the form
\"<host>:<port>[protocol]\"\n",tty->serverInfo);
    ttyCleanup(tty);
    return -1;
  }

Would it be possible to use stream device to handle incoming UDP data?

Paul.


--
This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom








References:
drvAsynIPServerPortConfigure Paul Hamadyk

Navigate by Date:
Prev: drvAsynIPServerPortConfigure Paul Hamadyk
Next: Ipac with VIPC616 wmoore
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: drvAsynIPServerPortConfigure Paul Hamadyk
Next: Ipac with VIPC616 wmoore
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·