Skip to content
Snippets Groups Projects
Commit e987b0b6 authored by Gwenaelle ABEILLE's avatar Gwenaelle ABEILLE
Browse files

minor changes.

parent 30e80feb
No related branches found
No related tags found
No related merge requests found
File added
......@@ -28,7 +28,7 @@ Device Attributes Description
</h1>
<Br>
<b>
Revision: 1.3 - Author: abeilleg
Revision: 1.4 - Author: abeilleg
</b>
</center>
......
......@@ -28,7 +28,7 @@ Device Commands Description
</h1>
<Br>
<b>
Revision: 1.3 - Author: abeilleg
Revision: 1.4 - Author: abeilleg
</b>
</center>
......@@ -88,7 +88,7 @@ The language device desctructor automatically calls the <i> delete_device() </i>
<ul>
<Li><Strong>Description: </Strong> Read the current value of the specified line of a port.<Br>&nbsp
<Li><Strong>Argin:<Br>DEV_STRING</Strong>
: The line to read (from Px0 to Px7)<Br>&nbsp
: The line to read ,from Px0 to Px7)<Br>&nbsp
<Li><Strong>Argout:<Br>DEV_BOOLEAN</Strong>
: The state of the line<Br>&nbsp
<Li><Strong>Command allowed for: </Strong><Ul>
......@@ -102,7 +102,7 @@ The language device desctructor automatically calls the <i> delete_device() </i>
<ul>
<Li><Strong>Description: </Strong> Set the specified line (put it in high state).<Br>&nbsp
<Li><Strong>Argin:<Br>DEV_STRING</Strong>
: The line to set (Px0 to Px7)<Br>&nbsp
: The line to set ,Px0 to Px7)<Br>&nbsp
<Li><Strong>Argout:<Br>DEV_VOID</Strong>
: <Br>&nbsp
<Li><Strong>Command allowed for: </Strong><Ul>
......@@ -116,7 +116,7 @@ The language device desctructor automatically calls the <i> delete_device() </i>
<ul>
<Li><Strong>Description: </Strong> Reset the specified line (put it in low state).<Br>&nbsp
<Li><Strong>Argin:<Br>DEV_STRING</Strong>
: The line to reset (from Px0 to Px7)<Br>&nbsp
: The line to reset ,from Px0 to Px7)<Br>&nbsp
<Li><Strong>Argout:<Br>DEV_VOID</Strong>
: <Br>&nbsp
<Li><Strong>Command allowed for: </Strong><Ul>
......@@ -130,7 +130,7 @@ The language device desctructor automatically calls the <i> delete_device() </i>
<ul>
<Li><Strong>Description: </Strong> Read the current state of the specified port.<Br>&nbsp
<Li><Strong>Argin:<Br>DEV_STRING</Strong>
: The port to read (PA, PB, PC or PD for DIO_7432 and PA, PB.. or PF for DIO_7248)<Br>&nbsp
: The port to read ,PA, PB, PC or PD for DIO_7432 and PA, PB.. or PF for DIO_7248)<Br>&nbsp
<Li><Strong>Argout:<Br>DEV_SHORT</Strong>
: The current state of the port ,8-bit value)<Br>&nbsp
<Li><Strong>Command allowed for: </Strong><Ul>
......
......@@ -28,7 +28,7 @@ Device Commands Description
</h1>
<Br>
<b>
Revision: 1.3 - Author: abeilleg
Revision: 1.4 - Author: abeilleg
</b>
</center>
......
......@@ -28,7 +28,7 @@ Properties Description
</h1>
<Br>
<b>
Revision: 1.3 - Author: abeilleg
Revision: 1.4 - Author: abeilleg
</b>
</center>
......@@ -52,27 +52,27 @@ Revision: 1.3 - Author: abeilleg
<Td>The board type (the possible values are DIO_7248or DIO_7432 for this device).</Td></Tr>
<Tr><Td>PortAdirection</Td>
<Td>string</Td>
<Td>Tango::DEV_STRING</Td>
<Td>The direction of PortA (IN or OUT). Only valuable for DIO_7248 board.</Td></Tr>
<Tr><Td>PortBdirection</Td>
<Td>string</Td>
<Td>Tango::DEV_STRING</Td>
<Td>The direction of PortB (IN or OUT). Only valuable for DIO_7248 board.</Td></Tr>
<Tr><Td>PortCdirection</Td>
<Td>string</Td>
<Td>Tango::DEV_STRING</Td>
<Td>The direction of PortC (IN or OUT). Only valuable for DIO_7248 board.</Td></Tr>
<Tr><Td>PortDdirection</Td>
<Td>string</Td>
<Td>Tango::DEV_STRING</Td>
<Td>The direction of PortD (IN or OUT). Only valuable for DIO_7248 board.</Td></Tr>
<Tr><Td>PortEdirection</Td>
<Td>string</Td>
<Td>Tango::DEV_STRING</Td>
<Td>The direction of PortE (IN or OUT). Only valuable for DIO_7248 board.</Td></Tr>
<Tr><Td>PortFdirection</Td>
<Td>string</Td>
<Td>Tango::DEV_STRING</Td>
<Td>The direction of PortF (IN or OUT). Only valuable for DIO_7248 board.</Td></Tr>
</Table>
......
......@@ -28,7 +28,7 @@ Device States Description
</h1>
<Br>
<b>
Revision: 1.3 - Author: abeilleg
Revision: 1.4 - Author: abeilleg
</b>
</center>
......
......@@ -28,7 +28,7 @@ Device Server User's Guide
</h1>
<Br>
<b>
Revision: 1.3 - Author: abeilleg
Revision: 1.4 - Author: abeilleg
</b>
</center>
<Br>
......@@ -53,9 +53,9 @@ digital input/ouput modes.<Br>
<Br>
<Br>
<Br>
<h2>Programmer's guide:</h2>
<h2>Extented User's guide (available only for complex DeviceServers):</h2>
<ul>
<li> <a href="html/index.html"> Software description.</a>
<li> <a href="../SingleShotDIOUsersGuide_en.doc"> In English word format.</a>
</ul>
<Br>
<Br>
......
static const char *RcsId = "$Header: /users/chaize/newsvn/cvsroot/InputOutput/ADLINK/SingleShotDIO/src/SingleShotDIO.cpp,v 1.4 2004-09-22 08:33:42 abeilleg Exp $";
static const char *RcsId = "$Header: /users/chaize/newsvn/cvsroot/InputOutput/ADLINK/SingleShotDIO/src/SingleShotDIO.cpp,v 1.5 2004-09-30 13:23:58 abeilleg Exp $";
//+=============================================================================
//
// file : SingleShotDIO.cpp
......@@ -13,9 +13,12 @@ static const char *RcsId = "$Header: /users/chaize/newsvn/cvsroot/InputOutput/AD
//
// $Author: abeilleg $
//
// $Revision: 1.4 $
// $Revision: 1.5 $
//
// $Log: not supported by cvs2svn $
// Revision 1.4 2004/09/22 08:33:42 abeilleg
// respect to Soleil nomenclature added.
//
// Revision 1.3 2004/08/24 13:07:31 abeilleg
// update doc.
//
......@@ -263,11 +266,26 @@ void SingleShotDIO::get_device_property()
// Read device properties from database.(Automatic code generation)
//-------------------------------------------------------------
Tango::DbData data;
data.push_back(Tango::DbDatum("BoardNum"));
data.push_back(Tango::DbDatum("BoardType"));
data.push_back(Tango::DbDatum("PortAdirection"));
data.push_back(Tango::DbDatum("PortBdirection"));
data.push_back(Tango::DbDatum("PortCdirection"));
data.push_back(Tango::DbDatum("PortDdirection"));
data.push_back(Tango::DbDatum("PortEdirection"));
data.push_back(Tango::DbDatum("PortFdirection"));
// Call database and extract values
//--------------------------------------------
get_db_device()->get_property(data);
if (data[0].is_empty()==false) data[0] >> boardNum;
if (data[1].is_empty()==false) data[1] >> boardType;
if (data[2].is_empty()==false) data[2] >> portAdirection;
if (data[3].is_empty()==false) data[3] >> portBdirection;
if (data[4].is_empty()==false) data[4] >> portCdirection;
if (data[5].is_empty()==false) data[5] >> portDdirection;
if (data[6].is_empty()==false) data[6] >> portEdirection;
if (data[7].is_empty()==false) data[7] >> portFdirection;
// End of Automatic code generation
......@@ -946,7 +964,7 @@ void SingleShotDIO::read_attr(Tango::Attribute &attr)
* description: method to execute "ReadLine"
* Read the current value of the specified line of a port.
*
* @param argin The line to read (from Px0 to Px7)
* @param argin The line to read ,from Px0 to Px7)
* @return The state of the line
*
*/
......@@ -1083,7 +1101,7 @@ Tango::DevBoolean SingleShotDIO::read_line(Tango::DevString argin)
* description: method to execute "SetLine"
* Set the specified line (put it in high state).
*
* @param argin The line to set (Px0 to Px7)
* @param argin The line to set ,Px0 to Px7)
*
*/
//+------------------------------------------------------------------
......@@ -1211,7 +1229,7 @@ void SingleShotDIO::set_line(Tango::DevString argin)
* description: method to execute "ResetLine"
* Reset the specified line (put it in low state).
*
* @param argin The line to reset (from Px0 to Px7)
* @param argin The line to reset ,from Px0 to Px7)
*
*/
//+------------------------------------------------------------------
......@@ -1341,7 +1359,7 @@ void SingleShotDIO::reset_line(Tango::DevString argin)
* description: method to execute "ReadPort"
* Read the current state of the specified port.
*
* @param argin The port to read (PA, PB, PC or PD for DIO_7432 and PA, PB.. or PF for DIO_7248)
* @param argin The port to read ,PA, PB, PC or PD for DIO_7432 and PA, PB.. or PF for DIO_7248)
* @return The current state of the port ,8-bit value)
*
*/
......
......@@ -8,9 +8,12 @@
//
// $Author: abeilleg $
//
// $Revision: 1.4 $
// $Revision: 1.5 $
//
// $Log: not supported by cvs2svn $
// Revision 1.4 2004/09/22 08:34:52 abeilleg
// respect to Soleil nomenclature added.
//
// Revision 1.3 2004/08/24 13:08:39 abeilleg
// update doc.
//
......@@ -45,7 +48,7 @@
/**
* @author $Author: abeilleg $
* @version $Revision: 1.4 $ $
* @version $Revision: 1.5 $ $
*/
// Add your own constants definitions here.
......@@ -213,26 +216,26 @@ public :
virtual void write_attr_hardware(vector<long> &attr_list);
/**
* Read the current value of the specified line of a port.
* @param argin The line to read (from Px0 to Px7)
* @param argin The line to read ,from Px0 to Px7)
* @return The state of the line
* @exception DevFailed
*/
Tango::DevBoolean read_line(Tango::DevString);
/**
* Set the specified line (put it in high state).
* @param argin The line to set (Px0 to Px7)
* @param argin The line to set ,Px0 to Px7)
* @exception DevFailed
*/
void set_line(Tango::DevString);
/**
* Reset the specified line (put it in low state).
* @param argin The line to reset (from Px0 to Px7)
* @param argin The line to reset ,from Px0 to Px7)
* @exception DevFailed
*/
void reset_line(Tango::DevString);
/**
* Read the current state of the specified port.
* @param argin The port to read (PA, PB, PC or PD for DIO_7432 and PA, PB.. or PF for DIO_7248)
* @param argin The port to read ,PA, PB, PC or PD for DIO_7432 and PA, PB.. or PF for DIO_7248)
* @return The current state of the port ,8-bit value)
* @exception DevFailed
*/
......
static const char *RcsId = "$Header: /users/chaize/newsvn/cvsroot/InputOutput/ADLINK/SingleShotDIO/src/SingleShotDIOClass.cpp,v 1.3 2004-09-22 08:34:52 abeilleg Exp $";
static const char *RcsId = "$Header: /users/chaize/newsvn/cvsroot/InputOutput/ADLINK/SingleShotDIO/src/SingleShotDIOClass.cpp,v 1.4 2004-09-30 13:23:58 abeilleg Exp $";
static const char *TagName = "$Name: not supported by cvs2svn $";
static const char *FileName= "$Source: /users/chaize/newsvn/cvsroot/InputOutput/ADLINK/SingleShotDIO/src/SingleShotDIOClass.cpp,v $";
static const char *HttpServer= "http://controle/DeviceServer/doc/";
static const char *RCSfile = "$RCSfile: SingleShotDIOClass.cpp,v $";
//+=============================================================================
//
// file : SingleShotDIOClass.cpp
......@@ -12,20 +20,13 @@ static const char *RcsId = "$Header: /users/chaize/newsvn/cvsroot/InputOutput/AD
//
// $Author: abeilleg $
//
// $Revision: 1.3 $
// $Revision: 1.4 $
//
// $Log: not supported by cvs2svn $
// Revision 1.2 2004/08/24 13:10:21 abeilleg
// update doc.
//
// Revision 1.1.1.1 2004/07/02 15:24:52 syldup
// initial import
//
//
// copyleft : European Synchrotron Radiation Facility
// BP 220, Grenoble 38043
// FRANCE
//
// copyleft : Synchrotron SOLEIL
// L'Orme des Merisiers
// Saint-Aubin - BP 48/
//-=============================================================================
//
// This file is generated by POGO
......@@ -34,12 +35,11 @@ static const char *RcsId = "$Header: /users/chaize/newsvn/cvsroot/InputOutput/AD
// (c) - Software Engineering Group - ESRF
//=============================================================================
#include <SingleShotDIO.h>
#include <SingleShotDIOClass.h>
#include <tango.h>
#include <SingleShotDIO.h>
#include <SingleShotDIOClass.h>
namespace SingleShotDIO
......@@ -122,7 +122,7 @@ bool ReadLineCmd::is_allowed(Tango::DeviceImpl *device, const CORBA::Any &in_any
CORBA::Any *ReadLineCmd::execute(Tango::DeviceImpl *device,const CORBA::Any &in_any)
{
cout2 << "DevTemplateCmd::execute(): arrived" << endl;
cout2 << "ReadLineCmd::execute(): arrived" << endl;
Tango::DevString argin;
extract(in_any, argin);
......@@ -206,7 +206,7 @@ bool SetLineCmd::is_allowed(Tango::DeviceImpl *device, const CORBA::Any &in_any)
CORBA::Any *SetLineCmd::execute(Tango::DeviceImpl *device,const CORBA::Any &in_any)
{
cout2 << "DevTemplateCmd::execute(): arrived" << endl;
cout2 << "SetLineCmd::execute(): arrived" << endl;
Tango::DevString argin;
extract(in_any, argin);
......@@ -291,7 +291,7 @@ bool ResetLineCmd::is_allowed(Tango::DeviceImpl *device, const CORBA::Any &in_an
CORBA::Any *ResetLineCmd::execute(Tango::DeviceImpl *device,const CORBA::Any &in_any)
{
cout2 << "DevTemplateCmd::execute(): arrived" << endl;
cout2 << "ResetLineCmd::execute(): arrived" << endl;
Tango::DevString argin;
extract(in_any, argin);
......@@ -376,7 +376,7 @@ bool ReadPortCmd::is_allowed(Tango::DeviceImpl *device, const CORBA::Any &in_any
CORBA::Any *ReadPortCmd::execute(Tango::DeviceImpl *device,const CORBA::Any &in_any)
{
cout2 << "DevTemplateCmd::execute(): arrived" << endl;
cout2 << "ReadPortCmd::execute(): arrived" << endl;
Tango::DevString argin;
extract(in_any, argin);
......@@ -460,7 +460,7 @@ bool WritePortCmd::is_allowed(Tango::DeviceImpl *device, const CORBA::Any &in_an
CORBA::Any *WritePortCmd::execute(Tango::DeviceImpl *device,const CORBA::Any &in_any)
{
cout2 << "DevTemplateCmd::execute(): arrived" << endl;
cout2 << "WritePortCmd::execute(): arrived" << endl;
const Tango::DevVarLongStringArray *argin;
extract(in_any, argin);
......@@ -556,22 +556,22 @@ void SingleShotDIOClass::command_factory()
{
command_list.push_back(new ReadLineCmd("ReadLine",
Tango::DEV_STRING, Tango::DEV_BOOLEAN,
"The line to read (from Px0 to Px7)",
"The line to read ,from Px0 to Px7)",
"The state of the line",
Tango::OPERATOR));
command_list.push_back(new SetLineCmd("SetLine",
Tango::DEV_STRING, Tango::DEV_VOID,
"The line to set (Px0 to Px7)",
"The line to set ,Px0 to Px7)",
"",
Tango::OPERATOR));
command_list.push_back(new ResetLineCmd("ResetLine",
Tango::DEV_STRING, Tango::DEV_VOID,
"The line to reset (from Px0 to Px7)",
"The line to reset ,from Px0 to Px7)",
"",
Tango::OPERATOR));
command_list.push_back(new ReadPortCmd("ReadPort",
Tango::DEV_STRING, Tango::DEV_SHORT,
"The port to read (PA, PB, PC or PD for DIO_7432 and PA, PB.. or PF for DIO_7248)",
"The port to read ,PA, PB, PC or PD for DIO_7432 and PA, PB.. or PF for DIO_7248)",
"The current state of the port ,8-bit value)",
Tango::OPERATOR));
command_list.push_back(new WritePortCmd("WritePort",
......@@ -727,10 +727,55 @@ void SingleShotDIOClass::write_class_property()
digital input/ouput modes.");
description << str_desc;
// Use the doc_url field to store all information
// on the server version and CVS
string::size_type pos, len;
// 1) Manage module name
// get rid of the $RCSfile: prefix and of Class.cpp suffix
string classname = RCSfile;
pos = classname.find("$RCSfile: ");
len = classname.length();
if (pos != string::npos)
classname= classname.substr(pos+10, len- pos-10);
pos = classname.find ("Class.cpp",0);
if (pos != string::npos)
classname=classname.substr(0,pos);
// 2) Manage version number with SOLEIL CVS rules
// tag name is in the form : release_1_0 ==> transform it to 1.0
//
string version ;
string str_TagName=string(TagName);
pos = str_TagName.find_first_of("_",0);
if (pos != string::npos)
version= str_TagName.substr(pos+1, 3);
pos = version.find_first_of("_",0);
if (pos != string::npos)
version[pos] = '.';
// Store all info in the str_url property
string str_url= "Documentation URL = " + string(HttpServer) + classname +"-" + version + "/index.html" + "\n";
str_url= str_url + " Version CVS Tag = " + string(TagName)+ "\n";
str_url= str_url + " CVS location = " + string(FileName)+ "\n";
Tango::DbDatum doc_url("doc_url");
doc_url << str_url;
// Push everything in DataBase
Tango::DbData data;
data.push_back(title);
data.push_back(description);
data.push_back(doc_url);
// Call database and and values
//--------------------------------------------
get_db_class()->put_property(data);
......
......@@ -12,9 +12,12 @@
//
// $Author: abeilleg $
//
// $Revision: 1.3 $
// $Revision: 1.4 $
//
// $Log: not supported by cvs2svn $
// Revision 1.3 2004/09/22 08:34:52 abeilleg
// respect to Soleil nomenclature added.
//
// Revision 1.2 2004/08/24 13:13:51 abeilleg
// update doc.
//
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment