diff --git a/3_Internal_Programming_Workflows.tex b/3_Internal_Programming_Workflows.tex index 4e83984..f9c19ef 100644 --- a/3_Internal_Programming_Workflows.tex +++ b/3_Internal_Programming_Workflows.tex @@ -189,7 +189,7 @@ \subsection{Call Service} \item Maintains a database of all calls \end{itemize} -The +The \subsection{Rubric Service} \begin{itemize} @@ -247,29 +247,15 @@ \section{Transmitter Connection} transmitter configuration and a RabbitMQ connection to receive the data to be transmitted. -The workflow for a transmitter connection is the following: +The workflow for a new transmitter connection is the following: \begin{enumerate} -\item Announce new connecting transmitter via Core REST Interface (\ref{protcoldef:transmitters:bootstrap}). -\item Get as response the transmitter configuration or an error message (\ref{protcoldef:transmitters:bootstrap}). -\item Initiate RabbitMQ connection to get the data to be transmitted (\ref{protocoldef:RabbitMQ:Transmitters}). +\item Announce the transmitter via a call to the REST API at \texttt{/transmitter/\_bootstrap} (\ref{protcoldef:transmitters:bootstrap}). +\item The response contains either the transmitter configuration or an error message (\ref{protcoldef:transmitters:bootstrap}). +\item On success, initiate the RabbitMQ connection to receive calls and send telemetry (\ref{protocoldef:RabbitMQ}). \end{enumerate} -The authentication of the transmitter's REST calls consist of the transmitter -name and its AuthKey, which is checked against the value in the CouchDB for this -transmitter. - -\section{Transmitter connections} -If a transmitter wants to connect to DAPNET, the first step is to sign-in and -show its presence via the Core REST interface. This interface is also used for -transmitter configuration like enabled timeslots and keep-alive polling. - -\subsection{Authentication of all HTTP-Requests in this context} -All HTTP-requests issued from a transmitter have to send a valid HTTP -authentication, which is checked against the CouchDB. It consists of the -transmitter name and its AuthKey. - -\todo{Da es sich bei den Anfragen um POST-Requests mit JSON Body handelt, wäre -es einfacher da den AuthKey mit dazu zu packen, so wie es auch schon in der -Protokoll-Definition umgesetzt ist.} +After the connection has been established, a periodical heartbeat must be sent +to the REST API at \texttt{/transmitter/\_heartbeat} +(\ref{protocoldef:transmitters:heartbeat}). \section{DAPNET-Proxy} \ No newline at end of file diff --git a/6_Protocol_Definitions.tex b/6_Protocol_Definitions.tex index 6c4db4a..ba76223 100644 --- a/6_Protocol_Definitions.tex +++ b/6_Protocol_Definitions.tex @@ -1753,7 +1753,7 @@ \subsubsection{GET /transmitter/} \subsubsection{POST /transmitters/\_bootstrap} \label{protcoldef:transmitters:bootstrap} -\texttt{POST /transmitter/bootstrap} +\texttt{POST /transmitters/\_bootstrap} \begin{lstlisting} { "callsign": "db0avr", @@ -1768,8 +1768,6 @@ \subsubsection{POST /transmitters/\_bootstrap} \textbf{Answers from the bootstrap REST call} The application type shall be \verb|application/json|. - -\todo{Was mag denn hier der Port sein?} \texttt{200 OK} \begin{lstlisting} { @@ -1777,7 +1775,6 @@ \subsubsection{POST /transmitters/\_bootstrap} "nodes": [ { "host": "node1.ampr.org", - "port": 4000, "reachable": true, "last_seen": "2018-07-03T07:43:52.783611Z", "response_time": 42 @@ -1802,12 +1799,12 @@ \subsubsection{POST /transmitters/\_bootstrap} \subsubsection{POST /transmitters/\_heartbeat} -\texttt{POST /transmitter/heartbeat} +\label{protocoldef:transmitters:heartbeat} +\texttt{POST /transmitters/\_heartbeat} \begin{lstlisting} { "callsign": "db0avr", - "auth_key": "", - "ntp_synced": true + "auth_key": "" } \end{lstlisting} @@ -1821,7 +1818,7 @@ \subsubsection{POST /transmitters/\_heartbeat} } \end{lstlisting} -If network wants to assign new timeslots without disconnecting (for dynamic timeslots) +If network wants to assign new timeslots without disconnecting (for dynamic timeslots). \texttt{200 OK} \begin{lstlisting} @@ -2384,7 +2381,7 @@ \subsubsection{Auth call reference list} \newpage \subsection{RabbitMQ Service} -\label{protocoldef:RabbitMQ} +\label{protocoldef:RabbitMQ:service} \subsubsection{GET /rabbitmq/*} @@ -3379,10 +3376,10 @@ \subsection{Transmitters} "avatar_picture" : , "simplified_coverage_polygon": [34.1, -23.3, 34.1 -23.2, 34.3, -23.3], "coverage_edges": [ - [lat1, long1], - [lat2, long2], - [lat3, long3], - [lat4, long4] + [lat1, long1], + [lat2, long2], + [lat3, long3], + [lat4, long4] ] } \end{lstlisting}