コード例 #1
0
 public SCDSelfDescribing(BasicComponent comp) {
   super(
       comp.getClassName(),
       comp.getParamValByName(BasicComponent.EMBSW_DTS_GROUP),
       comp.getParamValByName(BasicComponent.EMBSW_DTS_VENDOR),
       comp.getParamValByName(BasicComponent.EMBSW_DTS_NAME));
   if (device == null) {
     device = comp.getClassName();
   }
 }
コード例 #2
0
 /*
  * Scans a BasicComponent for parameters given through the _hw.tcl file that
  * describe the usage of that component in the device-tree.
  * Those parameters are named embeddedsw.dts.* and some are mandatory and
  * some are optional. When there are enough parameters in the component,
  * those parameters will be used instead of the ones defined in the
  * sopc_component_*.xml files.
  * In the long run this will remove the need for those xml-files.
  */
 public static boolean isSelfDescribing(BasicComponent comp) {
   String pVal = comp.getParamValByName(BasicComponent.EMBSW_DTS_VENDOR);
   if ((pVal == null) || (pVal.length() == 0)) {
     // Vendor info is mandatory
     return false;
   }
   pVal = comp.getParamValByName(BasicComponent.EMBSW_DTS_GROUP);
   if ((pVal == null) || (pVal.length() == 0)) {
     // group/type info is mandatory
     return false;
   }
   return true;
 }