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() ...@@ -322,7 +322,7 @@ void AGIPD::init_device()
m_objSys = new AGIPDImpl((*attr_PatternFile_read),(debugMode==1),(uDPMode==1) m_objSys = new AGIPDImpl((*attr_PatternFile_read),(debugMode==1),(uDPMode==1)
,tCPIP,tCPPort,string("") ,tCPIP,tCPPort,string("")
,uDPIP,uDPPort,uDPMACAddr ,uDPIP,uDPPort,uDPMACAddr
,uDPSrcIP,uDPSrcMAC); ,uDPSrcIP,uDPSrcMAC,memSizeInImageNumbers);
m_objSys->GetImageFormat(m_nSizeX,m_nSizeY,m_shDepth); m_objSys->GetImageFormat(m_nSizeX,m_nSizeY,m_shDepth);
if(isMaster==0) if(isMaster==0)
...@@ -386,6 +386,7 @@ void AGIPD::get_device_property() ...@@ -386,6 +386,7 @@ void AGIPD::get_device_property()
dev_prop.push_back(Tango::DbDatum("IsMaster")); dev_prop.push_back(Tango::DbDatum("IsMaster"));
dev_prop.push_back(Tango::DbDatum("Microcontroller")); dev_prop.push_back(Tango::DbDatum("Microcontroller"));
dev_prop.push_back(Tango::DbDatum("ModuleIDInUc")); dev_prop.push_back(Tango::DbDatum("ModuleIDInUc"));
dev_prop.push_back(Tango::DbDatum("MemSizeInImageNumbers"));
// is there at least one property to be read ? // is there at least one property to be read ?
if (dev_prop.size()>0) if (dev_prop.size()>0)
...@@ -543,6 +544,17 @@ void AGIPD::get_device_property() ...@@ -543,6 +544,17 @@ void AGIPD::get_device_property()
// And try to extract ModuleIDInUc value from database // And try to extract ModuleIDInUc value from database
if (dev_prop[i].is_empty()==false) dev_prop[i] >> moduleIDInUc; 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 -----*/ /*----- PROTECTED REGION ID(AGIPD::get_device_property_after) ENABLED START -----*/
......
...@@ -117,6 +117,8 @@ public: ...@@ -117,6 +117,8 @@ public:
string microcontroller; string microcontroller;
// ModuleIDInUc: the module id in micro controller. // ModuleIDInUc: the module id in micro controller.
Tango::DevUShort moduleIDInUc; Tango::DevUShort moduleIDInUc;
// MemSizeInImageNumbers:
Tango::DevULong memSizeInImageNumbers;
// Attribute data members // Attribute data members
public: public:
......
...@@ -63,6 +63,11 @@ ...@@ -63,6 +63,11 @@
<type xsi:type="pogoDsl:UShortType"/> <type xsi:type="pogoDsl:UShortType"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/> <status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
</deviceProperties> </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"> <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"> <argin description="none">
<type xsi:type="pogoDsl:VoidType"/> <type xsi:type="pogoDsl:VoidType"/>
......
...@@ -499,6 +499,20 @@ void AGIPDClass::set_default_property() ...@@ -499,6 +499,20 @@ void AGIPDClass::set_default_property()
} }
else else
add_wiz_dev_prop(prop_name, prop_desc); 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 @@ ...@@ -258,6 +258,12 @@
<td> short </td> <td> short </td>
<td> none </td> <td> none </td>
</tr> </tr>
<tr>
<td> MemSizeInImageNumbers </td>
<td> </td>
<td> int </td>
<td> 500000 <br> </td>
</tr>
</table> </table>
<br><br> <br><br>
<hr> <hr>
......
...@@ -96,6 +96,12 @@ ...@@ -96,6 +96,12 @@
<td> short </td> <td> short </td>
<td> none </td> <td> none </td>
</tr> </tr>
<tr>
<td> MemSizeInImageNumbers </td>
<td> </td>
<td> int </td>
<td> 500000 <br> </td>
</tr>
</table> </table>
</body> </body>
</html> </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