Experimental Physics and Industrial Control System
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
- Replies:
- RE: drvAsynIPServerPortConfigure Mark Rivers
- Navigate by Date:
- Prev:
Re: epics on launchpad! Benjamin Franksen
- Next:
RE: drvAsynIPServerPortConfigure Mark Rivers
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
<2010>
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: Auto Save/Restore issue... Tim Mooney
- Next:
RE: drvAsynIPServerPortConfigure Mark Rivers
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
<2010>
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024