etherlab/etherlab.py
changeset 2384 d7d9f0e60bc9
parent 2381 1c40e3976cc2
child 2387 5cf1d70b5395
equal deleted inserted replaced
2383:6cc3460be285 2384:d7d9f0e60bc9
   155 
   155 
   156 
   156 
   157 class ModulesLibrary:
   157 class ModulesLibrary:
   158 
   158 
   159     MODULES_EXTRA_PARAMS = [
   159     MODULES_EXTRA_PARAMS = [
   160         ("pdo_alignment", {
   160         (
   161             "column_label": _("PDO alignment"),
   161             "pdo_alignment",
   162             "column_size": 150,
   162             {
   163             "default": 8,
   163                 "column_label": _("PDO alignment"),
   164             "description": _(
   164                 "column_size": 150,
   165 "Minimal size in bits between 2 pdo entries")}),
   165                 "default": 8,
   166         ("max_pdo_size", {
   166                 "description": _("Minimal size in bits between 2 pdo entries")
   167             "column_label": _("Max entries by PDO"),
   167             }
   168             "column_size": 150,
   168         ),
   169             "default": 255,
   169         (
   170             "description": _(
   170             "max_pdo_size",
   171 """Maximal number of entries mapped in a PDO
   171             {
   172 including empty entries used for PDO alignment""")}),
   172                 "column_label": _("Max entries by PDO"),
   173         ("add_pdo", {
   173                 "column_size": 150,
   174             "column_label": _("Creating new PDO"),
   174                 "default": 255,
   175             "column_size": 150,
   175                 "description": _("""Maximal number of entries mapped in a PDO
   176             "default": 0,
   176 including empty entries used for PDO alignment""")
   177             "description": _(
   177             }
   178 """Adding a PDO not defined in default configuration
   178         ),
       
   179         (
       
   180             "add_pdo",
       
   181             {
       
   182                 "column_label": _("Creating new PDO"),
       
   183                 "column_size": 150,
       
   184                 "default": 0,
       
   185                 "description": _("""Adding a PDO not defined in default configuration
   179 for mapping needed location variables
   186 for mapping needed location variables
   180 (1 if possible)""")})
   187 (1 if possible)""")
       
   188             }
       
   189         )
   181     ]
   190     ]
   182 
   191 
   183     def __init__(self, path, parent_library=None):
   192     def __init__(self, path, parent_library=None):
   184         self.Path = path
   193         self.Path = path
   185         if not os.path.exists(self.Path):
   194         if not os.path.exists(self.Path):