\hypertarget{command_8h}{
\section{command.h File Reference}
\label{command_8h}\index{command.h@{command.h}}
}
{\tt \#include \char`\"{}t89c51cc02.h\char`\"{}}\par
{\tt \#include \char`\"{}datatypes.h\char`\"{}}\par
\subsection*{Defines}
\begin{CompactItemize}
\item 
\#define \hyperlink{command_8h_9ad2924bf54683250fdad58e707b4f98}{NR\_\-SENSORS}~18
\item 
\#define \hyperlink{command_8h_cd932c054586f833bc575a4e1770cdcc}{COMMAND\_\-READ}~0x00
\item 
\#define \hyperlink{command_8h_dd12d64d1ce3901e6ec44fb5a5499416}{COMMAND\_\-MONITOR}~0x10
\item 
\#define \hyperlink{command_8h_aec2f4b5a2c46dfc6ae84b47414d1802}{COMMAND\_\-STOPMONITOR}~0x11
\item 
\#define \hyperlink{command_8h_62821e0ec4af6dae1ed86f30eb622b13}{COMMAND\_\-MONITORSTATUS}~0x12
\item 
\#define \hyperlink{command_8h_d296c6a039bcf7a911e616530cfe560f}{COMMAND\_\-RECALLMONITOR}~0x13
\item 
\#define \hyperlink{command_8h_566afd51b05de08e97dec6664d34045c}{COMMAND\_\-STOPALLMONITORS}~0x14
\item 
\#define \hyperlink{command_8h_39769dc62e9ed450d2ac03db01bf2a41}{COMMAND\_\-REPORT}~0x20
\item 
\#define \hyperlink{command_8h_adc8a16ebe39eddfd56bc957efe9793c}{COMMAND\_\-STOPREPORT}~0x21
\item 
\#define \hyperlink{command_8h_e16a04862359ebb83eb8daad34ef2c7d}{COMMAND\_\-TIMECHECK\_\-ENABLE}~0x\-A0
\item 
\#define \hyperlink{command_8h_fcfb213099b96e09e04ebc6e38d1010e}{COMMAND\_\-TIMECHECK\_\-DISABLE}~0x\-A1
\item 
\#define \hyperlink{command_8h_6f7d29c8e3c11be95b1da710205965d7}{COMMAND\_\-TIMECHECKSTATUS}~0x\-A2
\item 
\#define \hyperlink{command_8h_76e4bdf44ca9f87fb7ce79dadde38353}{COMMAND\_\-EEPROM\_\-SAVEMONITOR}~0x\-E0
\item 
\#define \hyperlink{command_8h_03984b87a6f7e9ce82563596e4e61b6b}{COMMAND\_\-EEPROM\_\-CLEAR}~0x\-E1
\item 
\#define \hyperlink{command_8h_ac73c320ae33800a4870a2bc8c0981d5}{COMMAND\_\-RESET}~0xff
\item 
\#define \hyperlink{command_8h_c2c873ed09d04a937eb4bfc6a114d174}{Command\_\-Clear\-Read}()~\hyperlink{command_8h_b2355e25028a6bcb962ccdff1dd9e655}{readenable}=0
\item 
\#define \hyperlink{command_8h_4f5cab0fe5a09295806a23bfe23f76bc}{Command\_\-Disable\-Report}()~\hyperlink{command_8h_2ba61dd62098ec336fbb63e8b2b6cf2f}{reporting}=0
\item 
\#define \hyperlink{command_8h_cefd4d7473ef5fc39017384ab316e484}{Command\_\-Clear\-Monitor}()~\hyperlink{command_8h_33400b82e4a51d2cdfe750eec7ce2234}{monitor}=0
\item 
\#define \hyperlink{command_8h_4280d26d9f0837396a27145f7adba221}{Command\_\-Check\-Monitor}()~(\hyperlink{command_8h_33400b82e4a51d2cdfe750eec7ce2234}{monitor}!=0)
\item 
\#define \hyperlink{command_8h_49c1d712c82da5fc4873186141c88c70}{Command\_\-Timecheck\-Enable}()~\hyperlink{command_8h_d256430534b6da81ab04963e0d98ed71}{timecheck}=1
\item 
\#define \hyperlink{command_8h_64e31026e3a032df4f5af2b520176bec}{Command\_\-Timecheck\-Disable}()~\hyperlink{command_8h_d256430534b6da81ab04963e0d98ed71}{timecheck}=0
\item 
\#define \hyperlink{command_8h_69555c9e0e100a2a8fef680477e0c2bc}{Command\_\-Check\-Time}()~(\hyperlink{command_8h_d256430534b6da81ab04963e0d98ed71}{timecheck}==1)
\item 
\#define \hyperlink{command_8h_b6d069e33df4ff633b49e7d9ef3326d8}{CHECKSUM\_\-FILLER}~0x3c2a
\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
void \hyperlink{command_8h_31440f92fd526a728292b8be10ecedcd}{Command\_\-Set\-Read} (\hyperlink{datatypes_8h_92076741b75a8c2bdc5c24049c253d9a}{BYTE})
\begin{CompactList}\small\item\em marks a sensor for reading after next measurement \item\end{CompactList}\item 
\hyperlink{datatypes_8h_92076741b75a8c2bdc5c24049c253d9a}{BYTE} \hyperlink{command_8h_51c9d0065957d1ba325eaeb639e5d447}{Command\_\-Report\-Due} (void)
\begin{CompactList}\small\item\em signal if a report of the sensor values is due \item\end{CompactList}\item 
void \hyperlink{command_8h_04a073429e93491ba5ec68c1b987ce1f}{Command\_\-Enable\-Monitor} (\hyperlink{datatypes_8h_92076741b75a8c2bdc5c24049c253d9a}{BYTE}, \hyperlink{datatypes_8h_89b917a7bdb582e19cbde98e817fa0b3}{WORD}, bit)
\begin{CompactList}\small\item\em marks one sensor for monitoring so it will report a value above or beyond a specified boundary value \item\end{CompactList}\item 
void \hyperlink{command_8h_f15b020925e8f2c5d10ed4b57ee4f727}{Command\_\-Disable\-Monitor} (\hyperlink{datatypes_8h_92076741b75a8c2bdc5c24049c253d9a}{BYTE})
\begin{CompactList}\small\item\em disable monitoring for a given sensor \item\end{CompactList}\item 
\hyperlink{datatypes_8h_92076741b75a8c2bdc5c24049c253d9a}{BYTE} \hyperlink{command_8h_d85cb206a1c3704269d450f26540f66e}{Check\-Monitor} (\hyperlink{datatypes_8h_92076741b75a8c2bdc5c24049c253d9a}{BYTE}, \hyperlink{datatypes_8h_89b917a7bdb582e19cbde98e817fa0b3}{WORD})
\begin{CompactList}\small\item\em checks whether the monitoring condition for a given sensor is true \item\end{CompactList}\item 
void \hyperlink{command_8h_7c44538cc21856d753b8c320bd4cf158}{Command\_\-Enable\-Report} (\hyperlink{datatypes_8h_92076741b75a8c2bdc5c24049c253d9a}{BYTE})
\begin{CompactList}\small\item\em enables reporting of all sensors \item\end{CompactList}\item 
\hyperlink{datatypes_8h_89b917a7bdb582e19cbde98e817fa0b3}{WORD} \hyperlink{command_8h_a9b82108465e3b48bb74dd0bef2f1bed}{Command\_\-Get\-Boundary} (\hyperlink{datatypes_8h_92076741b75a8c2bdc5c24049c253d9a}{BYTE})
\begin{CompactList}\small\item\em reports the current boundary value for a given sensor \item\end{CompactList}\item 
void \hyperlink{command_8h_1b6d5763f76a946dca8de9d3cf2fb42f}{Command\_\-Set\-Boundary} (\hyperlink{datatypes_8h_92076741b75a8c2bdc5c24049c253d9a}{BYTE}, \hyperlink{datatypes_8h_89b917a7bdb582e19cbde98e817fa0b3}{WORD})
\begin{CompactList}\small\item\em set the boundary value for a given sensor \item\end{CompactList}\item 
void \hyperlink{command_8h_108156342dd8cd92085331e92c2df440}{Command\_\-Read\-Default\-Configuration} (void)
\begin{CompactList}\small\item\em load monitoring data from EEPROM and activate it again \item\end{CompactList}\item 
void \hyperlink{command_8h_40a026b9797ab7d20a0b79503ef49a7d}{Command\_\-Write\-Default\-Configuration} (void)
\begin{CompactList}\small\item\em writes the current monitoring conditions into the EEPROM \item\end{CompactList}\end{CompactItemize}
\subsection*{Variables}
\begin{CompactItemize}
\item 
\hyperlink{datatypes_8h_deeed35101214b62ebabd7bf71f27ab1}{LONG} \hyperlink{command_8h_b2355e25028a6bcb962ccdff1dd9e655}{readenable}
\begin{CompactList}\small\item\em stores a bit vector to mark which sensor values have to be sent after the current sampling cycle. \item\end{CompactList}\item 
\hyperlink{datatypes_8h_deeed35101214b62ebabd7bf71f27ab1}{LONG} \hyperlink{command_8h_33400b82e4a51d2cdfe750eec7ce2234}{monitor}
\item 
\hyperlink{datatypes_8h_deeed35101214b62ebabd7bf71f27ab1}{LONG} \hyperlink{command_8h_675051829ba2cd51d6f35e0b100eb528}{monitor\_\-direction}
\item 
volatile bit \hyperlink{command_8h_2ba61dd62098ec336fbb63e8b2b6cf2f}{reporting}
\item 
volatile bit \hyperlink{command_8h_d256430534b6da81ab04963e0d98ed71}{timecheck}
\item 
volatile bit \hyperlink{command_8h_3270b6e5036b5a554df7a471311a3fc3}{read\_\-eeprom\_\-config}
\item 
volatile bit \hyperlink{command_8h_23b236ea0a68913318118ecf8c2cc1c8}{write\_\-eeprom\_\-config}
\end{CompactItemize}


\subsection{Detailed Description}


Definition in file \hyperlink{command_8h-source}{command.h}.

\subsection{Define Documentation}
\hypertarget{command_8h_b6d069e33df4ff633b49e7d9ef3326d8}{
\index{command.h@{command.h}!CHECKSUM_FILLER@{CHECKSUM\_\-FILLER}}
\index{CHECKSUM_FILLER@{CHECKSUM\_\-FILLER}!command.h@{command.h}}
\subsubsection[CHECKSUM\_\-FILLER]{\setlength{\rightskip}{0pt plus 5cm}\#define CHECKSUM\_\-FILLER~0x3c2a}}
\label{command_8h_b6d069e33df4ff633b49e7d9ef3326d8}


start value for checksum calculation 

Definition at line 59 of file command.h.

Referenced by Command\_\-Read\-Default\-Configuration(), and Command\_\-Write\-Default\-Configuration().\hypertarget{command_8h_4280d26d9f0837396a27145f7adba221}{
\index{command.h@{command.h}!Command_CheckMonitor@{Command\_\-CheckMonitor}}
\index{Command_CheckMonitor@{Command\_\-CheckMonitor}!command.h@{command.h}}
\subsubsection[Command\_\-CheckMonitor]{\setlength{\rightskip}{0pt plus 5cm}\#define Command\_\-Check\-Monitor()~(\hyperlink{command_8h_33400b82e4a51d2cdfe750eec7ce2234}{monitor}!=0)}}
\label{command_8h_4280d26d9f0837396a27145f7adba221}


checkes whether sensors are monitored 

Definition at line 50 of file command.h.\hypertarget{command_8h_69555c9e0e100a2a8fef680477e0c2bc}{
\index{command.h@{command.h}!Command_CheckTime@{Command\_\-CheckTime}}
\index{Command_CheckTime@{Command\_\-CheckTime}!command.h@{command.h}}
\subsubsection[Command\_\-CheckTime]{\setlength{\rightskip}{0pt plus 5cm}\#define Command\_\-Check\-Time()~(\hyperlink{command_8h_d256430534b6da81ab04963e0d98ed71}{timecheck}==1)}}
\label{command_8h_69555c9e0e100a2a8fef680477e0c2bc}


checks whether monitoring of the timing constraints is active 

Definition at line 56 of file command.h.

Referenced by CAN\_\-interrupt().\hypertarget{command_8h_cefd4d7473ef5fc39017384ab316e484}{
\index{command.h@{command.h}!Command_ClearMonitor@{Command\_\-ClearMonitor}}
\index{Command_ClearMonitor@{Command\_\-ClearMonitor}!command.h@{command.h}}
\subsubsection[Command\_\-ClearMonitor]{\setlength{\rightskip}{0pt plus 5cm}\#define Command\_\-Clear\-Monitor()~\hyperlink{command_8h_33400b82e4a51d2cdfe750eec7ce2234}{monitor}=0}}
\label{command_8h_cefd4d7473ef5fc39017384ab316e484}


macro to disable all monitoring conditions 

Definition at line 48 of file command.h.

Referenced by CAN\_\-interrupt().\hypertarget{command_8h_c2c873ed09d04a937eb4bfc6a114d174}{
\index{command.h@{command.h}!Command_ClearRead@{Command\_\-ClearRead}}
\index{Command_ClearRead@{Command\_\-ClearRead}!command.h@{command.h}}
\subsubsection[Command\_\-ClearRead]{\setlength{\rightskip}{0pt plus 5cm}\#define Command\_\-Clear\-Read()~\hyperlink{command_8h_b2355e25028a6bcb962ccdff1dd9e655}{readenable}=0}}
\label{command_8h_c2c873ed09d04a937eb4bfc6a114d174}


macro to clear reading markers 

Definition at line 44 of file command.h.

Referenced by CAN\_\-interrupt().\hypertarget{command_8h_4f5cab0fe5a09295806a23bfe23f76bc}{
\index{command.h@{command.h}!Command_DisableReport@{Command\_\-DisableReport}}
\index{Command_DisableReport@{Command\_\-DisableReport}!command.h@{command.h}}
\subsubsection[Command\_\-DisableReport]{\setlength{\rightskip}{0pt plus 5cm}\#define Command\_\-Disable\-Report()~\hyperlink{command_8h_2ba61dd62098ec336fbb63e8b2b6cf2f}{reporting}=0}}
\label{command_8h_4f5cab0fe5a09295806a23bfe23f76bc}


macro to disable whole sample reporting 

Definition at line 46 of file command.h.

Referenced by CAN\_\-interrupt().\hypertarget{command_8h_03984b87a6f7e9ce82563596e4e61b6b}{
\index{command.h@{command.h}!COMMAND_EEPROM_CLEAR@{COMMAND\_\-EEPROM\_\-CLEAR}}
\index{COMMAND_EEPROM_CLEAR@{COMMAND\_\-EEPROM\_\-CLEAR}!command.h@{command.h}}
\subsubsection[COMMAND\_\-EEPROM\_\-CLEAR]{\setlength{\rightskip}{0pt plus 5cm}\#define COMMAND\_\-EEPROM\_\-CLEAR~0x\-E1}}
\label{command_8h_03984b87a6f7e9ce82563596e4e61b6b}


symbolic command name to clear the monitoring configuration inside of the EEPROM 

Definition at line 39 of file command.h.

Referenced by CAN\_\-interrupt().\hypertarget{command_8h_76e4bdf44ca9f87fb7ce79dadde38353}{
\index{command.h@{command.h}!COMMAND_EEPROM_SAVEMONITOR@{COMMAND\_\-EEPROM\_\-SAVEMONITOR}}
\index{COMMAND_EEPROM_SAVEMONITOR@{COMMAND\_\-EEPROM\_\-SAVEMONITOR}!command.h@{command.h}}
\subsubsection[COMMAND\_\-EEPROM\_\-SAVEMONITOR]{\setlength{\rightskip}{0pt plus 5cm}\#define COMMAND\_\-EEPROM\_\-SAVEMONITOR~0x\-E0}}
\label{command_8h_76e4bdf44ca9f87fb7ce79dadde38353}


symbolic command name to save the active monitoring conditions to the EEPROM 

Definition at line 37 of file command.h.

Referenced by CAN\_\-interrupt().\hypertarget{command_8h_dd12d64d1ce3901e6ec44fb5a5499416}{
\index{command.h@{command.h}!COMMAND_MONITOR@{COMMAND\_\-MONITOR}}
\index{COMMAND_MONITOR@{COMMAND\_\-MONITOR}!command.h@{command.h}}
\subsubsection[COMMAND\_\-MONITOR]{\setlength{\rightskip}{0pt plus 5cm}\#define COMMAND\_\-MONITOR~0x10}}
\label{command_8h_dd12d64d1ce3901e6ec44fb5a5499416}


symbolic command name to set a monitoring condition for a given sensor 

Definition at line 17 of file command.h.

Referenced by CAN\_\-interrupt().\hypertarget{command_8h_62821e0ec4af6dae1ed86f30eb622b13}{
\index{command.h@{command.h}!COMMAND_MONITORSTATUS@{COMMAND\_\-MONITORSTATUS}}
\index{COMMAND_MONITORSTATUS@{COMMAND\_\-MONITORSTATUS}!command.h@{command.h}}
\subsubsection[COMMAND\_\-MONITORSTATUS]{\setlength{\rightskip}{0pt plus 5cm}\#define COMMAND\_\-MONITORSTATUS~0x12}}
\label{command_8h_62821e0ec4af6dae1ed86f30eb622b13}


symbolic command name to read the status of active monitoring conditions 

Definition at line 21 of file command.h.

Referenced by CAN\_\-interrupt().\hypertarget{command_8h_cd932c054586f833bc575a4e1770cdcc}{
\index{command.h@{command.h}!COMMAND_READ@{COMMAND\_\-READ}}
\index{COMMAND_READ@{COMMAND\_\-READ}!command.h@{command.h}}
\subsubsection[COMMAND\_\-READ]{\setlength{\rightskip}{0pt plus 5cm}\#define COMMAND\_\-READ~0x00}}
\label{command_8h_cd932c054586f833bc575a4e1770cdcc}


symbolic command name to schedule reading of a given sensor 

Definition at line 15 of file command.h.

Referenced by CAN\_\-interrupt().\hypertarget{command_8h_d296c6a039bcf7a911e616530cfe560f}{
\index{command.h@{command.h}!COMMAND_RECALLMONITOR@{COMMAND\_\-RECALLMONITOR}}
\index{COMMAND_RECALLMONITOR@{COMMAND\_\-RECALLMONITOR}!command.h@{command.h}}
\subsubsection[COMMAND\_\-RECALLMONITOR]{\setlength{\rightskip}{0pt plus 5cm}\#define COMMAND\_\-RECALLMONITOR~0x13}}
\label{command_8h_d296c6a039bcf7a911e616530cfe560f}


symbolic command name to schedule a reinitialization of the monitoring conditions from EEPROM contents 

Definition at line 23 of file command.h.

Referenced by CAN\_\-interrupt().\hypertarget{command_8h_39769dc62e9ed450d2ac03db01bf2a41}{
\index{command.h@{command.h}!COMMAND_REPORT@{COMMAND\_\-REPORT}}
\index{COMMAND_REPORT@{COMMAND\_\-REPORT}!command.h@{command.h}}
\subsubsection[COMMAND\_\-REPORT]{\setlength{\rightskip}{0pt plus 5cm}\#define COMMAND\_\-REPORT~0x20}}
\label{command_8h_39769dc62e9ed450d2ac03db01bf2a41}


symbolic command name to schedule complete sample reports 

Definition at line 27 of file command.h.

Referenced by CAN\_\-interrupt().\hypertarget{command_8h_ac73c320ae33800a4870a2bc8c0981d5}{
\index{command.h@{command.h}!COMMAND_RESET@{COMMAND\_\-RESET}}
\index{COMMAND_RESET@{COMMAND\_\-RESET}!command.h@{command.h}}
\subsubsection[COMMAND\_\-RESET]{\setlength{\rightskip}{0pt plus 5cm}\#define COMMAND\_\-RESET~0xff}}
\label{command_8h_ac73c320ae33800a4870a2bc8c0981d5}


symbolic command name to reset all monitoring and reporting conditions 

Definition at line 41 of file command.h.

Referenced by CAN\_\-interrupt().\hypertarget{command_8h_566afd51b05de08e97dec6664d34045c}{
\index{command.h@{command.h}!COMMAND_STOPALLMONITORS@{COMMAND\_\-STOPALLMONITORS}}
\index{COMMAND_STOPALLMONITORS@{COMMAND\_\-STOPALLMONITORS}!command.h@{command.h}}
\subsubsection[COMMAND\_\-STOPALLMONITORS]{\setlength{\rightskip}{0pt plus 5cm}\#define COMMAND\_\-STOPALLMONITORS~0x14}}
\label{command_8h_566afd51b05de08e97dec6664d34045c}


symbolic command name to remove all active monitoring conditions 

Definition at line 25 of file command.h.

Referenced by CAN\_\-interrupt().\hypertarget{command_8h_aec2f4b5a2c46dfc6ae84b47414d1802}{
\index{command.h@{command.h}!COMMAND_STOPMONITOR@{COMMAND\_\-STOPMONITOR}}
\index{COMMAND_STOPMONITOR@{COMMAND\_\-STOPMONITOR}!command.h@{command.h}}
\subsubsection[COMMAND\_\-STOPMONITOR]{\setlength{\rightskip}{0pt plus 5cm}\#define COMMAND\_\-STOPMONITOR~0x11}}
\label{command_8h_aec2f4b5a2c46dfc6ae84b47414d1802}


symbolic command name to disable a monitoring condition for a given sensor 

Definition at line 19 of file command.h.

Referenced by CAN\_\-interrupt().\hypertarget{command_8h_adc8a16ebe39eddfd56bc957efe9793c}{
\index{command.h@{command.h}!COMMAND_STOPREPORT@{COMMAND\_\-STOPREPORT}}
\index{COMMAND_STOPREPORT@{COMMAND\_\-STOPREPORT}!command.h@{command.h}}
\subsubsection[COMMAND\_\-STOPREPORT]{\setlength{\rightskip}{0pt plus 5cm}\#define COMMAND\_\-STOPREPORT~0x21}}
\label{command_8h_adc8a16ebe39eddfd56bc957efe9793c}


symbolic command name to stop complete reporting 

Definition at line 29 of file command.h.

Referenced by CAN\_\-interrupt().\hypertarget{command_8h_fcfb213099b96e09e04ebc6e38d1010e}{
\index{command.h@{command.h}!COMMAND_TIMECHECK_DISABLE@{COMMAND\_\-TIMECHECK\_\-DISABLE}}
\index{COMMAND_TIMECHECK_DISABLE@{COMMAND\_\-TIMECHECK\_\-DISABLE}!command.h@{command.h}}
\subsubsection[COMMAND\_\-TIMECHECK\_\-DISABLE]{\setlength{\rightskip}{0pt plus 5cm}\#define COMMAND\_\-TIMECHECK\_\-DISABLE~0x\-A1}}
\label{command_8h_fcfb213099b96e09e04ebc6e38d1010e}


symbolic command name to disable time constraint monitoring 

Definition at line 33 of file command.h.

Referenced by CAN\_\-interrupt().\hypertarget{command_8h_e16a04862359ebb83eb8daad34ef2c7d}{
\index{command.h@{command.h}!COMMAND_TIMECHECK_ENABLE@{COMMAND\_\-TIMECHECK\_\-ENABLE}}
\index{COMMAND_TIMECHECK_ENABLE@{COMMAND\_\-TIMECHECK\_\-ENABLE}!command.h@{command.h}}
\subsubsection[COMMAND\_\-TIMECHECK\_\-ENABLE]{\setlength{\rightskip}{0pt plus 5cm}\#define COMMAND\_\-TIMECHECK\_\-ENABLE~0x\-A0}}
\label{command_8h_e16a04862359ebb83eb8daad34ef2c7d}


symbolic command name to enable monitoring of the time constraints 

Definition at line 31 of file command.h.

Referenced by CAN\_\-interrupt().\hypertarget{command_8h_64e31026e3a032df4f5af2b520176bec}{
\index{command.h@{command.h}!Command_TimecheckDisable@{Command\_\-TimecheckDisable}}
\index{Command_TimecheckDisable@{Command\_\-TimecheckDisable}!command.h@{command.h}}
\subsubsection[Command\_\-TimecheckDisable]{\setlength{\rightskip}{0pt plus 5cm}\#define Command\_\-Timecheck\-Disable()~\hyperlink{command_8h_d256430534b6da81ab04963e0d98ed71}{timecheck}=0}}
\label{command_8h_64e31026e3a032df4f5af2b520176bec}


macro to disable monitoring of the timing constraints 

Definition at line 54 of file command.h.

Referenced by CAN\_\-interrupt().\hypertarget{command_8h_49c1d712c82da5fc4873186141c88c70}{
\index{command.h@{command.h}!Command_TimecheckEnable@{Command\_\-TimecheckEnable}}
\index{Command_TimecheckEnable@{Command\_\-TimecheckEnable}!command.h@{command.h}}
\subsubsection[Command\_\-TimecheckEnable]{\setlength{\rightskip}{0pt plus 5cm}\#define Command\_\-Timecheck\-Enable()~\hyperlink{command_8h_d256430534b6da81ab04963e0d98ed71}{timecheck}=1}}
\label{command_8h_49c1d712c82da5fc4873186141c88c70}


macro to enable monitoring of the timing constraints 

Definition at line 52 of file command.h.

Referenced by CAN\_\-interrupt(), and main().\hypertarget{command_8h_6f7d29c8e3c11be95b1da710205965d7}{
\index{command.h@{command.h}!COMMAND_TIMECHECKSTATUS@{COMMAND\_\-TIMECHECKSTATUS}}
\index{COMMAND_TIMECHECKSTATUS@{COMMAND\_\-TIMECHECKSTATUS}!command.h@{command.h}}
\subsubsection[COMMAND\_\-TIMECHECKSTATUS]{\setlength{\rightskip}{0pt plus 5cm}\#define COMMAND\_\-TIMECHECKSTATUS~0x\-A2}}
\label{command_8h_6f7d29c8e3c11be95b1da710205965d7}


symbolic command name to read the status of time constraint monitoring 

Definition at line 35 of file command.h.

Referenced by CAN\_\-interrupt().\hypertarget{command_8h_9ad2924bf54683250fdad58e707b4f98}{
\index{command.h@{command.h}!NR_SENSORS@{NR\_\-SENSORS}}
\index{NR_SENSORS@{NR\_\-SENSORS}!command.h@{command.h}}
\subsubsection[NR\_\-SENSORS]{\setlength{\rightskip}{0pt plus 5cm}\#define NR\_\-SENSORS~18}}
\label{command_8h_9ad2924bf54683250fdad58e707b4f98}


number of sensors available in the system 

Definition at line 12 of file command.h.

Referenced by Check\-Monitor(), Command\_\-Disable\-Monitor(), Command\_\-Enable\-Monitor(), and Command\_\-Set\-Read().

\subsection{Function Documentation}
\hypertarget{command_8h_d85cb206a1c3704269d450f26540f66e}{
\index{command.h@{command.h}!CheckMonitor@{CheckMonitor}}
\index{CheckMonitor@{CheckMonitor}!command.h@{command.h}}
\subsubsection[CheckMonitor]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{datatypes_8h_92076741b75a8c2bdc5c24049c253d9a}{BYTE} Check\-Monitor (\hyperlink{datatypes_8h_92076741b75a8c2bdc5c24049c253d9a}{BYTE} {\em marker}, \hyperlink{datatypes_8h_89b917a7bdb582e19cbde98e817fa0b3}{WORD} {\em value})}}
\label{command_8h_d85cb206a1c3704269d450f26540f66e}


checks whether the monitoring condition for a given sensor is true 

The sample value is compared to the boundary for the given sensor.\par
 The direction bit of the monitoring condition is used to determine the needed relation.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em marker}]number of monitored sensor \item[{\em value}]current sensor reading \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]a positive value if the monitoring condition is true \end{Desc}


Definition at line 153 of file command.c.

References masks, monitor, monitor\_\-boundary, monitor\_\-direction, and NR\_\-SENSORS.

Referenced by main().\hypertarget{command_8h_f15b020925e8f2c5d10ed4b57ee4f727}{
\index{command.h@{command.h}!Command_DisableMonitor@{Command\_\-DisableMonitor}}
\index{Command_DisableMonitor@{Command\_\-DisableMonitor}!command.h@{command.h}}
\subsubsection[Command\_\-DisableMonitor]{\setlength{\rightskip}{0pt plus 5cm}void Command\_\-Disable\-Monitor (\hyperlink{datatypes_8h_92076741b75a8c2bdc5c24049c253d9a}{BYTE} {\em marker})}}
\label{command_8h_f15b020925e8f2c5d10ed4b57ee4f727}


disable monitoring for a given sensor 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em marker}]number of sensor for which monitoring has to be disabled \end{description}
\end{Desc}


Definition at line 137 of file command.c.

References masks, monitor, and NR\_\-SENSORS.

Referenced by CAN\_\-interrupt().\hypertarget{command_8h_04a073429e93491ba5ec68c1b987ce1f}{
\index{command.h@{command.h}!Command_EnableMonitor@{Command\_\-EnableMonitor}}
\index{Command_EnableMonitor@{Command\_\-EnableMonitor}!command.h@{command.h}}
\subsubsection[Command\_\-EnableMonitor]{\setlength{\rightskip}{0pt plus 5cm}void Command\_\-Enable\-Monitor (\hyperlink{datatypes_8h_92076741b75a8c2bdc5c24049c253d9a}{BYTE} {\em marker}, \hyperlink{datatypes_8h_89b917a7bdb582e19cbde98e817fa0b3}{WORD} {\em boundary}, bit {\em direction})}}
\label{command_8h_04a073429e93491ba5ec68c1b987ce1f}


marks one sensor for monitoring so it will report a value above or beyond a specified boundary value 

Monitoring of a given sensor is enabled.\par
 A set monitoring direction means that sensor values above the specified boundary are reported. If the direction bit is not set sensor values below the boundary are reported.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em marker}]number of sensor to be monitored \item[{\em boundary}]boundary value of reading \item[{\em direction}]1 if report on value larger than the boundary, 0 on lower value \end{description}
\end{Desc}


Definition at line 119 of file command.c.

References masks, monitor, monitor\_\-boundary, monitor\_\-direction, and NR\_\-SENSORS.

Referenced by CAN\_\-interrupt().\hypertarget{command_8h_7c44538cc21856d753b8c320bd4cf158}{
\index{command.h@{command.h}!Command_EnableReport@{Command\_\-EnableReport}}
\index{Command_EnableReport@{Command\_\-EnableReport}!command.h@{command.h}}
\subsubsection[Command\_\-EnableReport]{\setlength{\rightskip}{0pt plus 5cm}void Command\_\-Enable\-Report (\hyperlink{datatypes_8h_92076741b75a8c2bdc5c24049c253d9a}{BYTE} {\em timeframes})}}
\label{command_8h_7c44538cc21856d753b8c320bd4cf158}


enables reporting of all sensors 

The firmware will skip the given amount of timeframes between complete reports.\par
 A timeframe value of 0 indicates that every sampling run has to be reported.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em timeframes}]number of timeframes to be skipped before report is sent \end{description}
\end{Desc}


Definition at line 70 of file command.c.

References report, report\_\-reload, and reporting.

Referenced by CAN\_\-interrupt().\hypertarget{command_8h_a9b82108465e3b48bb74dd0bef2f1bed}{
\index{command.h@{command.h}!Command_GetBoundary@{Command\_\-GetBoundary}}
\index{Command_GetBoundary@{Command\_\-GetBoundary}!command.h@{command.h}}
\subsubsection[Command\_\-GetBoundary]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{datatypes_8h_89b917a7bdb582e19cbde98e817fa0b3}{WORD} Command\_\-Get\-Boundary (\hyperlink{datatypes_8h_92076741b75a8c2bdc5c24049c253d9a}{BYTE} {\em marker})}}
\label{command_8h_a9b82108465e3b48bb74dd0bef2f1bed}


reports the current boundary value for a given sensor 

The boundary value is persistent, even if the monitoring condition has been disabled with a \hyperlink{command_8h_04a073429e93491ba5ec68c1b987ce1f}{Command\_\-Enable\-Monitor} command for the given sensor.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em marker}]number of sensor whose boundary has to be returned \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the boundary value of the specified sensor \end{Desc}


Definition at line 184 of file command.c.

References monitor\_\-boundary.\hypertarget{command_8h_108156342dd8cd92085331e92c2df440}{
\index{command.h@{command.h}!Command_ReadDefaultConfiguration@{Command\_\-ReadDefaultConfiguration}}
\index{Command_ReadDefaultConfiguration@{Command\_\-ReadDefaultConfiguration}!command.h@{command.h}}
\subsubsection[Command\_\-ReadDefaultConfiguration]{\setlength{\rightskip}{0pt plus 5cm}void Command\_\-Read\-Default\-Configuration (void)}}
\label{command_8h_108156342dd8cd92085331e92c2df440}


load monitoring data from EEPROM and activate it again 

This function reads the EEPROM contents and checks its checksum. If the checksum is correct the values are used to set the monitoring conditions for up to all sensors. 

Definition at line 206 of file command.c.

References CHECKSUM\_\-FILLER, EEPROM\_\-BOUNDARY, EEPROM\_\-CHECKSUM, EEPROM\_\-DIRECTION, EEPROM\_\-MONITOR, EEPROM\_\-read(), monitor, monitor\_\-boundary, and monitor\_\-direction.

Referenced by main().\hypertarget{command_8h_51c9d0065957d1ba325eaeb639e5d447}{
\index{command.h@{command.h}!Command_ReportDue@{Command\_\-ReportDue}}
\index{Command_ReportDue@{Command\_\-ReportDue}!command.h@{command.h}}
\subsubsection[Command\_\-ReportDue]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{datatypes_8h_92076741b75a8c2bdc5c24049c253d9a}{BYTE} Command\_\-Report\-Due (void)}}
\label{command_8h_51c9d0065957d1ba325eaeb639e5d447}


signal if a report of the sensor values is due 

The routine counts the elapsed timeframes for reports and signals when the report is due at the current time slot.

\begin{Desc}
\item[Returns:]a value $<$$>$0 indicates a report is due \end{Desc}


Definition at line 84 of file command.c.

References report, report\_\-reload, and reporting.

Referenced by main().\hypertarget{command_8h_1b6d5763f76a946dca8de9d3cf2fb42f}{
\index{command.h@{command.h}!Command_SetBoundary@{Command\_\-SetBoundary}}
\index{Command_SetBoundary@{Command\_\-SetBoundary}!command.h@{command.h}}
\subsubsection[Command\_\-SetBoundary]{\setlength{\rightskip}{0pt plus 5cm}void Command\_\-Set\-Boundary (\hyperlink{datatypes_8h_92076741b75a8c2bdc5c24049c253d9a}{BYTE} {\em marker}, \hyperlink{datatypes_8h_89b917a7bdb582e19cbde98e817fa0b3}{WORD} {\em bound})}}
\label{command_8h_1b6d5763f76a946dca8de9d3cf2fb42f}


set the boundary value for a given sensor 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em marker}]number of sensor for which the boundary has to be set \item[{\em bound}]new boundary value \end{description}
\end{Desc}


Definition at line 195 of file command.c.

References monitor\_\-boundary.\hypertarget{command_8h_31440f92fd526a728292b8be10ecedcd}{
\index{command.h@{command.h}!Command_SetRead@{Command\_\-SetRead}}
\index{Command_SetRead@{Command\_\-SetRead}!command.h@{command.h}}
\subsubsection[Command\_\-SetRead]{\setlength{\rightskip}{0pt plus 5cm}void Command\_\-Set\-Read (\hyperlink{datatypes_8h_92076741b75a8c2bdc5c24049c253d9a}{BYTE} {\em marker})}}
\label{command_8h_31440f92fd526a728292b8be10ecedcd}


marks a sensor for reading after next measurement 

The marker corresponds to a bit number in the \hyperlink{command_8h_b2355e25028a6bcb962ccdff1dd9e655}{readenable} status word \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em marker}]\end{description}
\end{Desc}


Definition at line 56 of file command.c.

References masks, NR\_\-SENSORS, and readenable.

Referenced by CAN\_\-interrupt().\hypertarget{command_8h_40a026b9797ab7d20a0b79503ef49a7d}{
\index{command.h@{command.h}!Command_WriteDefaultConfiguration@{Command\_\-WriteDefaultConfiguration}}
\index{Command_WriteDefaultConfiguration@{Command\_\-WriteDefaultConfiguration}!command.h@{command.h}}
\subsubsection[Command\_\-WriteDefaultConfiguration]{\setlength{\rightskip}{0pt plus 5cm}void Command\_\-Write\-Default\-Configuration (void)}}
\label{command_8h_40a026b9797ab7d20a0b79503ef49a7d}


writes the current monitoring conditions into the EEPROM 

The needed checksum is calculated before writing the configuration.\par
 Interrupts are disabled during EEPROM access and are reenabled afterwards.\par
 Writing to the EEPROM costs time. Writing the configuration may led to violation of the timing constraints of the sensor sampling. 

Definition at line 251 of file command.c.

References CHECKSUM\_\-FILLER, monitor, monitor\_\-boundary, and monitor\_\-direction.

\subsection{Variable Documentation}
\hypertarget{command_8h_33400b82e4a51d2cdfe750eec7ce2234}{
\index{command.h@{command.h}!monitor@{monitor}}
\index{monitor@{monitor}!command.h@{command.h}}
\subsubsection[monitor]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{datatypes_8h_deeed35101214b62ebabd7bf71f27ab1}{LONG} \hyperlink{command_8h_33400b82e4a51d2cdfe750eec7ce2234}{monitor}}}
\label{command_8h_33400b82e4a51d2cdfe750eec7ce2234}


stores a bit vector to mark which sensors are monitored 

Definition at line 20 of file command.c.

Referenced by CAN\_\-interrupt(), Check\-Monitor(), Command\_\-Disable\-Monitor(), Command\_\-Enable\-Monitor(), Command\_\-Read\-Default\-Configuration(), and Command\_\-Write\-Default\-Configuration().\hypertarget{command_8h_675051829ba2cd51d6f35e0b100eb528}{
\index{command.h@{command.h}!monitor_direction@{monitor\_\-direction}}
\index{monitor_direction@{monitor\_\-direction}!command.h@{command.h}}
\subsubsection[monitor\_\-direction]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{datatypes_8h_deeed35101214b62ebabd7bf71f27ab1}{LONG} \hyperlink{command_8h_675051829ba2cd51d6f35e0b100eb528}{monitor\_\-direction}}}
\label{command_8h_675051829ba2cd51d6f35e0b100eb528}


bit vector which indicates the direction of boundary monitoring 

Definition at line 23 of file command.c.

Referenced by Check\-Monitor(), Command\_\-Enable\-Monitor(), Command\_\-Read\-Default\-Configuration(), and Command\_\-Write\-Default\-Configuration().\hypertarget{command_8h_3270b6e5036b5a554df7a471311a3fc3}{
\index{command.h@{command.h}!read_eeprom_config@{read\_\-eeprom\_\-config}}
\index{read_eeprom_config@{read\_\-eeprom\_\-config}!command.h@{command.h}}
\subsubsection[read\_\-eeprom\_\-config]{\setlength{\rightskip}{0pt plus 5cm}volatile bit \hyperlink{command_8h_3270b6e5036b5a554df7a471311a3fc3}{read\_\-eeprom\_\-config}}}
\label{command_8h_3270b6e5036b5a554df7a471311a3fc3}


semaphore to schedule a reread of the EEPROM contents 

Definition at line 31 of file command.c.

Referenced by CAN\_\-interrupt(), and main().\hypertarget{command_8h_b2355e25028a6bcb962ccdff1dd9e655}{
\index{command.h@{command.h}!readenable@{readenable}}
\index{readenable@{readenable}!command.h@{command.h}}
\subsubsection[readenable]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{datatypes_8h_deeed35101214b62ebabd7bf71f27ab1}{LONG} \hyperlink{command_8h_b2355e25028a6bcb962ccdff1dd9e655}{readenable}}}
\label{command_8h_b2355e25028a6bcb962ccdff1dd9e655}


stores a bit vector to mark which sensor values have to be sent after the current sampling cycle. 

The bit vector is automatically cleared when all scheduled readings have taken place. 

Definition at line 17 of file command.c.

Referenced by Command\_\-Set\-Read(), and main().\hypertarget{command_8h_2ba61dd62098ec336fbb63e8b2b6cf2f}{
\index{command.h@{command.h}!reporting@{reporting}}
\index{reporting@{reporting}!command.h@{command.h}}
\subsubsection[reporting]{\setlength{\rightskip}{0pt plus 5cm}volatile bit \hyperlink{command_8h_2ba61dd62098ec336fbb63e8b2b6cf2f}{reporting}}}
\label{command_8h_2ba61dd62098ec336fbb63e8b2b6cf2f}


a flag that indicates if all sensor values should be reported 

Definition at line 26 of file command.c.

Referenced by Command\_\-Enable\-Report(), Command\_\-Report\-Due(), and main().\hypertarget{command_8h_d256430534b6da81ab04963e0d98ed71}{
\index{command.h@{command.h}!timecheck@{timecheck}}
\index{timecheck@{timecheck}!command.h@{command.h}}
\subsubsection[timecheck]{\setlength{\rightskip}{0pt plus 5cm}volatile bit \hyperlink{command_8h_d256430534b6da81ab04963e0d98ed71}{timecheck}}}
\label{command_8h_d256430534b6da81ab04963e0d98ed71}


a flag that indicates whether the main loop shall report violations of the timing restrictions 

Definition at line 28 of file command.c.\hypertarget{command_8h_23b236ea0a68913318118ecf8c2cc1c8}{
\index{command.h@{command.h}!write_eeprom_config@{write\_\-eeprom\_\-config}}
\index{write_eeprom_config@{write\_\-eeprom\_\-config}!command.h@{command.h}}
\subsubsection[write\_\-eeprom\_\-config]{\setlength{\rightskip}{0pt plus 5cm}volatile bit \hyperlink{command_8h_23b236ea0a68913318118ecf8c2cc1c8}{write\_\-eeprom\_\-config}}}
\label{command_8h_23b236ea0a68913318118ecf8c2cc1c8}


semaphore to schedule writing of new EEPROM contents 

Definition at line 33 of file command.c.

Referenced by CAN\_\-interrupt().