15 UMLNote 645 75 750 765 _*How to use CAN interface*_ *In Factory_Init: * CAN_init(); *In Factory_build: * ECAN_SetRXBnInterruptHandler(CAN_newMsg); CAN_onReceiveCan(&receiveCan); CAN_setSender(idSender); *In Factory_start:* CAN_startBehaviour(); *Somewhere for process input can message:* void receiveCan(uint8_t idSender, uint8_t idMsg, bool rtr, uint32_t canData) { ..... } *For send can message: * CAN_Send(uint8_t idRecipient, uint8_t idMsg, uint32_t data); CAN_send_4_bytes( uint8_t idRecipient, uint8_t idMsg, uint8_t byte0, uint8_t byte1, uint8_t byte2, uint8_t byte3); CAN_send_2_bytes(uint8_t idRecipient, uint8_t idMsg, uint16_t data); CAN_send_1_byte(uint8_t idRecipient, uint8_t idMsg, uint8_t data); CAN_send_0_byte(uint8_t idRecipient, uint8_t idMsg); CAN_send_rtr(uint8_t idRecipient, uint8_t idMsg); Relation 375 255 90 135 lt=-> evInit 10.0;10.0;10.0;70.0 UMLSpecialState 375 240 30 30 type=initial UMLState 255 360 270 90 PROCESS Relation 465 390 180 180 lt=-> m1=evSend m1=\n/sendCan() 10.0;40.0;10.0;100.0;100.0;100.0;100.0;10.0;40.0;10.0 Relation 150 390 300 180 lt=-> m1= evNewMsg m1= \n/receiveCan() 100.0;40.0;100.0;100.0;10.0;100.0;10.0;10.0;70.0;10.0