Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.13.1.2
openapi_green_pwr_sav_history.h
Go to the documentation of this file.
1 
9 /*********************************************************************
10 *
11 * Copyright 2016-2023 Broadcom.
12 *
13 * Licensed under the Apache License, Version 2.0 (the "License");
14 * you may not use this file except in compliance with the License.
15 * You may obtain a copy of the License at
16 *
17 * http://www.apache.org/licenses/LICENSE-2.0
18 *
19 * Unless required by applicable law or agreed to in writing, software
20 * distributed under the License is distributed on an "AS IS" BASIS,
21 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 * See the License for the specific language governing permissions and
23 * limitations under the License.
24 *
25 **********************************************************************
26 *
27 * @filename openapi_green_pwr_sav_history.h
28 *
29 * @purpose Green mode power savings history API
30 *
31 * @component OpEN
32 *
33 * @create 05/31/2023
34 *
35 * @end
36 *
37 **********************************************************************/
38 #ifndef _OPENAPI_GREEN_PWR_SAV_HISTORY_H_
39 #define _OPENAPI_GREEN_PWR_SAV_HISTORY_H_
40 
41 #include "openapi_common.h"
42 
43 typedef struct
44 {
45  uint16_t sampleNo;
46  uint32_t sampleTime;
47  uint16_t percentLpiTime;
49  void *nextEntry;
52 
53 /*****************************************************************/
69  uint32_t sampleInterval);
70 
71 /*****************************************************************/
87  uint32_t *sampleInterval);
88 
89 /*****************************************************************/
105  uint32_t maxSamples);
106 
107 /*****************************************************************/
123  uint32_t *maxSamples);
124 
125 /*****************************************************************/
146  uint32_t intIfNum,
148 
149 /*****************************************************************/
170 
171 /*****************************************************************/
190  uint32_t intIfNum,
191  uint16_t curSample,
193 
194 /**********************************************************************/
210  uint32_t intIfNum);
211 
212 #endif /* OPENAPI_GREEN_PWR_SAV_HISTORY_H */
213 
void * nextEntry
Pointer to next entry in the linked list.
open_error_t openapiGreenEthrEeeLpiHistoryIntfMaxSamplesGet(openapiClientHandle_t *client_handle, uint32_t *maxSamples)
Get green mode power saving history max samples to keep.
open_error_t openapiGreenEthrEeeLpiHistoryIntfSampleIntervalSet(openapiClientHandle_t *client_handle, uint32_t sampleInterval)
Set green mode power saving history sampling interval.
open_error_t
OPEN uses these enumerators to indicate the error codes.
uint16_t percentLpiTimeTotal
percentage of time spent in LPI mode since last reset
open_error_t openapix2GreenEthrPwrSavHistoryIntfNextSampleGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint16_t curSample, openGreenPwrHistoryIntfEntry_t *entry)
Get next entry of green mode power savings history on given interface with current sample number as i...
open_error_t openapix2GreenEthrPwrSavHistoryIntfNextEntryGet(openapiClientHandle_t *client_handle, openGreenPwrHistoryIntfEntry_t *entry)
Get next valid entry of green mode power savings history on given interface.
open_error_t openapiGreenEthrEeeLpiHistoryIntfSampleIntervalGet(openapiClientHandle_t *client_handle, uint32_t *sampleInterval)
Get green mode power saving history sampling interval.
open_error_t openapiGreenEthrEeeLpiHistoryIntfMaxSamplesSet(openapiClientHandle_t *client_handle, uint32_t maxSamples)
Set green mode power saving history max samples to keep.
uint32_t sampleTime
Time stamp at which the sample is collected.
open_error_t openapiGreenEthrPwrSavHistoryIntfStatisticsClear(openapiClientHandle_t *client_handle, uint32_t intIfNum)
Clear green mode power saving history statistics for the given interface.
open_error_t openapix2GreenEthrPwrSavHistoryIntfFirstEntryGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, openGreenPwrHistoryIntfEntry_t *entry)
Get first valid entry of green mode power savings history on given interface - latest sample first...
uint16_t percentLpiTime
percentage of time spent in LPI mode since last sample is taken