objdictgen/gen_cfile.py
changeset 235 f812bf6b7237
parent 229 b24906340673
child 245 d43ebbed895f
equal deleted inserted replaced
234:5a17bcb520ef 235:f812bf6b7237
   446 	}
   446 	}
   447 	*errorCode = OD_SUCCESSFUL;
   447 	*errorCode = OD_SUCCESSFUL;
   448 	return &%(NodeName)s_objdict[i];
   448 	return &%(NodeName)s_objdict[i];
   449 }
   449 }
   450 
   450 
   451 /* To count at which received SYNC a PDO must be sent.
   451 /* 
       
   452  * To count at which received SYNC a PDO must be sent.
   452  * Even if no pdoTransmit are defined, at least one entry is computed
   453  * Even if no pdoTransmit are defined, at least one entry is computed
   453  * for compilations issues.
   454  * for compilations issues.
   454  */
   455  */
   455 UNS8 %(NodeName)s_count_sync[%(maxPDOtransmit)d] = {0,};
   456 s_PDO_status %(NodeName)s_PDO_status[%(maxPDOtransmit)d] = {"""%texts
   456 """%texts
   457 
       
   458     fileContent += ",".join(["s_PDO_staus_Initializer"]*texts["maxPDOtransmit"]) + """};
       
   459 """
       
   460 
   457     fileContent += strQuickIndex
   461     fileContent += strQuickIndex
   458     fileContent += """
   462     fileContent += """
   459 UNS16 %(NodeName)s_ObjdictSize = sizeof(%(NodeName)s_objdict)/sizeof(%(NodeName)s_objdict[0]); 
   463 UNS16 %(NodeName)s_ObjdictSize = sizeof(%(NodeName)s_objdict)/sizeof(%(NodeName)s_objdict[0]); 
   460 
   464 
   461 CO_Data %(NodeName)s_Data = CANOPEN_NODE_DATA_INITIALIZER(%(NodeName)s);
   465 CO_Data %(NodeName)s_Data = CANOPEN_NODE_DATA_INITIALIZER(%(NodeName)s);