diff --git a/Common.tex b/Common.tex index 14160d6..0341819 100644 --- a/Common.tex +++ b/Common.tex @@ -383,6 +383,35 @@ \section{Attribute Functions}\label{sec:Attributes} \returnval{PWR_RET_OUT_OF_RANGE} {The value was out of range for the target attribute.} \returnval{PWR_RET_FAILURE} {Upon FAILURE.} \end{prototype} +%==============================================================================% +%int PWR_ObjAttrTrackValue( PWR_Obj object, PWR_AttrName attr, void* trackingptr, int id, PWR_AttrTracking type ); +\begin{prototype}{ObjAttrStartTrackingValue} + \longdescription{The \texttt{PWR_ObjAttrTrackValue} function is provided to + start tracking for changes in the value of a single specified attribute (\texttt{PWR_AttrName attr}) of a single specified object (\texttt{PWR_Obj object}).} + \returntype{int} + \parameter{PWR_Obj object} {\pInput} {The target object.} + \parameter{PWR_AttrName attr} {\pInput} {The target attribute. See section \ref{type:AttrName} for a list of available attributes.} + \parameter{void* trackingptr} {\pInput} {Pointer to a function to be called when the attribute changes.} + \parameter{int id} {\pInput} {User defined ID value returned to callback function when attribute changes.} + \parameter{PWR_AttrTracking type} {\pInput} {Specify \texttt{PWR_TRACKING_APIONLY} for changes + only done through the Power API or \texttt{PWR_TRACKING_POLL} for polling from any changes (warning polling may have adverse performance ramifications.} + \paramter{PWR_Time timestamp} {\pinput} {Time stamp of when change occured.} + \parameter{PWR_Threshold} {\pinput} {Threshold of change in average value before callback is triggered.} + \returnval{PWR_RET_SUCCESS} {Upon SUCCESS.} + \returnval{PWR_RET_NOT_IMPLEMENTED} {The requested attribute is not supported for the target object.} + \returnval{PWR_RET_FAILURE} {Upon FAILURE.} +\end{prototype} +%==============================================================================% +%int PWR_ObjAttrStopTrackingValue( PWR_Obj object, PWR_AttrName attr ); +\begin{prototype}{ObjAttrStopTrackingValue} + \longdescription{The \texttt{PWR_ObjAttrStopTrackingValue} function is provided to stop tracking the value of a single specified attribute (\texttt{PWR_AttrName attr}) of a single specified object (\texttt{PWR_Obj object}).} + \returntype{int} + \parameter{PWR_Obj object} {\pInput} {The target object.} + \parameter{PWR_AttrName attr} {\pInput} {The target attribute. See section \ref{type:AttrName} for a list of available attributes.} + \returnval{PWR_RET_SUCCESS} {Upon SUCCESS.} + \returnval{PWR_RET_FAILURE} {Upon FAILURE.} +\end{prototype} + %==============================================================================% %int PWR_StatusCreate( PWR_Cntxt context, PWR_Status* status ); \begin{prototype}{StatusCreate} diff --git a/PowerAPI_Community.pdf b/PowerAPI_Community.pdf index 9a62787..ea06b91 100644 Binary files a/PowerAPI_Community.pdf and b/PowerAPI_Community.pdf differ diff --git a/TypeDefs.tex b/TypeDefs.tex index 502afb5..8fa5142 100644 --- a/TypeDefs.tex +++ b/TypeDefs.tex @@ -161,7 +161,7 @@ \section{Attribute Relevant Type Definitions}\label{sec:AttributeTypeDefinitions Additional capabilities are and can be added using additional operations and often interface specific functions. The \typeref{AttrAccessError} type is used to hold the error returns that are popped from the \texttt{PWR_Status} handle (see section \ref{sec:OpaqueTypes}) using the \funcref{StatusPopError} function. - +The \typeref{AttrTracking} type is used to define the mode in which tracking the change for a given attribute is done, whether through the Power API only, or through polling or underlying device support to capture changes from all sources. %==============================================================================% \subsubsection{PWR_AttrName}\label{type:AttrName} @@ -246,6 +246,24 @@ \subsubsection{PWR_AttrGov}\label{type:AttrGov} \end{lstlisting} \end{minipage} \end{center} + +%==============================================================================% + +\subsubsection{PWR_AttrTracking}\label{type:AttrTracking} +\begin{center} +\begin{minipage}{.95\linewidth}% +\begin{lstlisting} +typedef enum { + PWR_TRACKING_APIONLY, + PWR_TRACKING_POLL, + PWR_TRACKING_DEVICE +} PWR_AttrTracking; +\end{lstlisting} +\end{minipage} +\end{center} + + + %==============================================================================% %==============================================================================% %==============================================================================% @@ -609,4 +627,3 @@ \subsubsection{PWR_PerfState}\label{type:PerfState} \end{minipage} \end{center} -