]> rtime.felk.cvut.cz Git - can-eth-gw.git/commitdiff
doc: solution chapter added
authorRadek Matejka <radek.matejka@gmail.com>
Thu, 12 Jul 2012 09:04:57 +0000 (11:04 +0200)
committerRadek Matejka <radek.matejka@gmail.com>
Thu, 12 Jul 2012 09:04:57 +0000 (11:04 +0200)
doc/can-eth-gw.tex
doc/img/eth_msg.pdf [new file with mode: 0644]
doc/img/eth_msg.svg [new file with mode: 0644]

index 6993dbdcdfc7191756af5c94212f01e66816fd2f..330217d767d7da01362183703f2e2172ddf76faf 100644 (file)
@@ -31,6 +31,7 @@
 \usepackage{appendix}
 \usepackage{listings}
 \usepackage{color}
+\usepackage{caption}
 
 %\usepackage{multicol}
 \hypersetup{
@@ -99,6 +100,28 @@ subsystem with the following features:
 \item For kernel-based gateway, implement a user-space configuration
   tool, similar to \texttt{cangw} tool from \texttt{can-utils}.
 \end{enumerate}
+
+\chapter{Solution design}
+\label{cha:design}
+The canethgw is comprised of CAN and Ethernet interfaces. Both of these
+interfaces allow to read and write to realize the gateway functionality.
+But there is a difference in these interfaces from kernel point of view.
+\section{CAN part}
+The CAN part of the gateway is build on can\_rx\_register(...) function, 
+therefore it is receiving events from kernel whenever CAN frame is
+received on desired netdevice. Sending frames to CAN is implemented
+through can\_send.
+\section{Ethernet part}
+The Ethernet side of the gateway is however implemented using kernel sockets.
+Kernel thread is created to listen for UDP/TCP messages. The socket interface
+is also used for sending.
+\section{Ethernet message format}
+As there is no standard on how to carry CAN messages over TCP or UDP,
+the UDP/TCP message format has to be defined.
+\begin{center}
+\includegraphics[scale=0.5]{img/eth_msg.pdf}
+\captionof{figure}{UDP/TCP message.}\label{fig:eth_msg}
+\end{center}
 % \bibliography{can-eth-gw}
 % \bibliographystyle{IEEEtran}
 
diff --git a/doc/img/eth_msg.pdf b/doc/img/eth_msg.pdf
new file mode 100644 (file)
index 0000000..e478704
Binary files /dev/null and b/doc/img/eth_msg.pdf differ
diff --git a/doc/img/eth_msg.svg b/doc/img/eth_msg.svg
new file mode 100644 (file)
index 0000000..8ab4942
--- /dev/null
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="724.3017"
+   height="90.368515"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.48.2 r9819"
+   sodipodi:docname="drawing.svg">
+  <defs
+     id="defs4" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="0.7"
+     inkscape:cx="316.6525"
+     inkscape:cy="2.8118229"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="1280"
+     inkscape:window-height="725"
+     inkscape:window-x="0"
+     inkscape:window-y="25"
+     inkscape:window-maximized="1"
+     fit-margin-top="10"
+     fit-margin-left="10"
+     fit-margin-right="10"
+     fit-margin-bottom="10" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(-9.4553642,-60.723289)">
+    <rect
+       style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="rect2985"
+       width="702.3017"
+       height="68.368515"
+       x="20.455364"
+       y="71.723289" />
+    <text
+       xml:space="preserve"
+       style="font-size:22px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+       x="104.38579"
+       y="112.88971"
+       id="text2987"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan2989"
+         x="104.38579"
+         y="112.88971">can_id(32bit)</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:22px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+       x="358.19806"
+       y="112.8997"
+       id="text2991"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan2993"
+         x="358.19806"
+         y="112.8997">can_msg(8bit)</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:22px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+       x="557.08136"
+       y="112.94101"
+       id="text2995"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan2997"
+         x="557.08136"
+         y="112.94101">tstamp(8bit)</tspan></text>
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 534.3707,71.382231 0,67.862969"
+       id="path3767"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="cc" />
+    <path
+       sodipodi:nodetypes="cc"
+       inkscape:connector-curvature="0"
+       id="path3769"
+       d="m 340.3707,71.382231 0,67.862969"
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+  </g>
+</svg>