\subsubsection{Battery} \label{battery} A \battery is specified by the following definitions :\\ (1) It is an hardware component storing energy.\\ (2) A battery is connected to a \processor and each task from this processor may or may not specify an energy comsumption rate. \\ \begin{center} Standard attributes \end{center} $Name$ : it is the unique name of the \battery.\\ $Cpu_{-}name$: It is the name of \processor which is connected to the \battery.\\ $Capacity$ : stores the maximum amount of energy that can be stored at any. If $Capacity$ is equal to zero than the capacity is not bounded, i.e. infinity capacity.\\ $Rechargeable_{-}Power$ : Models that amount of energy the battery is able to store/recover at each unit of time. \\ $E_{-}max$ : It is the maximum units of energy consumed during one unit time-slot when a task is run. \\ $E_{-}min$ : It is the minimum units of energy consumed during one unit time-slot when a task is run. \\ $Initial_{-}Energy$ : Stores the current amount of energy stored by a battery at start time (i.e. scheduling start time). \\ \begin{center} Legality rules \end{center} (L1) The \battery name must not be empty.\\ (L2) The \battery name must be valid identifier.\\ (L3) An \battery must be connected to a \processor.\\ (L4) Several \battery may be connected to a given \processor.\\ (L5) The $Capacity$ must be greater or equal to 0.\\ (L6) The $Rechargeable_{-}Power$ must be greater than 0.\\ (L7) The $E_{-}max$ must be greater or equal to 0.\\ (L8) The $Initial_{-}Energy$ must be or equal to 0.\\ (L9) The $E_{-}min$ must be greater or equal to 0.\\ \begin{center} Annexes \end{center} \begin{center} Implementation \end{center} The figure \ref{dtd_battery} gives the DTD of entity \battery. \begin{figure}{} \begin{lstlisting}{} \end{lstlisting} \caption{The DTD of entity $Battery$} \label{dtd_addr} \end{figure} \begin{center} Example \end{center} The figure \ref{example_adr} gives an example of \battery. This \battery, named $B1$ is based on \processor $processor1$. The others parameters must be greater than $0$. \begin{figure}[H]{} \begin{lstlisting}{} BATTERY_OBJECT_TYPE B1 4 2 processor1 3 1 4 \end{lstlisting} \caption{An Example of entity \battery described using Cheddar ADL} \label{example_adr} \end{figure}