Experimental Physics and Industrial Control System
|
It sounds to me like it might be better to write a driver based on asynPortDriver, rather than writing device support.
Device support is more difficult because you need to understand how each record works. If you write a driver based on asynPortDriver you can use the standard asyn device support.
https://epics.anl.gov/modules/soft/asyn/R4-34/asynPortDriver.html
This is a tutorial on writing an asynPortDriver, starting from a very simple version and working up to a more complex one. This is for a Measurement Computing device using the vendor library.
https://github.com/epics-modules/measComp/blob/master/documentation/measCompTutorial.pdf
Mark
Hi Andrew,
In my mind, the C code will be a file containing all the functions to connect, request data stream/polling, run equipment adjustment routines, change properties and close connection. All of this
is provided by the manufacturer .so library (which I'm adding to the LIBS target of the IOC's Makefile). So, the IOC will carry everything within itself needed to control the equipment.
What I have in mind is to add this .cpp file to the SRCS target of the IOC's Makefile, and to call all of these functions using subroutine records.
The equipment is an interferometer from SmarAct, called PicoScale.
Hi Allan,
On 11/7/18 10:47 AM, Allan Serra Braga Bugyi wrote:
> I have the need to access the record support structs inside my C code.
> What I want is to be able to access the records' fields to pass them as
> parameters to some functions. These functions are inside a dynamic
> library .so from the manufacturer. Any idea or workaround?
What is "your C code" — where is it running and what calls it? You need
to describe what you're doing it a bit more detail for us to be able to
help you as the answers will be different for different circumstances...
- Andrew
--
Arguing for surveillance because you have nothing to hide is no
different than making the claim, "I don't care about freedom of
speech because I have nothing to say." -- Edward Snowdon
|
- References:
- Record referencing inside device support Allan Serra Braga Bugyi
- Re: Record referencing inside device support Johnson, Andrew N. via Tech-talk
- FWD: Record referencing inside device support Allan Serra Braga Bugyi
- Navigate by Date:
- Prev:
Re: Current Source / Power supply suggestion David Vine
- Next:
devlib2 release 2.10 Michael Davidsaver
- 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:
FWD: Record referencing inside device support Allan Serra Braga Bugyi
- Next:
devlib2 release 2.10 Michael Davidsaver
- 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
|
ANJ, 07 Nov 2018 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
·
Search
·
EPICS V4
·
IRMIS
·
Talk
·
Bugs
·
Documents
·
Links
·
Licensing
·
|