From: Michal Sojka Date: Wed, 11 Jul 2012 12:29:37 +0000 (+0200) Subject: Add initial version of documentation X-Git-Url: http://rtime.felk.cvut.cz/gitweb/can-eth-gw.git/commitdiff_plain/94ba1ac94c868cdd67be03e9fb6252b21a338695?ds=sidebyside Add initial version of documentation Currently, it contains only a brief assignment. --- diff --git a/doc/Makefile b/doc/Makefile new file mode 100644 index 0000000..d9d55c9 --- /dev/null +++ b/doc/Makefile @@ -0,0 +1,57 @@ +DOCS=can-eth-gw +#DOCS=socketcan-qdisc socketcan-qdisc-review1 socketcan-qdisc-final + +all: $(DOCS:%=%.pdf) #$(DOCS:%=%.txt) + +clean: + rm -f $(wildcard $(DOCS:%=%.aux) $(DOCS:%=%.bbl) $(DOCS:%=%.log) $(DOCS:%=%.fls)) + +version_tag_prefix = $(subst socketcan-qdisc-v,v,$(*:%=%-v)) +VERSION = $(shell (git describe --always --dirty --match $(version_tag_prefix)\* || echo "unknown")|sed -e 's/$(version_tag_prefix)\(.*\)/\1/') + +LATEX = pdflatex $(LATEX_FLAGS) -synctex=1 -recorder \ + $(OUTDIR:%=-output-directory %) -file-line-error \ + -interaction=nonstopmode '\def\version{$(VERSION)}\input{$<}' + +SVGS = $(wildcard *.svg) +GPS = $(wildcard *.gp) + +.SECONDARY: $(SVGS:%.svg=%.pdf) $(GPS:%.gp=%.pdf) + +%.pdf: %.tex $(SVGS:%.svg=%.pdf) $(GPS:%.gp=%.pdf) + $(LATEX) +# bibtex $* + $(LATEX) + $(LATEX) + +HEVEA = hevea article.hva -text -exec xxdate.exe $< +%.txt: %.tex %.pdf + $(HEVEA) + bibhva $* + $(HEVEA) + +%.png: %.txt + java -jar ~/opt/ditaa/ditaa0_9.jar -r $< $@ + +%.png: %.svg + inkscape --export-area-drawing --export-png=$@ --export-background-opacity=1.0 $< + +%.ps: %.svg + inkscape --export-ps=$@ $< + +%-page.pdf: %.svg + inkscape --export-pdf=$@ $< + +%-page.pdf: %.ps + ps2pdf $< $@ + +%.pdf: %-page.pdf + pdfcrop $< $@ + + +define GNUPLOT +gnuplot -e 'PWD="$(PWD)"; set output PWD."/$*.pdf"; set terminal pdfcairo dashed enhanced size $(shell s=`sed -ne '/^# termsize / s///p' $<`; test "$$s" && echo $$s || echo 20cm,7cm) lw 1 font "Times New Roman,8pt";' $< +endef + +%.pdf: %.gp + $(GNUPLOT) diff --git a/doc/can-eth-gw.tex b/doc/can-eth-gw.tex new file mode 100644 index 0000000..6993dbd --- /dev/null +++ b/doc/can-eth-gw.tex @@ -0,0 +1,111 @@ +% +% Typographic conventions (already applied) +% * Each \caption{} should end with a dot +% * "Linux traffic control" will be written with lowercase T and C +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\documentclass[11pt,abstract]{scrreprt} +\usepackage[utf8]{inputenc} +% \usepackage[T1]{fontenc} +\usepackage[right]{lineno} +\usepackage{fixltx2e} +\usepackage{graphicx} +\usepackage{longtable} +\usepackage{tabularx} +\usepackage{float} +\usepackage{wrapfig} +\usepackage{soul} +% \usepackage{t1enc} +\usepackage{textcomp} +\usepackage{marvosym} +\usepackage{wasysym} +\usepackage{latexsym} +\usepackage{amssymb} +\usepackage{hyperref} +\usepackage{multirow} +\usepackage{tikz} +\usepackage[draft]{fixme} +\usepackage{vertbars} +\usepackage{fancyvrb} +\usepackage{appendix} +\usepackage{listings} +\usepackage{color} + +%\usepackage{multicol} +\hypersetup{ + breaklinks = true, %allow links to break over lines + pdffitwindow = true, %resize document window to fit document size + colorlinks = true, +% linkcolor = darkblue, +% citecolor = darkblue, +% urlcolor = darkblue, + linkcolor = black, + citecolor = black, + urlcolor = black, + plainpages=false, + } +%\urlstyle{same} + +\RecustomVerbatimEnvironment{Verbatim}{Verbatim}{frame=single,framesep=4pt} + + +\setlength{\columnsep}{8mm} +\providecommand{\alert}[1]{\textbf{#1}} + +\title{Linux-Based CAN-Ethernet Gateway} +\author{R. Matějka, M. Sojka\\ +Czech Technical University in Prague} +\providecommand{\version}{???} +\date{\today\\Version \version} + +\newcommand{\superscript}[1]{\ensuremath{^{\mathrm{#1}}}} +\newcommand{\subscript}[1]{\ensuremath{_{\mathrm{#1}}}} +\renewcommand{\th}[0]{\superscript{th}} +\renewcommand{\st}[0]{\superscript{st}} +\newcommand{\nd}[0]{\superscript{nd}} +\newcommand{\rd}[0]{\superscript{rd}} + +\newenvironment{todo} +{\begin{vertbar}\begin{itshape}} + {\end{itshape}\end{vertbar}} +\pagestyle{headings} +\begin{document} +\lstset{language=sh,frame=single,basicstyle=\tt,commentstyle=\itshape\color{gray},columns=flexible} +%\linenumbers +%\onecolumn +\maketitle + +% \begin{abstract} +% \end{abstract} + +\tableofcontents + +\chapter{Assignment} +\label{cha:assignment} + +The goal is to implement CAN-Ethernet gateway based on Linux's AF\_CAN +subsystem with the following features: +\begin{enumerate} +\item Both user- and kernel-space implementations will be developed. + User-space one will contain only the most basic functionality. +\item Ethernet side will use UDP datagrams to carry the CAN messages. + Later it will be extended to support also TCP. +\item Initial version will route all CAN frames to Ethernet side and + all received UDP datagrams to CAN messages. Later, filtering + capabilities will be added. +\item UDP frames will contain timestamps of the time when the CAN + message was received. +\item For kernel-based gateway, implement a user-space configuration + tool, similar to \texttt{cangw} tool from \texttt{can-utils}. +\end{enumerate} +% \bibliography{can-eth-gw} +% \bibliographystyle{IEEEtran} + +\end{document} + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: t +%%% ispell-local-dictionary: american +%%% End: