> An aSub record would just work.
> In the subroutine you can launch the script and parse its output.
Note that the subroutine should be quick.
If the subroutine calls system() or popen() to start the external process, then parses the result, this will delay the IOC record processing.
What would be better:
You start a separate thread which periodically calls system() or popen() to start the external process, parses the result, places the result somewhere, and the code invoked from the subroutine record then simply picks the latest result.
If you're familiar with starting threads and getting the synchronization right, that should be easy.
Otherwise look at the asyn framework as a starting point.
-Kay
- References:
- Getting data from a shell script into an ioc Bo Jakobsen via Tech-talk
- Re: Getting data from a shell script into an ioc Wang Xiaoqiang via Tech-talk
- Navigate by Date:
- Prev:
Re: Getting data from a shell script into an ioc Wang Xiaoqiang via Tech-talk
- Next:
Re: Getting data from a shell script into an ioc Konrad, Martin via Tech-talk
- 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: Getting data from a shell script into an ioc Wang Xiaoqiang via Tech-talk
- Next:
Re: Getting data from a shell script into an ioc Pearson, Matthew R. via Tech-talk
- 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
|