From: Radek Matejka Date: Thu, 12 Jul 2012 09:04:57 +0000 (+0200) Subject: doc: solution chapter added X-Git-Url: http://rtime.felk.cvut.cz/gitweb/can-eth-gw.git/commitdiff_plain/dac06dc0c8baac0a9acad3ca9f1faabc927739d1 doc: solution chapter added --- diff --git a/doc/can-eth-gw.tex b/doc/can-eth-gw.tex index 6993dbd..330217d 100644 --- a/doc/can-eth-gw.tex +++ b/doc/can-eth-gw.tex @@ -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 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 index 0000000..8ab4942 --- /dev/null +++ b/doc/img/eth_msg.svg @@ -0,0 +1,112 @@ + + + + + + + + + + image/svg+xml + + + + + + + + can_id(32bit) + can_msg(8bit) + tstamp(8bit) + + + +