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
Plaintext
Raw Normal View History

2023-08-22 13:53:38 +00:00
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2023-08-23 11:55:46 +00:00
<diagram program="umlet" version="15.0.0">
2023-08-22 13:53:38 +00:00
<zoom_level>15</zoom_level>
<element>
<id>UMLNote</id>
<coordinates>
2023-08-23 11:55:46 +00:00
<x>645</x>
2023-09-04 08:07:29 +00:00
<y>75</y>
<w>750</w>
<h>765</h>
2023-08-22 13:53:38 +00:00
</coordinates>
2023-08-23 11:55:46 +00:00
<panel_attributes>_*How to use CAN interface*_
*In Factory_Init: *
CAN_init();
2023-08-22 13:53:38 +00:00
*In Factory_build: *
2023-08-23 11:55:46 +00:00
ECAN_SetRXBnInterruptHandler(CAN_newMsg);
CAN_onReceiveCan(&amp;receiveCan);
CAN_setSender(idSender);
2023-08-22 13:53:38 +00:00
2023-08-23 11:55:46 +00:00
*In Factory_start:*
CAN_startBehaviour();
*Somewhere for process input can message:*
2023-09-04 08:07:29 +00:00
void receiveCan(uint8_t idSender, uint8_t idMsg, bool rtr, uint32_t canData) {
2023-08-22 13:53:38 +00:00
.....
2023-08-23 11:55:46 +00:00
}
*For send can message: *
2023-09-04 08:07:29 +00:00
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>
2023-08-22 13:53:38 +00:00
<additional_attributes/>
</element>
2023-08-22 15:51:19 +00:00
<element>
<id>Relation</id>
<coordinates>
2023-09-04 08:07:29 +00:00
<x>375</x>
<y>255</y>
2023-08-22 15:51:19 +00:00
<w>90</w>
2023-08-23 11:55:46 +00:00
<h>135</h>
2023-08-22 15:51:19 +00:00
</coordinates>
<panel_attributes>lt=-&gt;
evInit
</panel_attributes>
2023-08-23 11:55:46 +00:00
<additional_attributes>10.0;10.0;10.0;70.0</additional_attributes>
2023-08-22 15:51:19 +00:00
</element>
<element>
<id>UMLSpecialState</id>
<coordinates>
2023-09-04 08:07:29 +00:00
<x>375</x>
<y>240</y>
2023-08-22 15:51:19 +00:00
<w>30</w>
<h>30</h>
</coordinates>
<panel_attributes>type=initial</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLState</id>
<coordinates>
2023-09-04 08:07:29 +00:00
<x>255</x>
<y>360</y>
2023-08-23 11:55:46 +00:00
<w>270</w>
2023-08-22 15:51:19 +00:00
<h>90</h>
</coordinates>
2023-09-04 08:07:29 +00:00
<panel_attributes>PROCESS</panel_attributes>
2023-08-22 15:51:19 +00:00
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
2023-09-04 08:07:29 +00:00
<x>465</x>
<y>390</y>
2023-08-23 11:55:46 +00:00
<w>180</w>
<h>180</h>
2023-08-22 15:51:19 +00:00
</coordinates>
<panel_attributes>lt=-&gt;
2023-09-04 08:07:29 +00:00
m1=evSend
2023-08-23 11:55:46 +00:00
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>
2023-08-22 15:51:19 +00:00
</element>
<element>
<id>Relation</id>
<coordinates>
2023-09-04 08:07:29 +00:00
<x>150</x>
<y>390</y>
2023-08-23 11:55:46 +00:00
<w>300</w>
<h>180</h>
2023-08-22 15:51:19 +00:00
</coordinates>
<panel_attributes>lt=-&gt;
2023-09-04 08:07:29 +00:00
m1= evNewMsg
2023-08-23 11:55:46 +00:00
m1= \n/receiveCan()
2023-08-22 15:51:19 +00:00
</panel_attributes>
2023-08-23 11:55:46 +00:00
<additional_attributes>100.0;40.0;100.0;100.0;10.0;100.0;10.0;10.0;70.0;10.0</additional_attributes>
2023-08-22 15:51:19 +00:00
</element>
2023-08-22 13:53:38 +00:00
</diagram>