diff options
Diffstat (limited to 'protocol.tex')
-rw-r--r-- | protocol.tex | 95 |
1 files changed, 88 insertions, 7 deletions
diff --git a/protocol.tex b/protocol.tex index a5828e0..1b57783 100644 --- a/protocol.tex +++ b/protocol.tex @@ -1,7 +1,9 @@ \documentclass[11pt]{article} +\usepackage[usenames,dvipsnames]{xcolor} +\usepackage{hyperref} +\hypersetup{colorlinks=true,linkcolor=blue} \usepackage{xltxtra} \usepackage{longtable} -\usepackage[usenames,dvipsnames]{xcolor} \usepackage[font=small,labelfont=bf]{caption} \setmainfont[Mapping=tex-text]{Delicious-Roman} \setlength{\parindent}{0pt} @@ -15,6 +17,8 @@ \title{subbus protocol} \maketitle +\tableofcontents + \section{packet types} \begin{table}[h] @@ -84,26 +88,42 @@ Information response: \end{itemize} \subsection{information blocks} -\subsubsection{root block} + +The following information blocks can be requested from a node through the +discovery protocol: + +\begin{table}[h]\tt + \caption{\textnormal{information blocks}} + \begin{tabular}{rl} + block & usage\\ + \hline + 0 & \textnormal{root information block} \\ + 1-3 & \textnormal{reserved} \\ + 4-7 & \textnormal{device specific} \\ + 8-15 & \textnormal{text description of the sensor (64 bytes max, 0-padded)} + \end{tabular} +\end{table} + +\newpage +\subsection{block 0: root block} The root information block describes generic device properties and should always be queried to determine device characteristics: \begin{table}[h]\tt \caption{\textnormal{information block 0 contents (root)}} - \begin{tabular}{rrl} + \begin{tabular}{rll} offset & type & field \\ \hline 0 & uint8\_t & \textnormal{actor type} \\ 1 & uint8\_t & \textnormal{sensor type} \\ - 2 & uint8\_t & \textnormal{flags / reserved} \\ + 2 & uint8\_t & \textnormal{block 4-7 usage} \\ 3 & uint8\_t & \textnormal{data size (1-8 bytes)} \\ - 4 & uint16\_t & \textnormal{sublab grid location} + 4 & uint16\_t & \textnormal{sublab grid location} \\ + 6 & uint16\_t & \textnormal{reserved for future use} \end{tabular} \end{table} -\subsubsection{type codes} - Actor type codes (byte 0): \begin{longtable}{rl} @@ -132,6 +152,67 @@ Sensor type codes (byte 1): \texttt{ff} & custom / broken / ... \end{longtable} +Block 4-7 usage (byte 2): + +\begin{longtable}{rl} + type code & type \\ + \hline + \texttt{00} & none (unused) \\ + \hline + \texttt{01} & DALI device information \\ +\end{longtable} + +\subsection{DALI (subtype 0x01) information blocks} + +\subsubsection{block 4: reserved} + +Block 4 is not currently used with DALI devices. + +\subsubsection{block 5: direct bus access} +Direct DALI bus access. TBA. + +\subsubsection{block 6: device ROM information} + +Requesting information block 6 from a DALI device acquires ROM information and the random search +address from the device. The request will take about 0.3s to complete since the information is +not cached. + +\begin{table}[h]\tt + \caption{\textnormal{DALI information block 6 contents (6 bytes)}} + \begin{tabular}{rll} + offset & type & field \\ + \hline + 0 & uint8\_t & \textnormal{DALI version number} \\ + 1 & uint8\_t & \textnormal{DALI device type} \\ + 2 & uint8\_t & \textnormal{DALI physical minimum dimming level} \\ + 3 & uint8\_t[3] & \textnormal{DALI device search address} \\ + \end{tabular} +\end{table} + +\subsubsection{block 7: device state} + +Requesting information block 7 from a DALI device polls all volatile and writable nonvolatile state. +The request will take about 0.3s to complete since the information is not cached. It is intended +that this block can be written to. + +\begin{table}[h]\tt + \caption{\textnormal{DALI information block 7 contents (8 bytes)}} + \begin{tabular}{rll} + offset & type & field \\ + \hline + 0 & uint8\_t & \textnormal{DALI current actual power level} \\ + 1 & uint8\_t & \textnormal{DALI maximum level} \\ + 2 & uint8\_t & \textnormal{DALI minimum level} \\ + 3 & uint8\_t & \textnormal{DALI power on level} \\ + 4 & uint8\_t & \textnormal{DALI system failure level} \\ + 5 & uint8\_t & \textnormal{DALI fade rate / fade time} \\ + 6 & uint8\_t & \textnormal{DALI status information} \\ + 7 & uint8\_t & \textnormal{DALI short address} \\ + \end{tabular} +\end{table} + +\newpage + \section{sublab running nodes} \begin{longtable}{rlll} address & actor type & sensor type & node \\ |