This repository has been archived on 2024-01-25. You can view files and clone it, but cannot push or open issues or pull requests.
SummerSchool2-Controller/UML/can.uxf

108 lines
2.6 KiB
XML

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<diagram program="umlet" version="15.0.0">
<zoom_level>15</zoom_level>
<element>
<id>UMLNote</id>
<coordinates>
<x>645</x>
<y>75</y>
<w>750</w>
<h>765</h>
</coordinates>
<panel_attributes>_*How to use CAN interface*_
*In Factory_Init: *
CAN_init();
*In Factory_build: *
ECAN_SetRXBnInterruptHandler(CAN_newMsg);
CAN_onReceiveCan(&amp;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);</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>375</x>
<y>255</y>
<w>90</w>
<h>135</h>
</coordinates>
<panel_attributes>lt=-&gt;
evInit
</panel_attributes>
<additional_attributes>10.0;10.0;10.0;70.0</additional_attributes>
</element>
<element>
<id>UMLSpecialState</id>
<coordinates>
<x>375</x>
<y>240</y>
<w>30</w>
<h>30</h>
</coordinates>
<panel_attributes>type=initial</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLState</id>
<coordinates>
<x>255</x>
<y>360</y>
<w>270</w>
<h>90</h>
</coordinates>
<panel_attributes>PROCESS</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>465</x>
<y>390</y>
<w>180</w>
<h>180</h>
</coordinates>
<panel_attributes>lt=-&gt;
m1=evSend
m1=\n/sendCan()</panel_attributes>
<additional_attributes>10.0;40.0;10.0;100.0;100.0;100.0;100.0;10.0;40.0;10.0</additional_attributes>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>150</x>
<y>390</y>
<w>300</w>
<h>180</h>
</coordinates>
<panel_attributes>lt=-&gt;
m1= evNewMsg
m1= \n/receiveCan()
</panel_attributes>
<additional_attributes>100.0;40.0;100.0;100.0;10.0;100.0;10.0;10.0;70.0;10.0</additional_attributes>
</element>
</diagram>