Commit fddefba6 authored by Yuelong Yu's avatar Yuelong Yu
Browse files

added buffer size config in tango

parent 8776691e
......@@ -322,7 +322,7 @@ void AGIPD::init_device()
m_objSys = new AGIPDImpl((*attr_PatternFile_read),(debugMode==1),(uDPMode==1)
,tCPIP,tCPPort,string("")
,uDPIP,uDPPort,uDPMACAddr
,uDPSrcIP,uDPSrcMAC);
,uDPSrcIP,uDPSrcMAC,memSizeInImageNumbers);
m_objSys->GetImageFormat(m_nSizeX,m_nSizeY,m_shDepth);
if(isMaster==0)
......@@ -386,6 +386,7 @@ void AGIPD::get_device_property()
dev_prop.push_back(Tango::DbDatum("IsMaster"));
dev_prop.push_back(Tango::DbDatum("Microcontroller"));
dev_prop.push_back(Tango::DbDatum("ModuleIDInUc"));
dev_prop.push_back(Tango::DbDatum("MemSizeInImageNumbers"));
// is there at least one property to be read ?
if (dev_prop.size()>0)
......@@ -543,6 +544,17 @@ void AGIPD::get_device_property()
// And try to extract ModuleIDInUc value from database
if (dev_prop[i].is_empty()==false) dev_prop[i] >> moduleIDInUc;
// Try to initialize MemSizeInImageNumbers from class property
cl_prop = ds_class->get_class_property(dev_prop[++i].name);
if (cl_prop.is_empty()==false) cl_prop >> memSizeInImageNumbers;
else {
// Try to initialize MemSizeInImageNumbers from default device value
def_prop = ds_class->get_default_device_property(dev_prop[i].name);
if (def_prop.is_empty()==false) def_prop >> memSizeInImageNumbers;
}
// And try to extract MemSizeInImageNumbers value from database
if (dev_prop[i].is_empty()==false) dev_prop[i] >> memSizeInImageNumbers;
}
/*----- PROTECTED REGION ID(AGIPD::get_device_property_after) ENABLED START -----*/
......
......@@ -117,6 +117,8 @@ public:
string microcontroller;
// ModuleIDInUc: the module id in micro controller.
Tango::DevUShort moduleIDInUc;
// MemSizeInImageNumbers:
Tango::DevULong memSizeInImageNumbers;
// Attribute data members
public:
......
......@@ -63,6 +63,11 @@
<type xsi:type="pogoDsl:UShortType"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
</deviceProperties>
<deviceProperties name="MemSizeInImageNumbers" description="">
<type xsi:type="pogoDsl:UIntType"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<DefaultPropValue>500000</DefaultPropValue>
</deviceProperties>
<commands name="State" description="This command gets the device state (stored in its device_state data member) and returns it to the caller." execMethod="dev_state" displayLevel="OPERATOR" polledPeriod="0">
<argin description="none">
<type xsi:type="pogoDsl:VoidType"/>
......
......@@ -499,6 +499,20 @@ void AGIPDClass::set_default_property()
}
else
add_wiz_dev_prop(prop_name, prop_desc);
prop_name = "MemSizeInImageNumbers";
prop_desc = "";
prop_def = "500000";
vect_data.clear();
vect_data.push_back("500000");
if (prop_def.length()>0)
{
Tango::DbDatum data(prop_name);
data << vect_data ;
dev_def_prop.push_back(data);
add_wiz_dev_prop(prop_name, prop_desc, prop_def);
}
else
add_wiz_dev_prop(prop_name, prop_desc);
}
//--------------------------------------------------------
......
......@@ -258,6 +258,12 @@
<td> short </td>
<td> none </td>
</tr>
<tr>
<td> MemSizeInImageNumbers </td>
<td> </td>
<td> int </td>
<td> 500000 <br> </td>
</tr>
</table>
<br><br>
<hr>
......
......@@ -96,6 +96,12 @@
<td> short </td>
<td> none </td>
</tr>
<tr>
<td> MemSizeInImageNumbers </td>
<td> </td>
<td> int </td>
<td> 500000 <br> </td>
</tr>
</table>
</body>
</html>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment