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 2025 | 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 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | UDP server in model 3 motor driver |
From: | Lee Hudson via Tech-talk <[email protected]> |
To: | <[email protected]> |
Date: | Thu, 24 Oct 2019 11:19:05 +0100 |
Hi, I'm currently writing a motor driver and I'm not sure on the best way to implement a particular aspect of it. The main control link to the hardware is via TCP/IP, on startup the driver registers parameters of interest on the controller and the controller then sends all subscribed information out via UDP broadcasts. I think I need to create a udp server on the IOC, so far I am doing the following: IOC boot script: #TCP port for control, this works drvAsynIPPortConfigure("PCS1_CTRL", "192.168.113.10:51512", 100,
0, 0) # Configure UDP port for Walter and Bai streams
Driver constructor(class pcsController: public asynMotorController ): /* Connect to pcsController controller TCP for control */
pasynUserUDPStream = pasynManager->createAsynUser(0,0); pasynOctet = (asynOctet *) pasynInterface->pinterface;
Driver poll(): status = pasynOctet->read(octetPvt, pasynUserUDPStream,
rxBuffer, 65535 - 1,
In the poll() method or perhaps a separate thread elsewhere I know I will have to update the asyn parameters manually and call callParamCallbacks() to get the record to update. Am I going about this the right way? Thanks in advance Lee
-- 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. |