canfestival/config_utils.py
changeset 1768 691083b5682a
parent 1767 c74815729afd
child 1782 5b6ad7a7fd9d
equal deleted inserted replaced
1767:c74815729afd 1768:691083b5682a
   318         @param nodeid: id of the slave (int)
   318         @param nodeid: id of the slave (int)
   319         @param pdotype: type of PDO to generated (RPDO or TPDO)
   319         @param pdotype: type of PDO to generated (RPDO or TPDO)
   320         @param pdomapping: list od variables to map with PDO
   320         @param pdomapping: list od variables to map with PDO
   321         """
   321         """
   322         # Add an entry to MasterMapping
   322         # Add an entry to MasterMapping
   323         self.MasterMapping[pdocobid] = {"type": InvertPDOType[pdotype],
   323         self.MasterMapping[pdocobid] = {
   324             "mapping": [None] + [(loc_infos["type"], name) for name, loc_infos in pdomapping]}
   324             "type":    InvertPDOType[pdotype],
       
   325             "mapping": [None] + [(loc_infos["type"], name) for name, loc_infos in pdomapping]
       
   326         }
   325 
   327 
   326         # Return the data to add to DCF
   328         # Return the data to add to DCF
   327         if sync_TPDOs:
   329         if sync_TPDOs:
   328             return GeneratePDOMappingDCF(pdoindex, pdocobid, 0x01, pdomapping)
   330             return GeneratePDOMappingDCF(pdoindex, pdocobid, 0x01, pdomapping)
   329         else:
   331         else: