Skip to content
Snippets Groups Projects
Commit 5133b2e9 authored by Xavier ELATTAOUI's avatar Xavier ELATTAOUI
Browse files

Release preparation

parent 6cffd07c
No related branches found
No related tags found
No related merge requests found
Showing
with 1879 additions and 1786 deletions
......@@ -56,6 +56,20 @@ Revision: - Author:
<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>selectedAttributeName</b>: <Font Size=-1>The selected fixed position. <br> If none, value is UNKNOWN</Font></Td>
<Td><Center><Font Size=-1>DEV_STRING</Font></Center></Td><Td><Center><Font Size=-1>READ</Font></Center></Td><Td><Center><Font Size=-1>No</Font></Center></Td></Tr>
</Table>
</Center>
<Br><Br><Br><Br><Br>
<Table Border=2 Cellpadding=3 CELLSPACING=0 WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<Td COLSPAN=4> <Font Size=+2><Center><b>Spectrum Attributes</b></td></Font></Center>
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<Td><Center><b>Attribute name</b></td></Center>
......
......@@ -199,6 +199,20 @@ There is no Class properties.<Br><Br>
<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>selectedAttributeName</b>: <Font Size=-1>The selected fixed position. <br> If none, value is UNKNOWN</Font></Td>
<Td><Center><Font Size=-1>DEV_STRING</Font></Center></Td><Td><Center><Font Size=-1>READ</Font></Center></Td><Td><Center><Font Size=-1>No</Font></Center></Td></Tr>
</Table>
</Center>
<Br><Br><Br><Br><Br>
<Table Border=2 Cellpadding=3 CELLSPACING=0 WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<Td COLSPAN=4> <Font Size=+2><Center><b>Spectrum Attributes</b></td></Font></Center>
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<Td><Center><b>Attribute name</b></td></Center>
......
......@@ -9,7 +9,7 @@
<groupId>fr.soleil.device</groupId>
<artifactId>HexapodFMBO-${aol}-${mode}</artifactId>
<version>1.2.13-SNAPSHOT</version>
<version>1.2.13</version>
<packaging>nar</packaging>
......
......@@ -75,6 +75,8 @@ static const double __NAN__ = ::sqrt(-1.);
#endif
static const long kSpecLen = 256;
static const long kATTR_NAME_LGTH_MAX = 32;
static const std::string UNKNOWN_POSITION = "UNKNOWN";
namespace FixedPositions_ns
{
......@@ -125,6 +127,13 @@ void FixedPositions::delete_device()
attr_labelList_read = 0;
}
if (*attr_selectedAttributeName_read) {
delete *attr_selectedAttributeName_read;
}
if (attr_selectedAttributeName_read) {
delete[] attr_selectedAttributeName_read;
attr_selectedAttributeName_read = 0;
}
//- remove dynamic attributes
if (m_dam)
......@@ -175,6 +184,10 @@ void FixedPositions::init_device()
::memset(attr_labelList_read[s], 0, kSpecLen * sizeof(char));
}
attr_selectedAttributeName_read = new char*;
*attr_selectedAttributeName_read = new char[256];
::strcpy(*attr_selectedAttributeName_read, "UNKNOWN");
get_device_property();
if (properties_missing)
return;
......@@ -451,6 +464,19 @@ void FixedPositions::read_attr_hardware(vector<long> &attr_list)
DEBUG_STREAM << "FixedPositions::read_attr_hardware(vector<long> &attr_list) entering... "<< endl;
// Add your own code here
}
//+----------------------------------------------------------------------------
//
// method : FixedPositions::read_selectedAttributeName
//
// description : Extract real attribute values for selectedAttributeName acquisition result.
//
//-----------------------------------------------------------------------------
void FixedPositions::read_selectedAttributeName(Tango::Attribute &attr)
{
DEBUG_STREAM << "FixedPositions::read_selectedAttributeName(Tango::Attribute &attr) entering... "<< endl;
attr.set_value(attr_selectedAttributeName_read);
}
//+----------------------------------------------------------------------------
//
......@@ -854,6 +880,19 @@ void FixedPositions::read_callback (yat4tango::DynamicAttributeReadCallbackData&
fixed_pos_data = cbd.dya->get_user_data <PositionsData> ();
if (fixed_pos_data == 0)
throw bad_alloc ();
//- delete previous position name
if (*attr_selectedAttributeName_read)
{
std::string default_pos(UNKNOWN_POSITION);
delete[] *attr_selectedAttributeName_read;
size_t len = default_pos.size() + 1;
*attr_selectedAttributeName_read = new char[len];
if (*attr_selectedAttributeName_read)
{
::memset(*attr_selectedAttributeName_read, 0, len * sizeof(char));
::strcpy(*attr_selectedAttributeName_read, default_pos.c_str());
}
}
}
catch (...)
{
......@@ -863,6 +902,22 @@ void FixedPositions::read_callback (yat4tango::DynamicAttributeReadCallbackData&
}
fixed_pos_data->is_on_fixed_pos = compare (fixed_pos_data);
cbd.tga->set_value (&fixed_pos_data->is_on_fixed_pos);
//- update selectedAttributeName attribute
if (fixed_pos_data->is_on_fixed_pos)
{
if (*attr_selectedAttributeName_read)
{
delete[] *attr_selectedAttributeName_read;
std::string pos_name = fixed_pos_data->dyn_attr_name;
size_t len = pos_name.size() + 1;
*attr_selectedAttributeName_read = new char[len];
if (*attr_selectedAttributeName_read) {
::memset(*attr_selectedAttributeName_read, 0, len * sizeof(char));
::strcpy(*attr_selectedAttributeName_read, pos_name.c_str());
}
}
}
}
//------------------------------------------------------------------
......@@ -969,4 +1024,5 @@ bool FixedPositions::compare_line (std::vector <double> & current, std::vector <
} // namespace
......@@ -77,6 +77,7 @@ public :
* Attribute member data.
*/
//@{
Tango::DevString *attr_selectedAttributeName_read;
Tango::DevString *attr_labelList_read;
//@}
......@@ -210,10 +211,18 @@ public :
* Hardware acquisition for attributes.
*/
virtual void read_attr_hardware(vector<long> &attr_list);
/**
* Extract real attribute values for selectedAttributeName acquisition result.
*/
virtual void read_selectedAttributeName(Tango::Attribute &attr);
/**
* Extract real attribute values for labelList acquisition result.
*/
virtual void read_labelList(Tango::Attribute &attr);
/**
* Read/Write allowed for selectedAttributeName attribute.
*/
virtual bool is_selectedAttributeName_allowed(Tango::AttReqType type);
/**
* Read/Write allowed for labelList attribute.
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment