Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions Common.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
Binary file modified PowerAPI_Community.pdf
Binary file not shown.
21 changes: 19 additions & 2 deletions TypeDefs.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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}



%==============================================================================%
%==============================================================================%
%==============================================================================%
Expand Down Expand Up @@ -609,4 +627,3 @@ \subsubsection{PWR_PerfState}\label{type:PerfState}
\end{minipage}
\end{center}