diff --git a/conanfile.py b/conanfile.py index 479a146f5e29c6e0fdd8cbaf7cf7ba0c6e747bab..24ed6063f55fb5d67730e12e73c6a39ca033e49d 100644 --- a/conanfile.py +++ b/conanfile.py @@ -3,7 +3,7 @@ from conan import ConanFile class SingleShotAORecipe(ConanFile): name = "singleshotao" executable = "ds_SingleShotAO" - version = "2.0.4" + version = "2.1.0" package_type = "application" user = "soleil" python_requires = "base/[>=1.0]@soleil/stable" diff --git a/doc/doc_html/Attributes.html b/doc/doc_html/Attributes.html index 1c88911dea6cfe7a4fd6670e46cb64406b4f0b6b..63ac70c48a174d642bc4782912a22570f530dfef 100755 --- a/doc/doc_html/Attributes.html +++ b/doc/doc_html/Attributes.html @@ -1,114 +1,140 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> -<HTML> -<HEAD> -<Title> Tango Device Server User's Guide </Title> -</HEAD> -<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#7F00FF" ALINK="#FF0000"> +<html> +<head> -<P><!-------TITLE------></P> + <title> Tango Device Server User's Guide </title> +</head> -<TABLE BORDER="0" WIDTH="100%"> - <TR> - <TD ALIGN="left"> - <A HREF="http://www.esrf.fr/" TARGET=new> - <IMG SRC="http://www.esrf.fr/gifs/logo/80.gif" BORDER=0 Height="60"></A> - </Td> - <TD ALIGN="center"> - <A HREF="http://www.elettra.trieste.it/" TARGET=new> - <IMG SRC="http://www.esrf.fr/computing/cs/tango/elettra_logo.gif" BORDER=0 Height="60"></A> +<body> + <center> + <h1> + SingleShotAO Generic Device <br> + Device Attributes Description <br><Br> + SingleShotAO Class <br> + </h1> + <b> + Revision: - Author: buteau + </b> + </center> - </Td> - <TD ALIGN="center"> - <A HREF="http://www.synchrotron-soleil.fr/" TARGET=new> - <IMG SRC="http://www.esrf.fr/computing/cs/tango/soleil_logo.gif" BORDER=0 Height="60"></A> - </Td> - <TD ALIGN="right"> - <A HREF="http://www.cells.es/" TARGET=new> - <IMG SRC="http://www.esrf.fr/computing/cs/tango/alba.jpg" BORDER=0 Height="54"></A> - </Td> - <TD ALIGN="right"> - <A HREF="http://www.desy.de/html/home/index_eng.html" TARGET=new> - <IMG SRC="http://www.esrf.fr/computing/cs/tango/desy.gif" BORDER=0 Height="60"></A> - </Td> - <Td> - <H2><FONT COLOR="#7F00FF"> - <Center><A HREF="http://www.tango-controls.org/" TARGET="_top"> - TANGO </a> <Br> Device Server - </Center></FONT> - </Td> - </TR> -</TABLE> + <table Border=2 Cellpadding=3 CELLSPACING=0 WIDTH="100%"> + <tr BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> + <td COLSPAN=4> + <font Size=+2><center><b>Scalar Attributes</b></center></font> + </td> + </tr> + <tr BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> + <td> + <center><b>Attribute name</b></center> + </td> + <td> + <center><b>Data Type</b></center> + </td> + <td> + <center><b>R/W Type</b></center> + </td> + <td> + <center><b>Expert</b></center> + </td> + </tr> + <tr> + <td><b>frequency</b>: <font Size=-1>Sampling frequency for + ramp generation on the board output channels, in + Hz.</font> + </td> + <td> + <center> + <font Size=-1>DEV_DOUBLE</font> + </center> + </td> + <td> + <center> + <font Size=-1>READ_WRITE</font> + </center> + </td> + <td> + <center> + <font Size=-1>Yes</font> + </center> + </td> + </tr> + </table> -<HR WIDTH="100%"></H5> -<Br> -<center> -<h1> -SingleShotAO Generic Device <Br> -Device Attributes Description <Br> <Br> -SingleShotAO Class <Br> -</h1> -<b> -Revision: - Author: buteau -</b> -</center> - - -<Br> -<Table Border=2 Cellpadding=3 CELLSPACING=0 WIDTH="100%"> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<Td COLSPAN=4> <Font Size=+2><Center><b>Scalar Attributes</b></td></Font></Center> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<Td><Center><b>Attribute name</b></td></Center> -<Td><Center><b>Data Type</b></td></Center> -<Td><Center><b>R/W Type</b></td></Center> -<Td><Center><b>Expert</b></td></Center> -<Tr><Td><b>frequency</b>: <Font Size=-1>Sampling frequency for ramp generation on the board output channels, in Hz.</Font></Td> -<Td><Center><Font Size=-1>DEV_DOUBLE</Font></Center></Td><Td><Center><Font Size=-1>READ_WRITE</Font></Center></Td><Td><Center><Font Size=-1>Yes</Font></Center></Td></Tr> - -</Table> -</Center> -<Br><Br><Br><Br><Br> + <br> -<!--- html Footer ---> - -<Center> -<Font size=-1> -<br> -<br> -<TABLE BORDER="1" WIDTH="100%"> - <Tr> - <!--- Hosted by Sourceforge ---> - <Td Align="Center"> - <Font size=-1> - <b>TANGO</b> is an open source project hosted by :<br> - <A href="http://sourceforge.net" Target="new"> - <IMG title="Sourceforge logo" - alt="Sourceforge logo small" - src="http://www.esrf.fr/computing/cs/tango/sourceforge.gif" - border=0> </a> - </Font> - </Td> - <!--- 2 Sourceforge Repositories ---> - <Td Align="Center"> - <Font size=-1> - Core and Tools : - <a href="http://tango-cs.cvs.sourceforge.net/tango-cs/" Target="new"> - CVS repository</a> on - <a href="https://sourceforge.net/projects/tango-cs" Target=new> - tango-cs project</a> - - <br> + <table Border=2 Cellpadding=3 CELLSPACING=0 WIDTH="100%"> + <tr BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> + <td COLSPAN=4> + <center> + <font Size=+2><b>Dynamic Scalar Attributes</b></font><br> + X is the channel number ranging from 0 to N-1 (<b>MAO_6208</b>: 8 channels, <b>MAO_6216</b>: 10 channels) + </center> + </td> + </tr> + <tr BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> + <td> + <center><b>Attribute name</b></center> + </td> + <td> + <center><b>Data Type</b></center> + </td> + <td> + <center><b>R/W Type</b></center> + </td> + <td> + <center><b>Description</b></center> + </td> + </tr> + <tr> + <td><b>channelX</b></td> + <td> + <center> + <font Size=-1>DEV_DOUBLE</font> + </center> + </td> + <td> + <center> + <font Size=-1>READ_WRITE</font> + </center> + </td> + <td> + <font Size=-1>Output value for channel X (in V). Valid range: [-10V, +10V]</font> + </td> + </tr> + <tr> + <td><b>speedX</b></td> + <td> + <center> + <font Size=-1>DEV_DOUBLE</font> + </center> + </td> + <td> + <center> + <font Size=-1>READ_WRITE</font> + </center> + </td> + <td> + <font Size=-1>Speed for ramp generation on channel X (in V/s). If speed is 0, no ramp is generated but direct write on channel output.</font> + </td> + </tr> + <tr> + <td><b>initialX</b></td> + <td> + <center> + <font Size=-1>DEV_DOUBLE</font> + </center> + </td> + <td> + <center> + <font Size=-1>READ_WRITE</font> + </center> + </td> + <td> + <font Size=-1>Initial value for ramp function on channel X (in V). Defaults to last written value in channel attribute.</font> + </td> + </tr> + </table> +</center> - Device Servers : - <a href="http://tango-ds.cvs.sourceforge.net/tango-ds/" Target="new"> - CVS repository</a> on - <a href="https://sourceforge.net/projects/tango-ds" Target=new> - tango-ds project</a> - </Font> - </Td> - </Tr> -</Table> -</Font> -</Center> </body> </html> diff --git a/doc/doc_html/Description.html b/doc/doc_html/Description.html index e9447e29e1f6da05c24204d7955166a081adb023..b63c5d390637ad8747f810e641afeba21e3c664b 100755 --- a/doc/doc_html/Description.html +++ b/doc/doc_html/Description.html @@ -1,129 +1,26 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> -<HTML> -<HEAD> -<Title> Tango Device Server User s Guide </Title> -</HEAD> -<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#7F00FF" ALINK="#FF0000"> +<html> + +<head> + <title> Tango Device Server User s Guide </title> +</head> + +<body> + <center> + <h1> + SingleShotAO Generic Device <br> + Device Description <br> <br> + SingleShotAO Class <br> + </h1> + <b> + Revision: - Author: buteau + </b> + </center> + + <center> + ADLink boards support for single shot AO operations [PCI-6208 and + compatible boards] + </center> -<P><!-------TITLE------></P> -<TABLE BORDER="0" WIDTH="100%"> - <TR> - <TD ALIGN="left"> - <A HREF="http://www.esrf.fr/" TARGET=new> - <IMG SRC="http://www.esrf.fr/gifs/logo/80.gif" BORDER=0 Height="60"></A> - - </TD> - <TD ALIGN="center"> - <A HREF="http://www.elettra.trieste.it/" TARGET=new> - <IMG SRC="http://www.esrf.fr/computing/cs/tango/elettra_logo.gif" BORDER=0 Height="60"></A> - </TD> - <TD ALIGN="center"> - <A HREF="http://www.synchrotron-soleil.fr/" TARGET=new> - <IMG SRC="http://www.esrf.fr/computing/cs/tango/soleil_logo.gif" BORDER=0 Height="60"></A> - </TD> - - <TD ALIGN="center"> - <A HREF="http://www.cells.es/" TARGET=new> - <IMG SRC="http://www.esrf.fr/computing/cs/tango/alba.jpg" BORDER=0 Height="45"></A> - </TD> - <TD ALIGN="Right"> - <H2><FONT COLOR="#7F00FF"> - <Br><Center><A HREF="http://www.tango-controls.org/" TARGET="_top"> TANGO </a> - </Center></FONT> - - </TD> - </TR> - <TR> - <TD ALIGN="left"> - <A HREF="http://www.desy.de/html/home/index_eng.html" TARGET=new> - <IMG SRC="http://www.esrf.fr/computing/cs/tango/desy.gif" BORDER=0 Height="44"></A> - </TD> - <TD ALIGN="center"> - <A HREF="http://www.maxlab.lu.se/maxlab/max4/index.html" TARGET=new> - - <IMG SRC="http://www.esrf.fr/computing/cs/tango/maxlab.gif" BORDER=0 Height="40"></A> - </TD> - <TD ALIGN="center"> - <A HREF="http://www.frm2.tum.de/en/index.html" TARGET=new> - <IMG SRC="http://www.esrf.fr/computing/cs/tango/frm-2.jpg" BORDER=0 Height="45"></A> - </TD> - <TD> - <!-- Empty --> - </TD> - - <TD ALIGN="Right"> - <H2><FONT COLOR="#7F00FF"> - <Center> Device Servers - </Center></FONT> - </TD> - </TR> -</TABLE> - -<HR WIDTH="100%"></H5> - - - - -<HR WIDTH="100%"></H5> -<Br> -<center> -<h1> -SingleShotAO Generic Device <Br> -Device Description <Br> <Br> -SingleShotAO Class <Br> -</h1> -<b> -Revision: - Author: buteau -</b> -</center> - - -<Center> -ADLink boards support for single shot AO operations [PCI-6208 and compatible boards] -<Br> -<Br> -</Center> - -<!--- html Footer ---> - -<Center> -<Font size=-1> -<br> -<br> -<TABLE BORDER="1" WIDTH="100%"> - <Tr> - <!--- Hosted by Sourceforge ---> - <Td Align="Center"> - <Font size=-1> - <b>TANGO</b> is an open source project hosted by :<br> - <A href="http://sourceforge.net" Target="new"> - <IMG title="Sourceforge logo" - alt="Sourceforge logo small" - src="http://www.esrf.fr/computing/cs/tango/sourceforge.gif" - border=0> </a> - </Font> - </Td> - <!--- 2 Sourceforge Repositories ---> - <Td Align="Center"> - <Font size=-1> - Core and Tools : - <a href="http://tango-cs.cvs.sourceforge.net/tango-cs/" Target="new"> - CVS repository</a> on - <a href="https://sourceforge.net/projects/tango-cs" Target=new> - tango-cs project</a> - - <br> - - Device Servers : - <a href="http://tango-ds.cvs.sourceforge.net/tango-ds/" Target="new"> - CVS repository</a> on - <a href="https://sourceforge.net/projects/tango-ds" Target=new> - tango-ds project</a> - </Font> - </Td> - </Tr> -</Table> -</Font> -</Center> </body> </html> diff --git a/doc/doc_html/DevCommands.html b/doc/doc_html/DevCommands.html index 306b6711a5719a5f1086d005d1948c8f376e49be..9dbd3bf4fcf051bb8f11809d8007a41e97340800 100755 --- a/doc/doc_html/DevCommands.html +++ b/doc/doc_html/DevCommands.html @@ -1,162 +1,90 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> + <HEAD> -<Title> Tango Device Server User's Guide </Title> + <Title> Tango Device Server User's Guide </Title> </HEAD> -<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#7F00FF" ALINK="#FF0000"> - -<P><!-------TITLE------></P> - -<TABLE BORDER="0" WIDTH="100%"> - <TR> - <TD ALIGN="left"> - <A HREF="http://www.esrf.fr/" TARGET=new> - <IMG SRC="http://www.esrf.fr/gifs/logo/80.gif" BORDER=0 Height="60"></A> - </Td> - <TD ALIGN="center"> - <A HREF="http://www.elettra.trieste.it/" TARGET=new> - <IMG SRC="http://www.esrf.fr/computing/cs/tango/elettra_logo.gif" BORDER=0 Height="60"></A> - - </Td> - <TD ALIGN="center"> - <A HREF="http://www.synchrotron-soleil.fr/" TARGET=new> - <IMG SRC="http://www.esrf.fr/computing/cs/tango/soleil_logo.gif" BORDER=0 Height="60"></A> - </Td> - <TD ALIGN="right"> - <A HREF="http://www.cells.es/" TARGET=new> - <IMG SRC="http://www.esrf.fr/computing/cs/tango/alba.jpg" BORDER=0 Height="54"></A> - </Td> - <TD ALIGN="right"> - <A HREF="http://www.desy.de/html/home/index_eng.html" TARGET=new> - <IMG SRC="http://www.esrf.fr/computing/cs/tango/desy.gif" BORDER=0 Height="60"></A> - </Td> - <Td> - <H2><FONT COLOR="#7F00FF"> - <Center><A HREF="http://www.tango-controls.org/" TARGET="_top"> - TANGO </a> <Br> Device Server - </Center></FONT> - </Td> - </TR> -</TABLE> -<HR WIDTH="100%"></H5> -<Br> -<center> -<h1> -SingleShotAO Generic Device <Br> -Device Commands Description <Br> <Br> -SingleShotAO Class <Br> -</h1> -<b> -Revision: - Author: buteau -</b> -</center> +<BODY> + <center> + <h1> + SingleShotAO Generic Device <br> + Device Commands Description <br> <br> + SingleShotAO Class <br> + </h1> + <b> + Revision: - Author: buteau + </b> + </center> + <h2>1 - Init</h2> + <ul> + <Li><Strong>Description: </Strong><br> + This command re-initialises a device keeping the same network connection. <br> + After an Init command executed on a device, it is not necessary for the client to re-connect to the device. <br> + This command first calls the device <i>delete_device()</i> method and then executes its <i>init_device()</i> method. <br> + For C++ device server, all the memory allocated in the <i>init_device()</i> method must be freed in the <i>delete_device()</i> method.<br> + The language device destructor automatically calls the <i>delete_device()</i> method.<br> + </Li> + <Li><Strong>Argin: DEV_VOID</Strong></Li> + <Li><Strong>Argout: DEV_VOID</Strong></Li> + <Li><Strong>Command allowed for: </Strong> + <Ul> + <Li>Tango::FAULT</Li> + <Li>Tango::ON</Li> + <Li>Tango::INIT</Li> + <Li>Tango::MOVING</Li> + </Ul> + </Li> + </ul> + -<Br> -<Br> -<Br> -<A NAME="Init"><!-- --></A> -<A NAME="Init"><!-- --></A> -<h2>1 - Init</h2> -<ul> -<Li><Strong>Description: </Strong> This commands re-initialise a device keeping the same network connection.<Br> -After an Init command executed on a device, it is not necessary for client to re-connect to the device.<Br> -This command first calls the device <i> delete_device() </i>method and then execute its <i> init_device()</i> method.<Br> -For C++ device server, all the memory allocated in the <i> nit_device() </i> method must be freed in the <i> delete_device() </i> method.<Br> -The language device desctructor automatically calls the <i> delete_device() </i> method.<Br>  -<Li><Strong>Argin:<Br>DEV_VOID</Strong> - : none.<Br>  -<Li><Strong>Argout:<Br>DEV_VOID</Strong> - : none.<Br>  -<Li><Strong>Command allowed for: </Strong><Ul> -<Li>Tango::FAULT<Li>Tango::ON<Li>Tango::INIT<Li>Tango::MOVING</Ul> -<Br>  -</ul><Br> -<Br> -<A NAME="State"><!-- --></A> -<A NAME="State"><!-- --></A> -<h2>2 - State</h2> -<ul> -<Li><Strong>Description: </Strong> This command gets the device state (stored in its <i>device_state</i> data member) and returns it to the caller.<Br>  -<Li><Strong>Argin:<Br>DEV_VOID</Strong> - : none.<Br>  -<Li><Strong>Argout:<Br>DEV_STATE</Strong> - : State Code<Br>  -<Li><Strong>Command allowed for: </Strong><Ul> -<Li>Tango::FAULT<Li>Tango::ON<Li>Tango::INIT<Li>Tango::MOVING</Ul> -<Br>  -</ul><Br> -<Br> -<A NAME="Status"><!-- --></A> -<A NAME="Status"><!-- --></A> -<h2>3 - Status</h2> -<ul> -<Li><Strong>Description: </Strong> This command gets the device status (stored in its <i>device_status</i> data member) and returns it to the caller.<Br>  -<Li><Strong>Argin:<Br>DEV_VOID</Strong> - : none.<Br>  -<Li><Strong>Argout:<Br>CONST_DEV_STRING</Strong> - : Status description<Br>  -<Li><Strong>Command allowed for: </Strong><Ul> -<Li>Tango::FAULT<Li>Tango::ON<Li>Tango::INIT<Li>Tango::MOVING</Ul> -<Br>  -</ul><Br> -<Br> -<A NAME="Abort"><!-- --></A> -<A NAME="Abort"><!-- --></A> -<h2>4 - Abort</h2> -<ul> -<Li><Strong>Description: </Strong> Aborts ramps in progress.<Br>  -<Li><Strong>Argin:<Br>DEV_VOID</Strong> - : <Br>  -<Li><Strong>Argout:<Br>DEV_VOID</Strong> - : <Br>  -<Li><Strong>Command allowed for: </Strong><Ul> -<Li>Tango::FAULT<Li>Tango::ON<Li>Tango::INIT<Li>Tango::MOVING</Ul> -<Br>  -</ul><Br> -<Br> + <h2>2 - State</h2> + <ul> + <Li><Strong>Description: </Strong> This command gets the device state (stored in its <i>device_state</i> data member) and returns it to the caller. + <Li><Strong>Argin: DEV_VOID</Strong></Li> + <Li><Strong>Argout: DEV_STATE</Strong></Li> + <Li><Strong>Command allowed for: </Strong> + <Ul> + <Li>Tango::FAULT</Li> + <Li>Tango::ON</Li> + <Li>Tango::INIT</Li> + <Li>Tango::MOVING</Li> + </Ul> + </Li> + </ul> + -<!--- html Footer ---> + <h2>3 - Status</h2> + <ul> + <Li><Strong>Description: </Strong> This command gets the device status (stored in its <i>device_status</i> data member) and returns it to the caller.</Li> + <Li><Strong>Argin: DEV_VOID</Strong></Li> + <Li><Strong>Argout: CONST_DEV_STRING</Strong></Li> + <Li><Strong>Command allowed for: </Strong> + <Ul> + <Li>Tango::FAULT</Li> + <Li>Tango::ON</Li> + <Li>Tango::INIT</Li> + <Li>Tango::MOVING</Li> + </Ul> + </Li> + </ul> + -<Center> -<Font size=-1> -<br> -<br> -<TABLE BORDER="1" WIDTH="100%"> - <Tr> - <!--- Hosted by Sourceforge ---> - <Td Align="Center"> - <Font size=-1> - <b>TANGO</b> is an open source project hosted by :<br> - <A href="http://sourceforge.net" Target="new"> - <IMG title="Sourceforge logo" - alt="Sourceforge logo small" - src="http://www.esrf.fr/computing/cs/tango/sourceforge.gif" - border=0> </a> - </Font> - </Td> - <!--- 2 Sourceforge Repositories ---> - <Td Align="Center"> - <Font size=-1> - Core and Tools : - <a href="http://tango-cs.cvs.sourceforge.net/tango-cs/" Target="new"> - CVS repository</a> on - <a href="https://sourceforge.net/projects/tango-cs" Target=new> - tango-cs project</a> - - <br> - - Device Servers : - <a href="http://tango-ds.cvs.sourceforge.net/tango-ds/" Target="new"> - CVS repository</a> on - <a href="https://sourceforge.net/projects/tango-ds" Target=new> - tango-ds project</a> - </Font> - </Td> - </Tr> -</Table> -</Font> -</Center> + <h2>4 - Abort</h2> + <ul> + <Li><Strong>Description: </Strong> Aborts ramps in progress.</Li> + <Li><Strong>Argin: DEV_VOID</Strong></Li> + <Li><Strong>Argout: DEV_VOID</Strong></Li> + <Li><Strong>Command allowed for: </Strong> + <Ul> + <Li>Tango::FAULT</Li> + <Li>Tango::ON</Li> + <Li>Tango::INIT</Li> + <Li>Tango::MOVING</Li> + </Ul> + </Li> + </ul> </body> -</html> + +</html> \ No newline at end of file diff --git a/doc/doc_html/DevCommandsFrame.html b/doc/doc_html/DevCommandsFrame.html index a696d50e0bf0b56077f6f4addb65cdd9084e6d4e..8938ab20416db8b43145e6645ffdb5ea18d5751a 100755 --- a/doc/doc_html/DevCommandsFrame.html +++ b/doc/doc_html/DevCommandsFrame.html @@ -1,19 +1,20 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> -<HTML> -<HEAD> -<Title> Tango Device Server User's Guide </Title> -</HEAD> +<html> + <head> + <title> Tango Device Server User's Guide </title> + </head> -<FRAMESET cols="20%,80%"> -<FRAME src="DevCommandsList.html" name="DevCommandsList"> -<FRAME src="DevCommands.html" name="DevCommands"> -</FRAMESET> -<NOFRAMES> -<H2> -Frame Alert</H2> + <frameset cols="20%,80%"> + <frame src="DevCommandsList.html" name="DevCommandsList"> + <frame src="DevCommands.html" name="DevCommands"> + </frameset> + <noframes> + <h2> + Frame Alert</h2> -<P> -This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. -<BR> -Link to <A HREF="DevCommands.html">Non-frame version.</A></NOFRAMES> -</HTML> + <p> + This document is designed to be viewed using the frames feature. If + you see this message, you are using a non-frame-capable web client. + <br> + Link to <a HREF="DevCommands.html">Non-frame version.</a></noframes> + </html> diff --git a/doc/doc_html/DevCommandsList.html b/doc/doc_html/DevCommandsList.html index dff7f088dbab3172f6bbfb7533280f6d7b10ccec..c69789b18de41d5292efd145ee9e605d3dbf45bb 100755 --- a/doc/doc_html/DevCommandsList.html +++ b/doc/doc_html/DevCommandsList.html @@ -1,18 +1,17 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> -<HTML><HEAD> -<TITLE>Commands -</TITLE></HEAD> -<BODY BGCOLOR="white"> -<FONT size="+1" ID="FrameHeadingFont"> -<B>Commands:</B></FONT> -<Br> -<Br> -<Br> -<A Href="DevCommands.html#Init" TARGET="DevCommands"> Init</a><Br> -<A Href="DevCommands.html#State" TARGET="DevCommands"> State</a><Br> -<A Href="DevCommands.html#Status" TARGET="DevCommands"> Status</a><Br> -<A Href="DevCommands.html#Abort" TARGET="DevCommands"> Abort</a><Br> +<html><head> + <title>Commands + </title></head> + <body BGCOLOR="white"> + <font size="+1" ID="FrameHeadingFont"> + <b>Commands:</b></font> + <br> + <br> + <br> + <a Href="DevCommands.html#Init" TARGET="DevCommands"> Init</a><br> + <a Href="DevCommands.html#State" TARGET="DevCommands"> State</a><br> + <a Href="DevCommands.html#Status" TARGET="DevCommands"> Status</a><br> + <a Href="DevCommands.html#Abort" TARGET="DevCommands"> Abort</a><br> - -</BODY> -</HTML> + </body> +</html> diff --git a/doc/doc_html/DevCommandsTable.html b/doc/doc_html/DevCommandsTable.html index 7c2194aa16025d7f197d1776a3795ac3ae818715..4cd1eb471dee52f173171157a2ee9a554e151fb4 100755 --- a/doc/doc_html/DevCommandsTable.html +++ b/doc/doc_html/DevCommandsTable.html @@ -1,126 +1,63 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> -<HTML> -<HEAD> -<Title> Tango Device Server User's Guide </Title> -</HEAD> -<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#7F00FF" ALINK="#FF0000"> +<html> + +<head> + <title> Tango Device Server User's Guide </title> +</head> + +<body> + <center> + <h1> + SingleShotAO Generic Device <br> + Device Commands Description <br><br> + SingleShotAO Class <br> + </h1> + <b> + Revision: - Author: buteau + </b> + </center> + + <center> + <br><a Href="DevCommandsFrame.html"> More Details on commands.... </a><br><br> + + <table Border=2 Cellpadding=3 CELLSPACING=0 WIDTH="100%"> + <tr BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> + <td COLSPAN=3> + <font Size=+2><center> + <b>Device Commands for Operator Level</b> + </center></font> + </td> + </tr> + + <tr BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> + <td><b>Command name</b></td> + <td><b>Argument In</b></td> + <td><b>Argument Out</b></td> + </tr> + <tr> + <td><b>Init</b></td> + <td>DEV_VOID</td> + <td>DEV_VOID</td> + </tr> + <tr> + <td><b>State</b></td> + <td>DEV_VOID</td> + <td>DEV_STATE</td> + </tr> + <tr> + <td><b>Status</b></td> + <td>DEV_VOID</td> + <td>CONST_DEV_STRING</td> + </tr> + <tr> + <td><b>Abort</b></td> + <td>DEV_VOID</td> + <td>DEV_VOID</td> + </tr> + + </table> + </center> -<P><!-------TITLE------></P> - -<TABLE BORDER="0" WIDTH="100%"> - <TR> - <TD ALIGN="left"> - <A HREF="http://www.esrf.fr/" TARGET=new> - <IMG SRC="http://www.esrf.fr/gifs/logo/80.gif" BORDER=0 Height="60"></A> - </Td> - <TD ALIGN="center"> - <A HREF="http://www.elettra.trieste.it/" TARGET=new> - <IMG SRC="http://www.esrf.fr/computing/cs/tango/elettra_logo.gif" BORDER=0 Height="60"></A> - - </Td> - <TD ALIGN="center"> - <A HREF="http://www.synchrotron-soleil.fr/" TARGET=new> - <IMG SRC="http://www.esrf.fr/computing/cs/tango/soleil_logo.gif" BORDER=0 Height="60"></A> - </Td> - <TD ALIGN="right"> - <A HREF="http://www.cells.es/" TARGET=new> - <IMG SRC="http://www.esrf.fr/computing/cs/tango/alba.jpg" BORDER=0 Height="54"></A> - </Td> - <TD ALIGN="right"> - <A HREF="http://www.desy.de/html/home/index_eng.html" TARGET=new> - <IMG SRC="http://www.esrf.fr/computing/cs/tango/desy.gif" BORDER=0 Height="60"></A> - </Td> - <Td> - <H2><FONT COLOR="#7F00FF"> - <Center><A HREF="http://www.tango-controls.org/" TARGET="_top"> - TANGO </a> <Br> Device Server - </Center></FONT> - </Td> - </TR> -</TABLE> - -<HR WIDTH="100%"></H5> -<Br> -<center> -<h1> -SingleShotAO Generic Device <Br> -Device Commands Description <Br> <Br> -SingleShotAO Class <Br> -</h1> -<b> -Revision: - Author: buteau -</b> -</center> - - -<Center> -<Br><Br> -<A Href="DevCommandsFrame.html"> More Details on commands.... </a><Br> -<Br> <Br> -<Table Border=2 Cellpadding=3 CELLSPACING=0 WIDTH="100%"> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<Td COLSPAN=3> <Font Size=+2><Center><b>Device Commands for Operator Level</b></td></Font></Center> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<Td><Center><b>Command name</b></td></Center> -<Td><Center><b>Argument In</b></td></Center> -<Td><Center><b>Argument Out</b></td></Center> -<Tr><Td><b>Init</b></Td> -<Td><Font Size=-1>DEV_VOID</Font></Td> -<Td><Font Size=-1>DEV_VOID</Font></Td> -<Tr><Td><b>State</b></Td> -<Td><Font Size=-1>DEV_VOID</Font></Td> -<Td><Font Size=-1>DEV_STATE</Font></Td> -<Tr><Td><b>Status</b></Td> -<Td><Font Size=-1>DEV_VOID</Font></Td> -<Td><Font Size=-1>CONST_DEV_STRING</Font></Td> -<Tr><Td><b>Abort</b></Td> -<Td><Font Size=-1>DEV_VOID</Font></Td> -<Td><Font Size=-1>DEV_VOID</Font></Td> - - - -</Table></Center> - -<!--- html Footer ---> - -<Center> -<Font size=-1> -<br> -<br> -<TABLE BORDER="1" WIDTH="100%"> - <Tr> - <!--- Hosted by Sourceforge ---> - <Td Align="Center"> - <Font size=-1> - <b>TANGO</b> is an open source project hosted by :<br> - <A href="http://sourceforge.net" Target="new"> - <IMG title="Sourceforge logo" - alt="Sourceforge logo small" - src="http://www.esrf.fr/computing/cs/tango/sourceforge.gif" - border=0> </a> - </Font> - </Td> - <!--- 2 Sourceforge Repositories ---> - <Td Align="Center"> - <Font size=-1> - Core and Tools : - <a href="http://tango-cs.cvs.sourceforge.net/tango-cs/" Target="new"> - CVS repository</a> on - <a href="https://sourceforge.net/projects/tango-cs" Target=new> - tango-cs project</a> - - <br> - - Device Servers : - <a href="http://tango-ds.cvs.sourceforge.net/tango-ds/" Target="new"> - CVS repository</a> on - <a href="https://sourceforge.net/projects/tango-ds" Target=new> - tango-ds project</a> - </Font> - </Td> - </Tr> -</Table> -</Font> -</Center> </body> -</html> + +</html> \ No newline at end of file diff --git a/doc/doc_html/Properties.html b/doc/doc_html/Properties.html index 3f676a09f083ef4890c2129cbfcecb8e83c6203d..388a56248f2e70d9f938fcba1ca06732088d501b 100755 --- a/doc/doc_html/Properties.html +++ b/doc/doc_html/Properties.html @@ -1,144 +1,94 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> + <HEAD> -<Title> Tango Device Server User's Guide </Title> + <Title> Tango Device Server User's Guide </Title> </HEAD> -<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#7F00FF" ALINK="#FF0000"> - -<P><!-------TITLE------></P> - -<TABLE BORDER="0" WIDTH="100%"> - <TR> - <TD ALIGN="left"> - <A HREF="http://www.esrf.fr/" TARGET=new> - <IMG SRC="http://www.esrf.fr/gifs/logo/80.gif" BORDER=0 Height="60"></A> - </Td> - <TD ALIGN="center"> - <A HREF="http://www.elettra.trieste.it/" TARGET=new> - <IMG SRC="http://www.esrf.fr/computing/cs/tango/elettra_logo.gif" BORDER=0 Height="60"></A> - - </Td> - <TD ALIGN="center"> - <A HREF="http://www.synchrotron-soleil.fr/" TARGET=new> - <IMG SRC="http://www.esrf.fr/computing/cs/tango/soleil_logo.gif" BORDER=0 Height="60"></A> - </Td> - <TD ALIGN="right"> - <A HREF="http://www.cells.es/" TARGET=new> - <IMG SRC="http://www.esrf.fr/computing/cs/tango/alba.jpg" BORDER=0 Height="54"></A> - </Td> - <TD ALIGN="right"> - <A HREF="http://www.desy.de/html/home/index_eng.html" TARGET=new> - <IMG SRC="http://www.esrf.fr/computing/cs/tango/desy.gif" BORDER=0 Height="60"></A> - </Td> - <Td> - <H2><FONT COLOR="#7F00FF"> - <Center><A HREF="http://www.tango-controls.org/" TARGET="_top"> - TANGO </a> <Br> Device Server - </Center></FONT> - </Td> - </TR> -</TABLE> - -<HR WIDTH="100%"></H5> -<Br> -<center> -<h1> -SingleShotAO Generic Device <Br> -Properties Description <Br> <Br> -SingleShotAO Class <Br> -</h1> -<b> -Revision: - Author: buteau -</b> -</center> - - -<Center> -<Br> <Br> <Br> -<Table Border=2 Cellpadding=3 CELLSPACING=0 WIDTH="100%"> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<Td COLSPAN=3> <Font Size=+2><Center><b>Device Properties</b></td></Font></Center> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<Td><Center><b>Property name</b></td></Center> -<Td><Center><b>Property type</b></td></Center> -<Td><Center><b>Description</b></td></Center> -<Tr><Td><b><a href=#Dev_DefaultValues>BoardNum </a></b></Td> -<Td><Font Size=-1>Tango::DEV_SHORT</Font></Td> -<Td><Font Size=-1>The the board identifier in the cPCI crate [valid range is 0...7 - no default value] .</Font></Td></Tr> -<Tr><Td><b><a href=#Dev_DefaultValues>BoardType </a></b></Td> -<Td><Font Size=-1>Tango::DEV_STRING</Font></Td> -<Td><Font Size=-1>The board type [MAO_xxxx - where <xxxx> is the ADlink board identifier - e.g. MAO_6208 - no default value]</Font></Td></Tr> +<BODY> + <center> + <h1> + SingleShotAO Generic Device <Br> + Properties Description <Br><Br> + SingleShotAO Class <Br> + </h1> + <b> + Revision: - Author: buteau + </b> + </center> -</Table> -</Center> -<Br><Br><Br> -<Br><Br><Br> - -<A name=Dev_DefaultValues><!--- ---></a> -<Font Size=+1>Device Properties Default Values:</Font><Br> -<Table Border=2 Cellpadding=2 CELLSPACING=2> - <tr BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> - <Td><b>Property Name</b></td> - <td><b>Default Values</b></td> - </Tr> + <Center> + <Table Border=2 Cellpadding=3 CELLSPACING=0 WIDTH="100%"> + <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> + <Td COLSPAN=3> + <Font Size=+2> + <Center><b>Device Properties</b> + </td> + </Font> + </Center> + <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> + <Td> + <Center><b>Property name</b> + </td> + </Center> + <Td> + <Center><b>Property type</b> + </td> + </Center> + <Td> + <Center><b>Description</b> + </td> + </Center> <Tr> - <Td>BoardNum</Td> - <td>No default value</td> + <Td><b><a href=#Dev_DefaultValues>BoardNum </a></b></Td> + <Td> + <Font Size=-1>Tango::DEV_SHORT</Font> + </Td> + <Td> + <Font Size=-1>The the board identifier in the cPCI crate [valid range is 0...7 - no default value] .</Font> + </Td> </Tr> + <Tr> - <Td>BoardType</Td> - <td>No default value</td> + <Td><b><a href=#Dev_DefaultValues>BoardType </a></b></Td> + <Td> + <Font Size=-1>Tango::DEV_STRING</Font> + </Td> + <Td> + <Font Size=-1>The board type [MAO_xxxx - where <xxxx> is the ADlink board identifier - e.g. MAO_6208 - no + default value]</Font> + </Td> </Tr> -</Table> -<Br><Br><Br> -<Center><b> -There is no Class properties.<Br><Br> -</Center></b> -<Br> <Br> <Br> + </Table> -<!--- html Footer ---> + </Center> -<Center> -<Font size=-1> -<br> -<br> -<TABLE BORDER="1" WIDTH="100%"> - <Tr> - <!--- Hosted by Sourceforge ---> - <Td Align="Center"> - <Font size=-1> - <b>TANGO</b> is an open source project hosted by :<br> - <A href="http://sourceforge.net" Target="new"> - <IMG title="Sourceforge logo" - alt="Sourceforge logo small" - src="http://www.esrf.fr/computing/cs/tango/sourceforge.gif" - border=0> </a> - </Font> - </Td> - <!--- 2 Sourceforge Repositories ---> - <Td Align="Center"> - <Font size=-1> - Core and Tools : - <a href="http://tango-cs.cvs.sourceforge.net/tango-cs/" Target="new"> - CVS repository</a> on - <a href="https://sourceforge.net/projects/tango-cs" Target=new> - tango-cs project</a> + <A name=Dev_DefaultValues><!--- ---></a> + <Font Size=+1>Device Properties Default Values:</Font><Br> + <Table Border=2 Cellpadding=2 CELLSPACING=2> + <tr BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> + <Td><b>Property Name</b></td> + <td><b>Default Values</b></td> + </Tr> + <Tr> + <Td>BoardNum</Td> + <td>No default value</td> + </Tr> + <Tr> + <Td>BoardType</Td> + <td>No default value</td> + </Tr> + </Table> + + <Br><Br><Br> + <Center><b> + There is no Class properties.<Br><Br> + </Center></b> + <Br> <Br> <Br> - <br> - Device Servers : - <a href="http://tango-ds.cvs.sourceforge.net/tango-ds/" Target="new"> - CVS repository</a> on - <a href="https://sourceforge.net/projects/tango-ds" Target=new> - tango-ds project</a> - </Font> - </Td> - </Tr> -</Table> -</Font> -</Center> </body> -</html> + +</html> \ No newline at end of file diff --git a/doc/doc_html/TangoDevStates.html b/doc/doc_html/TangoDevStates.html index 7d7aef369600573ba7ee8dafb9bc2a773649b5c6..57cc435298cf4d7b70880490420eb69ec3a37bf9 100755 --- a/doc/doc_html/TangoDevStates.html +++ b/doc/doc_html/TangoDevStates.html @@ -1,124 +1,59 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> -<HTML> -<HEAD> -<Title> Tango Device Server User's Guide </Title> -</HEAD> -<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#7F00FF" ALINK="#FF0000"> +<html> + +<head> + <title> Tango Device Server User's Guide </title> +</head> + +<body> + <center> + <h1> + SingleShotAO Generic Device <br> + Device States Description <br> <br> + SingleShotAO Class <br> + </h1> + <b> + Revision: - Author: buteau + </b> + </center> + + <center> + <table Border=2 Cellpadding=3 CELLSPACING=0 WIDTH="100%"> + <tr BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> + <td COLSPAN=2> + <font Size=+2><center> + <b>States</b> + </center></font> + </td> + </tr> + + <tr BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> + <td><center><b>Names</b></center></td> + <td><center><b>Descriptions</b></center></td> + </tr> + + <tr> + <td><b>FAULT</b></td> + <td><font Size=-1>Hardware / driver failure or fatal error occurred</font></td> + </tr> + + <tr> + <td><b>ON</b></td> + <td><font Size=-1>Device ready to execute AO request</font></td> + </tr> + + <tr> + <td><b>INIT</b></td> + <td><font Size=-1>Device initialization in progress</font></td> + </tr> + + <tr> + <td><b>MOVING</b></td> + <td><font Size=-1>Ramp generation in progress</font></td> + </tr> + </table> + </center> -<P><!-------TITLE------></P> - -<TABLE BORDER="0" WIDTH="100%"> - <TR> - <TD ALIGN="left"> - <A HREF="http://www.esrf.fr/" TARGET=new> - <IMG SRC="http://www.esrf.fr/gifs/logo/80.gif" BORDER=0 Height="60"></A> - </Td> - <TD ALIGN="center"> - <A HREF="http://www.elettra.trieste.it/" TARGET=new> - <IMG SRC="http://www.esrf.fr/computing/cs/tango/elettra_logo.gif" BORDER=0 Height="60"></A> - - </Td> - <TD ALIGN="center"> - <A HREF="http://www.synchrotron-soleil.fr/" TARGET=new> - <IMG SRC="http://www.esrf.fr/computing/cs/tango/soleil_logo.gif" BORDER=0 Height="60"></A> - </Td> - <TD ALIGN="right"> - <A HREF="http://www.cells.es/" TARGET=new> - <IMG SRC="http://www.esrf.fr/computing/cs/tango/alba.jpg" BORDER=0 Height="54"></A> - </Td> - <TD ALIGN="right"> - <A HREF="http://www.desy.de/html/home/index_eng.html" TARGET=new> - <IMG SRC="http://www.esrf.fr/computing/cs/tango/desy.gif" BORDER=0 Height="60"></A> - </Td> - <Td> - <H2><FONT COLOR="#7F00FF"> - <Center><A HREF="http://www.tango-controls.org/" TARGET="_top"> - TANGO </a> <Br> Device Server - </Center></FONT> - </Td> - </TR> -</TABLE> - -<HR WIDTH="100%"></H5> -<Br> -<center> -<h1> -SingleShotAO Generic Device <Br> -Device States Description <Br> <Br> -SingleShotAO Class <Br> -</h1> -<b> -Revision: - Author: buteau -</b> -</center> - - -<Center> -<Br> <Br> <Br> -<Table Border=2 Cellpadding=3 CELLSPACING=0 WIDTH="100%"> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<Td COLSPAN=2> <Font Size=+2><Center><b>States</b></td></Font></Center> -<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> -<Td><Center><b>Names</b></td></Center> -<Td><Center><b>Descriptions</b></td></Center> -<Tr><Td><b>FAULT</b></Td> -<Td><Font Size=-1>Hardware / driver failure or fatal error occurred</Font></Td></Tr> - -<Tr><Td><b>ON</b></Td> -<Td><Font Size=-1>Device ready to execute AO request</Font></Td></Tr> - -<Tr><Td><b>INIT</b></Td> -<Td><Font Size=-1>Device initialization in progress</Font></Td></Tr> - -<Tr><Td><b>MOVING</b></Td> -<Td><Font Size=-1>Ramp generation in progress</Font></Td></Tr> - - - - -</Table> -</Center> - -<!--- html Footer ---> - -<Center> -<Font size=-1> -<br> -<br> -<TABLE BORDER="1" WIDTH="100%"> - <Tr> - <!--- Hosted by Sourceforge ---> - <Td Align="Center"> - <Font size=-1> - <b>TANGO</b> is an open source project hosted by :<br> - <A href="http://sourceforge.net" Target="new"> - <IMG title="Sourceforge logo" - alt="Sourceforge logo small" - src="http://www.esrf.fr/computing/cs/tango/sourceforge.gif" - border=0> </a> - </Font> - </Td> - <!--- 2 Sourceforge Repositories ---> - <Td Align="Center"> - <Font size=-1> - Core and Tools : - <a href="http://tango-cs.cvs.sourceforge.net/tango-cs/" Target="new"> - CVS repository</a> on - <a href="https://sourceforge.net/projects/tango-cs" Target=new> - tango-cs project</a> - - <br> - - Device Servers : - <a href="http://tango-ds.cvs.sourceforge.net/tango-ds/" Target="new"> - CVS repository</a> on - <a href="https://sourceforge.net/projects/tango-ds" Target=new> - tango-ds project</a> - </Font> - </Td> - </Tr> -</Table> -</Font> -</Center> </body> -</html> + +</html> \ No newline at end of file diff --git a/doc/doc_html/index.html b/doc/doc_html/index.html index abd508c8721cecf65cde3a0e17c2c317a4e0f764..43e3bc50fab03c771adc07784b75c610f26cd957 100755 --- a/doc/doc_html/index.html +++ b/doc/doc_html/index.html @@ -1,142 +1,60 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> -<HTML> -<HEAD> -<Title> Tango Device Server User's Guide </Title> -</HEAD> -<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#7F00FF" ALINK="#FF0000"> - -<P><!-------TITLE------></P> -<TABLE BORDER="0" WIDTH="100%"> - <TR> - <TD ALIGN="left"> - <A HREF="http://www.esrf.fr/" TARGET=new> - <IMG SRC="http://www.esrf.fr/gifs/logo/80.gif" BORDER=0 Height="60"></A> - </Td> - <TD ALIGN="center"> - <A HREF="http://www.elettra.trieste.it/" TARGET=new> - <IMG SRC="http://www.esrf.fr/computing/cs/tango/elettra_logo.gif" BORDER=0 Height="60"></A> - - </Td> - <TD ALIGN="center"> - <A HREF="http://www.synchrotron-soleil.fr/" TARGET=new> - <IMG SRC="http://www.esrf.fr/computing/cs/tango/soleil_logo.gif" BORDER=0 Height="60"></A> - </Td> - <TD ALIGN="right"> - <A HREF="http://www.cells.es/" TARGET=new> - <IMG SRC="http://www.esrf.fr/computing/cs/tango/alba.jpg" BORDER=0 Height="54"></A> - </Td> - <TD ALIGN="right"> - <A HREF="http://www.desy.de/html/home/index_eng.html" TARGET=new> - <IMG SRC="http://www.esrf.fr/computing/cs/tango/desy.gif" BORDER=0 Height="60"></A> - </Td> - <Td> - <H2><FONT COLOR="#7F00FF"> - <Center><A HREF="http://www.tango-controls.org/" TARGET="_top"> - TANGO </a> <Br> Device Server - </Center></FONT> - </Td> - </TR> -</TABLE> +<html> + +<head> + <title> Tango Device Server User's Guide </title> +</head> + +<body> + <center> + <h1> + SingleShotAO Generic Device <br> + User's Guide <br><Br> + SingleShotAO Class <br> + </h1> + <b> + Revision: - Author: buteau <br> + Implemented in C++ + </b> + </center> + + <h2>Introduction:</h2> + <ul> + <li>ADLink boards support for single shot AO operations [PCI-6208 and compatible boards]</li> + </ul> -<HR WIDTH="100%"></H5> -<center> -<h1> -SingleShotAO Generic Device <Br> -User's Guide <Br><Br> -SingleShotAO Class<Br> + <h2>Class Identification:</h2> + <ul> + <li><b>Contact :</b> at synchrotron-soleil.fr - buteau</li> + <li><b>Class Family :</b> InputOutput</li> + <li><b>Platform :</b> All Platforms</li> + <li><b>Bus :</b> Compact PCI</li> + </ul> -</h1> -<b> -Revision: - Author: buteau <Br> - Implemented in C++ -</b> -</center> -<Br> -<Br> -<Br> -<Br> -<h2>Introduction:</h2> -<ul> - ADLink boards support for single shot AO operations [PCI-6208 and compatible boards]<Br> -</ul> -<Br><h2>Class Identification:</h2> -<ul> - <li><b>Contact :</b> at synchrotron-soleil.fr - buteau - <li><b>Class Family :</b> InputOutput - <li><b>Platform :</b> All Platforms - <li><b>Bus :</b> Compact PCI -</ul><Br> -<h2>Class Inheritance:</h2> + <h2>Class Inheritance:</h2> <ul> - <li> <a href="http://www.esrf.fr/computing/cs/tango/tango_doc/kernel_doc/cpp_doc/"> TANGO_BASE_CLASS</a></li> + <li> <a + href="http://www.esrf.fr/computing/cs/tango/tango_doc/kernel_doc/cpp_doc/"> + TANGO_BASE_CLASS</a></li> <ul> <li> SingleShotAO</li> - </ul> </ul> </ul> -</ul> -<Br> -<Br> -<h2>Class Description:</h2> -<ul> - <li> <a href=Description.html> Device description.</a> - <li> <a href=Properties.html> Properties description</a> - <li> <a href=TangoDevStates.html> States description</a> - <li> <a href=DevCommandsTable.html> Commands description</a> - <li> <a href=Attributes.html> Attributes description</a> -</ul> -<Br> -<Br> -<Br> -<h2>Conclusion:</h2> -<ul> - The device server is ready for distribution application programmers.<Br> - The author will be interested in any feedback which arise from their - usage of this device server. -</ul> -<Br> - -<!--- html Footer ---> - -<Center> -<Font size=-1> -<br> -<br> -<TABLE BORDER="1" WIDTH="100%"> - <Tr> - <!--- Hosted by Sourceforge ---> - <Td Align="Center"> - <Font size=-1> - <b>TANGO</b> is an open source project hosted by :<br> - <A href="http://sourceforge.net" Target="new"> - <IMG title="Sourceforge logo" - alt="Sourceforge logo small" - src="http://www.esrf.fr/computing/cs/tango/sourceforge.gif" - border=0> </a> - </Font> - </Td> - <!--- 2 Sourceforge Repositories ---> - <Td Align="Center"> - <Font size=-1> - Core and Tools : - <a href="http://tango-cs.cvs.sourceforge.net/tango-cs/" Target="new"> - CVS repository</a> on - <a href="https://sourceforge.net/projects/tango-cs" Target=new> - tango-cs project</a> - - <br> + <h2>Class Description:</h2> + <ul> + <li> <a href=Description.html> Device description.</a> </li> + <li> <a href=Properties.html> Properties description</a> </li> + <li> <a href=TangoDevStates.html> States description</a> </li> + <li> <a href=DevCommandsTable.html> Commands description</a> </li> + <li> <a href=Attributes.html> Attributes description</a> </li> + </ul> + + <h2>Conclusion:</h2> + <ul> + <li>The device server is ready for distribution application programmers.</li> + <li>The author will be interested in any feedback which arise from their usage of this device server.</li> + </ul> - Device Servers : - <a href="http://tango-ds.cvs.sourceforge.net/tango-ds/" Target="new"> - CVS repository</a> on - <a href="https://sourceforge.net/projects/tango-ds" Target=new> - tango-ds project</a> - </Font> - </Td> - </Tr> -</Table> -</Font> -</Center> </body> </html> diff --git a/src/SingleShotAO.cpp b/src/SingleShotAO.cpp index 80911971616622960f56ed9669f9cec2cbcc01f1..699767f450ef72a93a22bc09255b2ef0e5f2a0f9 100755 --- a/src/SingleShotAO.cpp +++ b/src/SingleShotAO.cpp @@ -129,7 +129,32 @@ SingleShotAO::SingleShotAO(Tango::DeviceClass *cl,const char *s,const char *d) //----------------------------------------------------------------------------- void SingleShotAO::delete_device() { - // Delete device allocated objects + DEBUG_STREAM << "SingleShotAO::delete_device(): entering... !" << endl; + + // Make sure running processes are aborted properly if channels are running + //-------------------------------------------- + try + { + _abort(); + } + catch (Tango::DevFailed &df) + { + ERROR_STREAM << df << endl; + RETHROW_DEVFAILED(df, + "DRIVER_FAILURE", + "could not abort [caught Tango::DevFailed]", + "SingleShotAO::delete_device"); + } + catch (...) + { + ERROR_STREAM << "SingleShotAO::init::unknown exception caught" << std::endl; + THROW_DEVFAILED("DRIVER_FAILURE", + "could not abort [unknown error]", + "SingleShotAO::delete_device"); + } + + // Delete device allocated objects + //-------------------------------------------- yat4tango::TraceHelper t("SingleShotAO::delete_device", this); if (m_manager) @@ -138,14 +163,16 @@ void SingleShotAO::delete_device() m_manager = NULL; } - //- release the asl::SingleShotAO object + // Release the asl::SingleShotAO object + //-------------------------------------------- if (m_ssao) { delete m_ssao; m_ssao = NULL; } - // remove dynamic attributes + // Remove dynamic attributes + //-------------------------------------------- if (m_dyn_attr_manager) { try @@ -165,7 +192,8 @@ void SingleShotAO::delete_device() m_dyn_attr_manager = NULL; } - //- remove the inner appender + // Remove the inner appender + //-------------------------------------------- yat4tango::Logging::release(this); yat4tango::DeviceInfo::release(this); } @@ -219,7 +247,7 @@ void SingleShotAO::init_device() //-------------------------------------------- try { - get_device_property(); + get_device_properties(); } catch (const Tango::DevFailed& df) { @@ -315,17 +343,19 @@ void SingleShotAO::init_device() return; } + // get frequency value in database + //-------------------------------------------- try { - m_frequency = yat4tango::PropertyHelper::get_memorized_attribute<double>(this,"frequency"); + m_frequency = yat4tango::PropertyHelper::get_memorized_attribute<double>(this, "frequency"); DEBUG_STREAM << "Frequency : " << m_frequency << endl; } catch (...) { DEBUG_STREAM << "Failed to get frequency value. Maybe there is no value yet." << std::endl; } - + // initialize the AO manager //-------------------------------------------- @@ -348,6 +378,10 @@ void SingleShotAO::init_device() return; } + + // Create dynamic attributes + //-------------------------------------------- + // create dynamic attribute manager try { @@ -368,6 +402,7 @@ void SingleShotAO::init_device() return; } + // add dynamic attributes: channel, speed & initial for each channel std::vector<yat4tango::DynamicAttributeInfo> l_dynAttrList; for (unsigned int l_cpt = 0; l_cpt < m_nb_chan; l_cpt++) @@ -476,44 +511,34 @@ void SingleShotAO::init_device() l_dynAttrList.push_back(dai_initial); } - m_dyn_attr_manager->add_attributes(l_dynAttrList); + // Get memorized values from database for (unsigned int l_cpt = 0; l_cpt < m_nb_chan; l_cpt++) { yat::OSStream oss; oss << l_cpt; - // speed value - try - { - std::string attr_name = kSPEED + oss.str(); - std::string name = "__" + attr_name; - - double l_val = yat4tango::PropertyHelper::get_memorized_attribute<double>(this, name); - m_manager->set_speed(l_cpt, l_val); - } - catch (...) + // Helper function to get and set memorized attributes + auto applyMemorizedAttr = [&](const std::string& attrPrefix, + void (SingleShotAOManager::*setter)(yat::uint16, double)) { - // nothing to do - } - - // initial value - try - { - std::string attr_name = kINITIAL + oss.str(); - std::string name = "__" + attr_name; - - // To be activated with Tango 8 - //double l_val = yat4tango::PropertyHelper::get_memorized_attribute<double>(this,name); - double l_val = get_memorized_attribute<double>(name); - m_manager->set_initial(l_cpt, l_val); - } - catch (...) - { - //nothing to do - } + try { + std::string attrName = attrPrefix + oss.str(); + double val = yat4tango::PropertyHelper::get_memorized_attribute<double>(this, attrName); + (m_manager->*setter)(l_cpt, val); + } + catch (...) { + // nothing to do + } + }; + + // Get and set memorized values for speed, initial and channel + applyMemorizedAttr(kSPEED, &SingleShotAOManager::set_speed); + applyMemorizedAttr(kINITIAL, &SingleShotAOManager::set_initial); + applyMemorizedAttr(kCHANNEL, &SingleShotAOManager::set_channel); + // TODO: add a property to call write_channel instead of set_channel (false by default) } //- GO for task @@ -545,12 +570,12 @@ void SingleShotAO::init_device() //+---------------------------------------------------------------------------- // -// method : SingleShotAO::get_device_property() +// method : SingleShotAO::get_device_properties() // // description : Read the device properties from database. // //----------------------------------------------------------------------------- -void SingleShotAO::get_device_property() +void SingleShotAO::get_device_properties() { // Initialize your default values here (if not done with POGO). //------------------------------------------------------------------ @@ -666,8 +691,7 @@ void SingleShotAO::always_executed_hook() //----------------------------------------------------------------------------- void SingleShotAO::read_attr_hardware(vector<long> &attr_list) { - //DEBUG_STREAM << "SingleShotAO::read_attr_hardware(vector<long> &attr_list) entering... "<< endl; - // Add your own code here + // nothing to do } @@ -680,7 +704,6 @@ void SingleShotAO::read_attr_hardware(vector<long> &attr_list) //----------------------------------------------------------------------------- void SingleShotAO::read_frequency(Tango::Attribute &attr) { - //DEBUG_STREAM << "SingleShotAO::read_frequency(Tango::Attribute &attr) entering... "<< endl; attr.set_value(&m_frequency); } @@ -759,6 +782,42 @@ Tango::ConstDevString SingleShotAO::dev_status() } +//+------------------------------------------------------------------ +/** + * Extract the number from a dynamic attribute name with a specific prefix. + * Used for parsing dynamic attribute names like "channelX", "speedX", "initialX" + * where X is the channel number. + * + * @param str The input string to search for numbers + * @param prefix The expected prefix (e.g., "channel", "speed", "initial") + * @return The number found after the prefix + * @throws DevFailed if string doesn't start with prefix or no number is found + */ +int extractNumber(const std::string &str, const char* prefix) +{ + // Validate string starts with the given prefix + if (str.find(prefix) != 0) + { + THROW_DEVFAILED("DEVICE_ERROR", + "String must start with the expected prefix", + "SingleShotAO::extractNumber"); + } + + // Find first digit after the prefix + size_t pos = strlen(prefix); + + // Extract and convert the number + std::string numberStr = str.substr(pos); + if (numberStr.empty() || !isdigit(numberStr[0])) + { + THROW_DEVFAILED("DEVICE_ERROR", + "No number found after prefix", + "SingleShotAO::extractNumber"); + } + + return std::stoi(numberStr); +} + //+------------------------------------------------------------------ /** * method: SingleShotAO::read_channel @@ -770,15 +829,10 @@ Tango::ConstDevString SingleShotAO::dev_status() void SingleShotAO::read_channel(yat4tango::DynamicAttributeReadCallbackData & cbd) { yat::AutoMutex<> guard(m_lock); - std::string l_attr_name = cbd.dya->get_name(); - - // name will be channelX - std::string l_str = l_attr_name.substr(7, 2); - yat::uint16 l_idx = atoi(l_str.c_str()); + yat::uint16 l_idx = extractNumber(l_attr_name, kCHANNEL); // extract channel nb CHECK_MANAGER(); - // choose tab depending on l_idx double l_val = m_manager->get_channel(l_idx); cbd.tga->set_value(&l_val); } @@ -798,10 +852,7 @@ void SingleShotAO::write_channel(yat4tango::DynamicAttributeWriteCallbackData & cbd.tga->get_write_value(l_val); std::string l_attr_name = cbd.dya->get_name(); - - // name will be channelX - std::string l_str = l_attr_name.substr(7, 2); - yat::uint16 l_idx = atoi(l_str.c_str()); + yat::uint16 l_idx = extractNumber(l_attr_name, kCHANNEL); // extract channel nb CHECK_MANAGER(); try @@ -823,6 +874,8 @@ void SingleShotAO::write_channel(yat4tango::DynamicAttributeWriteCallbackData & "could not write channel [unknown error]", "SingleShotAO::write_channel"); } + + yat4tango::PropertyHelper::set_memorized_attribute(this, l_attr_name, l_val); } @@ -837,15 +890,10 @@ void SingleShotAO::write_channel(yat4tango::DynamicAttributeWriteCallbackData & void SingleShotAO::read_speed(yat4tango::DynamicAttributeReadCallbackData & cbd) { yat::AutoMutex<> guard(m_lock); - std::string l_attr_name = cbd.dya->get_name(); + yat::uint16 l_idx = extractNumber(l_attr_name, kSPEED); // extract channel nb - // name will be speedX - std::string l_str = l_attr_name.substr(5, 2); - yat::uint16 l_idx = atoi(l_str.c_str()); - - CHECK_MANAGER(); - // choose tab depending on l_idx + CHECK_MANAGER(); double l_val = m_manager->get_speed(l_idx); cbd.tga->set_value(&l_val); } @@ -861,16 +909,13 @@ void SingleShotAO::read_speed(yat4tango::DynamicAttributeReadCallbackData & cbd) //+------------------------------------------------------------------ void SingleShotAO::write_speed(yat4tango::DynamicAttributeWriteCallbackData & cbd) { - DEBUG_STREAM << "SingleShotAO::write_speed(): entering... !" << endl; + DEBUG_STREAM << "SingleShotAO::write_speed(): entering... !" << endl; double l_val; cbd.tga->get_write_value(l_val); std::string l_attr_name = cbd.dya->get_name(); - - // name will be speedX - std::string l_str = l_attr_name.substr(5, 2); - yat::uint16 l_idx = atoi(l_str.c_str()); + yat::uint16 l_idx = extractNumber(l_attr_name, kSPEED); // extract channel nb if (l_val < 0) { l_val = -l_val; @@ -886,20 +931,18 @@ void SingleShotAO::write_speed(yat4tango::DynamicAttributeWriteCallbackData & cb ERROR_STREAM << df<< endl; RETHROW_DEVFAILED(df, "DRIVER_FAILURE", - "could not write initial [caught Tango::DevFailed]", - "SingleShotAO::write_initial"); + "could not write speed [caught Tango::DevFailed]", + "SingleShotAO::write_speed"); } catch(...) { - ERROR_STREAM << "SingleShotAO::write_initial::unknown exception caught"<<std::endl; + ERROR_STREAM << "SingleShotAO::write_speed::unknown exception caught" << std::endl; THROW_DEVFAILED("DRIVER_FAILURE", - "could not write initial [unknown error]", - "SingleShotAO::write_initial"); + "could not write speed [unknown error]", + "SingleShotAO::write_speed"); } - // To be activated with Tango 8 - //yat4tango::PropertyHelper::set_memorized_attribute(this, l_attr_name, l_val); - std::string name = "__" + l_attr_name; - store_value_as_property(l_val, name); + + yat4tango::PropertyHelper::set_memorized_attribute(this, l_attr_name, l_val); } @@ -914,15 +957,10 @@ void SingleShotAO::write_speed(yat4tango::DynamicAttributeWriteCallbackData & cb void SingleShotAO::read_initial(yat4tango::DynamicAttributeReadCallbackData & cbd) { yat::AutoMutex<> guard(m_lock); - std::string l_attr_name = cbd.dya->get_name(); - - // name will be initialX - std::string l_str = l_attr_name.substr(7, 2); - yat::uint16 l_idx = atoi(l_str.c_str()); + yat::uint16 l_idx = extractNumber(l_attr_name, kINITIAL); // extract channel nb CHECK_MANAGER(); - // choose tab depending on l_idx double l_val = m_manager->get_initial(l_idx); cbd.tga->set_value(&l_val); } @@ -938,16 +976,13 @@ void SingleShotAO::read_initial(yat4tango::DynamicAttributeReadCallbackData & cb //+------------------------------------------------------------------ void SingleShotAO::write_initial(yat4tango::DynamicAttributeWriteCallbackData & cbd) { - DEBUG_STREAM << "SingleShotAO::write_initial(): entering... !" << endl; + DEBUG_STREAM << "SingleShotAO::write_initial(): entering... !" << endl; double l_val; cbd.tga->get_write_value(l_val); std::string l_attr_name = cbd.dya->get_name(); - - // name will be initialX - std::string l_str = l_attr_name.substr(7, 2); - yat::uint16 l_idx = atoi(l_str.c_str()); + yat::uint16 l_idx = extractNumber(l_attr_name, kINITIAL); // extract channel nb CHECK_MANAGER(); try @@ -969,10 +1004,8 @@ void SingleShotAO::write_initial(yat4tango::DynamicAttributeWriteCallbackData & "could not write initial [unknown error]", "SingleShotAO::write_initial"); } - // To be activated with Tango 8 - //yat4tango::PropertyHelper::set_memorized_attribute(this, l_attr_name, l_val); - std::string name = "__" + l_attr_name; - store_value_as_property(l_val, name); + + yat4tango::PropertyHelper::set_memorized_attribute(this, l_attr_name, l_val); } @@ -983,18 +1016,14 @@ void SingleShotAO::write_initial(yat4tango::DynamicAttributeWriteCallbackData & * description: method to execute "Abort" * Aborts ramps in progress. * - * */ //+------------------------------------------------------------------ void SingleShotAO::abort() { DEBUG_STREAM << "SingleShotAO::abort(): entering... !" << endl; - - // Add your own code to control device here - CHECK_MANAGER(); try { - m_manager->abort(); + _abort(); } catch(Tango::DevFailed& df) { @@ -1006,12 +1035,32 @@ void SingleShotAO::abort() } catch(...) { - ERROR_STREAM << "SingleShotAOManager::abort::unknown exception caught"<<std::endl; + ERROR_STREAM << "SingleShotAO::abort::unknown exception caught"<< std::endl; THROW_DEVFAILED("DRIVER_FAILURE", "could not abort [unknown error]", "SingleShotAO::abort"); } +} + +void SingleShotAO::_abort() +{ + CHECK_MANAGER(); + + // memorize the current initial_values and value of channels + for (unsigned int l_cpt = 0; l_cpt < m_nb_chan; l_cpt++) + { + if (m_manager->is_running(l_cpt)) { + DEBUG_STREAM << "Channel " << l_cpt << " is running. Memorizing values..." << std::endl; + + double l_val_channel = m_manager->get_channel(l_cpt); + yat4tango::PropertyHelper::set_memorized_attribute(this, kCHANNEL + std::to_string(l_cpt), l_val_channel); + DEBUG_STREAM << "Memorizing channel " << l_cpt << " to " << l_val_channel << std::endl; + yat4tango::PropertyHelper::set_memorized_attribute(this, kINITIAL + std::to_string(l_cpt), l_val_channel); + DEBUG_STREAM << "Memorizing initial " << l_cpt << " to " << l_val_channel << std::endl; + } + } + m_manager->abort(); } } // namespace diff --git a/src/SingleShotAO.h b/src/SingleShotAO.h index 61f5f60f7bf8ed1a287dead8d17a84f5219e134c..8e259d076f2b50dd42d185e749c98991515fe2d1 100755 --- a/src/SingleShotAO.h +++ b/src/SingleShotAO.h @@ -219,7 +219,7 @@ public : /** * Read the device properties from database */ - void get_device_property(); + void get_device_properties(); //@} // Here is the end of the automatic code generation part @@ -279,76 +279,9 @@ protected : //- channel number unsigned short m_nb_chan; - // To be deleted with Tango 8 - //- Template class to store a current value in a Device property. - //- \param value Value to store. - //- \param property_name Name to use. - template <class T> - void store_value_as_property(T value, std::string property_name) - { - Tango::DbDatum current_value(property_name); - current_value << value; - Tango::DbData db_data; - db_data.push_back(current_value); - - try - { - get_db_device()->put_property(db_data); - } - catch(Tango::DevFailed &df) - { - ERROR_STREAM << df << endl; - RETHROW_DEVFAILED(df, - "SOFTWARE_FAILURE", - "Error while storing properties in database", - "SingleShotAO::store_value_as_property"); - } - } - - // To be deleted with Tango 8 - //- Template class to get a memorized attribute stored as a Device property. - //- \param property_name Name od the property to read. - template <class T> - T get_memorized_attribute(const std::string& property_name) - { - T value; - if (!Tango::Util::instance()->_UseDb) - { - //- throw exception - THROW_DEVFAILED("DEVICE_ERROR", - "No DATA BASE!", - "SingleShotAO::get_memorized_attribute"); - } - - Tango::DbData dev_prop; - dev_prop.push_back(Tango::DbDatum(property_name)); - try - { - get_db_device()->get_property(dev_prop); - } - catch (Tango::DevFailed &df) - { - //- rethrow exception - RETHROW_DEVFAILED(df, - "DEVICE_ERROR", - "could not get Device properties! [caught Tango::DevFailed]", - "SingleShotAO::get_memorized_attribute"); - } - - if (dev_prop[0].is_empty()==false) - { - dev_prop[0] >> value; - } - else - { - //- throw exception - THROW_DEVFAILED("DATA_ERROR", - "No property stored in database!", - "SingleShotAO::get_memorized_attribute"); - } - return value; - } + void _abort(); + }; } // namespace_ns diff --git a/src/SingleShotAOManager.cpp b/src/SingleShotAOManager.cpp index 1a7122381e94e33a69abdf52bc698df03972c2e6..e0519ecd5ca25bf68afb2c6869375887558b664b 100755 --- a/src/SingleShotAOManager.cpp +++ b/src/SingleShotAOManager.cpp @@ -145,12 +145,12 @@ void SingleShotAOManager::init(asl::SingleShotAO * p_ssao, unsigned short p_nb_c enable_periodic_msg(true); } - // initialize channel indexes (-1 means no ramp in progress) - // and ramp states - for (unsigned int l_cpt = 0;l_cpt < m_nb_chan;l_cpt++) + // initialize channel indexes (-1 means no ramp in progress) + // and ramp states + for (unsigned int l_cpt = 0; l_cpt < m_nb_chan; l_cpt++) { m_currentIndex[l_cpt] = -1; - m_isRunning[l_cpt] = false; + m_isRunning[l_cpt] = false; } } @@ -164,37 +164,39 @@ void SingleShotAOManager::process_message (yat::Message& msg) switch (msg.type()) { //- THREAD_INIT ---------------------- - case yat::TASK_INIT: + case yat::TASK_INIT: { DEBUG_STREAM << "SingleShotAOManager::handle_message::THREAD_INIT::thread is starting up" << std::endl; } break; //- THREAD_EXIT ---------------------- - case yat::TASK_EXIT: + case yat::TASK_EXIT: { DEBUG_STREAM << "SingleShotAOManager::handle_message::THREAD_EXIT::thread is quitting" << std::endl; } break; //- THREAD_PERIODIC ------------------ - case yat::TASK_PERIODIC: + case yat::TASK_PERIODIC: { - //DEBUG_STREAM << "SingleShotAOManager::handle_message::THREAD_PERIODIC" << std::endl; periodic_job_i(); } break; //- THREAD_TIMEOUT ------------------- - case yat::TASK_TIMEOUT: + case yat::TASK_TIMEOUT: { //- not used in this example } break; + //- UNHANDLED MSG -------------------- - default: - DEBUG_STREAM << "SingleShotAOManager::handle_message::unhandled msg type received" << std::endl; - break; + default: + { + DEBUG_STREAM << "SingleShotAOManager::handle_message::unhandled msg type received" << std::endl; + break; + } } } @@ -203,54 +205,52 @@ void SingleShotAOManager::process_message (yat::Message& msg) // ============================================================================ void SingleShotAOManager::periodic_job_i() { - //test all channels + // test all channels for (unsigned int l_cpt = 0;l_cpt < m_nb_chan;l_cpt++) { - //test if a ramp step must occur - if (m_currentIndex[l_cpt] != -1) + // test if a ramp step must occur + if (m_currentIndex[l_cpt] == -1) { - //DEBUG_STREAM << "Current index for channel" << l_cpt << ": " << m_currentIndex[l_cpt] << endl; - m_isRunning[l_cpt] = true; - double l_val = 0; - l_val = m_ramps[l_cpt][m_currentIndex[l_cpt]]; - DEBUG_STREAM << "Current value for channel" << l_cpt << ": " << l_val << endl; - try - { - CHECK_SSAO(); - m_ssao->write_scaled_channel((adl::ChanId)l_cpt, l_val); - m_channels[l_cpt] = l_val; - } - catch(const asl::DAQException& de) - { - Tango::DevFailed df = daq_to_tango_exception(de); - ERROR_STREAM << df<< endl; - m_state = Tango::FAULT; - RETHROW_DEVFAILED(df, - "DRIVER_FAILURE", - "could not write channel [caught asl::DAQException]", - "SingleShotAOManager::write_channel"); - } - catch(...) - { - ERROR_STREAM << "SingleShotAOManager::write_channel::unknown exception caught"<<std::endl; - m_state = Tango::FAULT; - THROW_DEVFAILED("DRIVER_FAILURE", - "could not write channel [unknown error]", - "SingleShotAOManager::write_channel"); - } - - //check if there is another value - m_currentIndex[l_cpt] +=1; - if (m_currentIndex[l_cpt] == m_ramps[l_cpt].capacity()) - { - m_currentIndex[l_cpt] = -1; - m_initials[l_cpt] = m_channels[l_cpt]; - m_ramps[l_cpt].clear(); - } + m_isRunning[l_cpt] = false; + continue; } - else + + m_isRunning[l_cpt] = true; + double l_val = 0; + l_val = m_ramps[l_cpt][m_currentIndex[l_cpt]]; + DEBUG_STREAM << "Current value for channel" << l_cpt << ": " << l_val << endl; + try { - m_isRunning[l_cpt] = false; + CHECK_SSAO(); + m_ssao->write_scaled_channel((adl::ChanId)l_cpt, l_val); + m_channels[l_cpt] = l_val; + } + catch(const asl::DAQException& de) + { + Tango::DevFailed df = daq_to_tango_exception(de); + ERROR_STREAM << df << endl; + m_state = Tango::FAULT; + RETHROW_DEVFAILED(df, + "DRIVER_FAILURE", + "could not write channel [caught asl::DAQException]", + "SingleShotAOManager::write_channel"); + } + catch(...) + { + ERROR_STREAM << "SingleShotAOManager::write_channel::unknown exception caught" << std::endl; + m_state = Tango::FAULT; + THROW_DEVFAILED("DRIVER_FAILURE", + "could not write channel [unknown error]", + "SingleShotAOManager::write_channel"); + } + + // check if there is another value + m_currentIndex[l_cpt] += 1; + if (m_currentIndex[l_cpt] == m_ramps[l_cpt].capacity()) + { + m_currentIndex[l_cpt] = -1; + m_initials[l_cpt] = m_channels[l_cpt]; + m_ramps[l_cpt].clear(); } } } @@ -263,13 +263,31 @@ double SingleShotAOManager::get_channel(ChannelId_t p_chIdx) return m_channels[p_chIdx]; } +// ============================================================================ +// SingleShotAOManager::set_channel () +// ============================================================================ +void SingleShotAOManager::set_channel(ChannelId_t p_chIdx, double p_val) +{ + if (m_isRunning[p_chIdx]) + { + THROW_DEVFAILED("DEVICE_FAILURE", + "could not write channel : a ramp is still in progress on this channel", + "SingleShotAOManager::set_channel"); + } + else + { + m_channels[p_chIdx] = p_val; + } +} + // ============================================================================ // SingleShotAOManager::write_channel () // ============================================================================ void SingleShotAOManager::write_channel(ChannelId_t p_chIdx, double p_val) { - DEBUG_STREAM << "write_channel : " << p_chIdx << " : " << p_val << " : " << endl; + DEBUG_STREAM << "write_channel " << p_chIdx << " : " << p_val << endl; + // if the speed is 0, write the value directly and skip ramp if (m_speeds[p_chIdx] == 0.0) { try @@ -278,102 +296,98 @@ void SingleShotAOManager::write_channel(ChannelId_t p_chIdx, double p_val) m_ssao->write_scaled_channel((adl::ChanId)p_chIdx, p_val); m_channels[p_chIdx] = p_val; m_initials[p_chIdx] = p_val; + DEBUG_STREAM << "Speed is 0, writing directly the value" << std::endl; } - catch(const asl::DAQException& de) + catch (const asl::DAQException &de) { Tango::DevFailed df = daq_to_tango_exception(de); - ERROR_STREAM << df<< endl; + ERROR_STREAM << df << std::endl; m_state = Tango::FAULT; RETHROW_DEVFAILED(df, "DRIVER_FAILURE", "could not write channel [caught asl::DAQException]", "SingleShotAOManager::write_channel"); } - catch(...) + catch (...) { - ERROR_STREAM << "SingleShotAOManager::write_channel::unknown exception caught"<<std::endl; + ERROR_STREAM << "SingleShotAOManager::write_channel::unknown exception caught" << std::endl; m_state = Tango::FAULT; THROW_DEVFAILED("DRIVER_FAILURE", "could not write channel [unknown error]", "SingleShotAOManager::write_channel"); } + return; } - else + + // if a ramp is running, error + if (m_isRunning[p_chIdx]) { - // check if a ramp is not running - if (!m_isRunning[p_chIdx]) + THROW_DEVFAILED("DEVICE_FAILURE", + "could not write channel : a ramp is still in progress on this channel", + "SingleShotAOManager::write_channel"); + } + + // if frequency = 0, error + if (m_frequency == 0) + { + THROW_DEVFAILED("DRIVER_FAILURE", + "could not set a ramp on this channel. The frequency is 0", + "SingleShotAOManager::write_channel"); + } + + // if initial = channel, skip + if (m_initials[p_chIdx] == p_val) + { + DEBUG_STREAM << "Initial value is the same as the given value, skipping" << endl; + return; + } + + // ramp determination + double l_delta = p_val - m_initials[p_chIdx]; + bool isDown = false; + l_delta = ((l_delta * m_frequency) / m_speeds[p_chIdx]) + 1; + if (l_delta < 0) + { + l_delta = -l_delta + 2; + isDown = true; + } + DEBUG_STREAM << "Computed ramp steps number : " << l_delta << endl; + + yat::Buffer<double> l_buffer; + size_t ramp_size = (size_t)(ceil(l_delta)); + l_buffer.capacity(ramp_size); + l_buffer.force_length(ramp_size); + + // check if ramp step is integer or not + bool isDeltaNotInt = (ramp_size != ((size_t)(floor(l_delta)))); + DEBUG_STREAM << "Real ramp steps number : " << ramp_size << endl; + + for (unsigned int l_cpt = 0; l_cpt < ramp_size; l_cpt++) + { + if ((l_cpt == (ramp_size - 1)) && (isDeltaNotInt)) { - // check if initial = channel - if (m_initials[p_chIdx] != p_val) - { - if (m_frequency == 0) - { - THROW_DEVFAILED("DRIVER_FAILURE", - "could not set a ramp on this channel. The frequency is 0", - "SingleShotAOManager::write_channel"); - } - - //ramp determination - double l_delta = p_val - m_initials[p_chIdx]; - bool isDown = false; - l_delta = ((l_delta * m_frequency) / m_speeds[p_chIdx])+1; - if (l_delta < 0) - { - l_delta = -l_delta + 2; - isDown = true; - } - DEBUG_STREAM << "Computed ramp steps number : " << l_delta << endl; - - yat::Buffer<double> l_buffer; - size_t ramp_size = (size_t)(ceil(l_delta)); - l_buffer.capacity(ramp_size); - l_buffer.force_length(ramp_size); - - // check if ramp step is integer or not - bool isDeltaNotInt = false; - if (ramp_size != ((size_t)(floor(l_delta)))) - { - isDeltaNotInt = true; - } - - DEBUG_STREAM << "Real ramp steps number : " << ramp_size << endl; - - for (unsigned int l_cpt = 0; l_cpt < ramp_size; l_cpt++) - { - if ((l_cpt == (ramp_size - 1)) && - (isDeltaNotInt)) - { - // add the setpoint value at the end of table - l_buffer[l_cpt] = p_val; - } - else - { - if (isDown) - { - l_buffer[l_cpt] = m_initials[p_chIdx] - l_cpt*(m_speeds[p_chIdx]/m_frequency); - } - else - { - l_buffer[l_cpt] = m_initials[p_chIdx] + l_cpt*(m_speeds[p_chIdx]/m_frequency); - } - } - //DEBUG_STREAM << "Ramp buffer[" << l_cpt << "] = " << l_buffer[l_cpt] << endl; - } - m_ramps[p_chIdx].clear(); - m_ramps[p_chIdx].capacity(0); - m_ramps[p_chIdx].force_length(0); - m_currentIndex[p_chIdx] = 0; - m_ramps[p_chIdx] = l_buffer; - //m_channels[p_chIdx] = m_ramps[p_chIdx][0]; -- soso on ne met rien ici => à l'application - } + // add the setpoint value at the end of table + l_buffer[l_cpt] = p_val; } else { - THROW_DEVFAILED("DEVICE_FAILURE", - "could not write channel : a ramp is still in progress on this channel", - "SingleShotAOManager::write_channel"); + if (isDown) + { + l_buffer[l_cpt] = m_initials[p_chIdx] - l_cpt * (m_speeds[p_chIdx] / m_frequency); + } + else + { + l_buffer[l_cpt] = m_initials[p_chIdx] + l_cpt * (m_speeds[p_chIdx] / m_frequency); + } } + //DEBUG_STREAM << "Ramp buffer[" << l_cpt << "] = " << l_buffer[l_cpt] << endl; } + m_ramps[p_chIdx].clear(); + m_ramps[p_chIdx].capacity(0); + m_ramps[p_chIdx].force_length(0); + m_currentIndex[p_chIdx] = 0; + m_ramps[p_chIdx] = l_buffer; + //m_channels[p_chIdx] = m_ramps[p_chIdx][0]; -- soso on ne met rien ici => à l'application } // ============================================================================ @@ -426,13 +440,21 @@ void SingleShotAOManager::set_speed(ChannelId_t p_chIdx, Intial_t p_speed) } } +// ============================================================================ +// SingleShotAOManager::is_running () +// ============================================================================ +bool SingleShotAOManager::is_running(ChannelId_t p_chIdx) +{ + return m_isRunning[p_chIdx]; +} + // ============================================================================ // SingleShotAOManager::abort () // ============================================================================ void SingleShotAOManager::abort() { - //test all channels and abort current ramps - for (unsigned int l_cpt = 0;l_cpt < m_nb_chan;l_cpt++) + // test all channels and abort current ramps + for (unsigned int l_cpt = 0; l_cpt < m_nb_chan; l_cpt++) { if (m_isRunning[l_cpt]) { @@ -444,5 +466,5 @@ void SingleShotAOManager::abort() } } } -} // namespace SingleShotAO_ns +} // namespace SingleShotAO_ns diff --git a/src/SingleShotAOManager.h b/src/SingleShotAOManager.h index 27e73ced03b88b1dbe5300aeaa4272ff12a586b8..a021036cde359e9046c6de08ae373a3bdadcf3e7 100755 --- a/src/SingleShotAOManager.h +++ b/src/SingleShotAOManager.h @@ -52,17 +52,20 @@ public: //- get current channel value double get_channel(ChannelId_t p_chIdx); - + + //- set channel + void set_channel(ChannelId_t p_chIdx, double p_val); + //- write channel void write_channel(ChannelId_t p_chIdx, double p_val); //- change period void write_frequency(double p_frequency); - //- get inital + //- get initial Intial_t get_initial(ChannelId_t p_chIdx); - //- set inital + //- set initial void set_initial(ChannelId_t p_chIdx, Intial_t p_initial); //- get speed @@ -71,6 +74,9 @@ public: //- set speed void set_speed(ChannelId_t p_chIdx, Intial_t p_speed); + //- is running + bool is_running(ChannelId_t p_chIdx); + //- abort void abort();