update to prog

This commit is contained in:
Rémi Heredero 2023-08-23 13:55:46 +02:00
parent 21f9cb7f62
commit 91edfee052
2 changed files with 45 additions and 177 deletions

BIN
UML/can.pdf Normal file

Binary file not shown.

View File

@ -1,154 +1,54 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<diagram program="umlet" version="15.1">
<diagram program="umlet" version="15.0.0">
<zoom_level>15</zoom_level>
<element>
<id>UMLSpecialState</id>
<coordinates>
<x>450</x>
<y>150</y>
<w>30</w>
<h>30</h>
</coordinates>
<panel_attributes>type=initial</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLState</id>
<coordinates>
<x>390</x>
<y>240</y>
<w>150</w>
<h>60</h>
</coordinates>
<panel_attributes>STCA_WAIT</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>450</x>
<y>165</y>
<w>120</w>
<h>105</h>
</coordinates>
<panel_attributes>lt=-&gt;
evCAinit
</panel_attributes>
<additional_attributes>10.0;10.0;10.0;50.0</additional_attributes>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>450</x>
<y>285</y>
<w>165</w>
<h>105</h>
</coordinates>
<panel_attributes>lt=-&gt;
evCAnewMsg</panel_attributes>
<additional_attributes>10.0;10.0;10.0;50.0</additional_attributes>
</element>
<element>
<id>UMLState</id>
<coordinates>
<x>315</x>
<y>360</y>
<w>285</w>
<h>105</h>
</coordinates>
<panel_attributes>STCA_READ
-
-.
/entry: processCan</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>480</x>
<y>255</y>
<w>225</w>
<h>360</h>
</coordinates>
<panel_attributes>lt=-&gt;
m1=[queue empty]
</panel_attributes>
<additional_attributes>10.0;210.0;130.0;210.0;130.0;10.0;40.0;10.0</additional_attributes>
</element>
<element>
<id>UMLSpecialState</id>
<coordinates>
<x>435</x>
<y>540</y>
<w>60</w>
<h>60</h>
</coordinates>
<panel_attributes>type=decision</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>450</x>
<y>450</y>
<w>135</w>
<h>120</h>
</coordinates>
<panel_attributes>lt=-&gt;
evCAdone</panel_attributes>
<additional_attributes>10.0;10.0;10.0;60.0</additional_attributes>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>210</x>
<y>375</y>
<w>255</w>
<h>240</h>
</coordinates>
<panel_attributes>lt=-&gt;
m1=[else]
</panel_attributes>
<additional_attributes>150.0;130.0;10.0;130.0;10.0;10.0;70.0;10.0</additional_attributes>
</element>
<element>
<id>UMLNote</id>
<coordinates>
<x>90</x>
<y>630</y>
<w>615</w>
<h>270</h>
<x>645</x>
<y>255</y>
<w>675</w>
<h>525</h>
</coordinates>
<panel_attributes>_*How to use*_
<panel_attributes>_*How to use CAN interface*_
*In Factory_Init: *
CAN_init();
*In Factory_build: *
ECAN_SetRXBnInterruptHandler(CANINTERFACE_newMsg);
CANINTERFACE_onProcessCan(&amp;processCan);
ECAN_SetRXBnInterruptHandler(CAN_newMsg);
CAN_onReceiveCan(&amp;receiveCan);
CAN_setSender(idSender);
*Somewhere:*
void processCan(uint32_t canId, uint32_t canData) {
*In Factory_start:*
CAN_startBehaviour();
*Somewhere for process input can message:*
void receiveCan(uint8_t idSender, uint8_t idMsg, uint32_t canData) {
.....
}</panel_attributes>
}
*For send can message: *
CAN_sendCanMsg(uint8_t idRecipient, uint8_t idMsg, uint32_t data);</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>900</x>
<y>225</y>
<x>360</x>
<y>330</y>
<w>90</w>
<h>105</h>
<h>135</h>
</coordinates>
<panel_attributes>lt=-&gt;
evInit
</panel_attributes>
<additional_attributes>10.0;10.0;10.0;50.0</additional_attributes>
<additional_attributes>10.0;10.0;10.0;70.0</additional_attributes>
</element>
<element>
<id>UMLSpecialState</id>
<coordinates>
<x>900</x>
<y>210</y>
<x>360</x>
<y>315</y>
<w>30</w>
<h>30</h>
</coordinates>
@ -158,71 +58,39 @@ evInit
<element>
<id>UMLState</id>
<coordinates>
<x>840</x>
<y>300</y>
<w>150</w>
<h>60</h>
</coordinates>
<panel_attributes>STCS_WAIT</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLState</id>
<coordinates>
<x>810</x>
<y>420</y>
<w>210</w>
<x>240</x>
<y>435</y>
<w>270</w>
<h>90</h>
</coordinates>
<panel_attributes>STCS_SEND
--
-.
/entry sendCan</panel_attributes>
<panel_attributes>STCA_PROCESS</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>900</x>
<y>345</y>
<w>135</w>
<h>105</h>
<x>450</x>
<y>465</y>
<w>180</w>
<h>180</h>
</coordinates>
<panel_attributes>lt=-&gt;
evCSsend
</panel_attributes>
<additional_attributes>10.0;10.0;10.0;50.0</additional_attributes>
m1=evCAsend
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>900</x>
<y>315</y>
<w>270</w>
<h>270</h>
<x>135</x>
<y>465</y>
<w>300</w>
<h>180</h>
</coordinates>
<panel_attributes>lt=-&gt;
evCSdone
m1= evCAnewMsg
m1= \n/receiveCan()
</panel_attributes>
<additional_attributes>10.0;130.0;10.0;160.0;100.0;160.0;100.0;10.0;60.0;10.0</additional_attributes>
</element>
<element>
<id>UMLNote</id>
<coordinates>
<x>765</x>
<y>630</y>
<w>705</w>
<h>270</h>
</coordinates>
<panel_attributes>_*How to use*_
*Like a static class:*
sendCanMsg(uint32_t id, uint32_t data);
*Or like an Object: *
CANSENDER_seSender(CANSENDER* me, uint8_t s);
CANSENDER_setRecipient(CANSENDER* me, uint8_t r);
CANSENDER_sendCanMsg(CANSENDER* me, uint8_t id, uint32_t data);</panel_attributes>
<additional_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>