Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.11.1.2
openapi_poe.h
Go to the documentation of this file.
1 
9 /*********************************************************************
10 *
11 * Copyright 2016-2019 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_poe.h
28 *
29 * @purpose PoE Configuration and Status
30 *
31 * @component OpEN
32 *
33 * @create 11/05/2015
34 *
35 * @end
36 *
37 **********************************************************************/
38 #ifndef OPENAPI_POE_H_INCLUDED
39 #define OPENAPI_POE_H_INCLUDED
40 
41 #include "openapi_common.h"
42 
43 #define OPEN_POE_PORT_LIMIT_DOT3AF 15400
44 #define OPEN_TIMERANGE_NAME_LEN_MAX 32
45 
46 #define OPEN_MAX_POE_CARD_INFO_BUF_SIZE 128
47 #define OPEN_MAX_POE_TIMER_NAME_BUF_LEN 32
48 
50 typedef enum
51 {
61 
63 typedef enum
64 {
77 
79 typedef enum
80 {
91 
93 typedef enum
94 {
105 
107 typedef enum
108 {
113 
115 typedef enum
116 {
129 
130 typedef enum
131 {
140 
141 typedef enum
142 {
155 
156 typedef enum
157 {
165 
166 
168 typedef enum
169 {
177 
178 
179 /*****************************************************************/
195  OPEN_POE_TYPE_t poeType, uint32_t unit,
196  uint32_t *ifNum);
197 
198 /*****************************************************************/
212  uint32_t unit, OPEN_BOOL_t *isSupported);
213 
214 /*****************************************************************/
229  OPEN_POE_TYPE_t poeType, uint32_t ifNum,
230  OPEN_BOOL_t *isValid);
231 
232 /*****************************************************************/
249  uint32_t ifNum, OPEN_CONTROL_t *adminMode);
250 
251 /*****************************************************************/
268  uint32_t ifNum, OPEN_CONTROL_t adminMode);
269 
270 /*****************************************************************/
288  uint32_t unit, uint32_t ifNum,
289  uint32_t *powerClass);
290 
291 /*****************************************************************/
311  uint32_t unit, uint32_t ifNum, uint32_t *power,
312  uint32_t *current, uint32_t *voltage, uint32_t *temperature);
313 
314 /*****************************************************************/
336  uint32_t unit, uint32_t ifNum,
337  uint32_t *detectionStatus);
338 
339 /*****************************************************************/
354  uint32_t ifNum, uint32_t *errorCode);
355 
356 /*****************************************************************/
375  uint32_t ifNum, uint32_t *mpsAbsentCtr,
376  uint32_t *invalidSignatureCtr, uint32_t *powerDeniedCtr,
377  uint32_t *overloadCtr, uint32_t *shortCtr);
378 
379 /*****************************************************************/
400  uint32_t unit,
401  OPEN_POE_POWER_MGMT_t *mode);
402 
403 
404 /*****************************************************************/
421  uint32_t unit,
422  OPEN_POE_POWER_MGMT_t mode);
423 
424 /*****************************************************************/
441  uint32_t unit, uint32_t ifNum,
442  uint32_t *maxPowerLimit);
443 
444 /*****************************************************************/
458  uint32_t unit, OPEN_POE_DETECTION_t *detectionMode);
459 
460 /*****************************************************************/
474  uint32_t unit, OPEN_POE_DETECTION_t detectionMode);
475 
476 /*****************************************************************/
492  uint32_t unit, uint32_t ifNum,
493  uint32_t *powerLimit);
494 
495 /*****************************************************************/
513  uint32_t unit, uint32_t ifNum,
514  uint32_t powerLimit);
515 
516 /*****************************************************************/
532  uint32_t unit, uint32_t ifNum,
533  OPEN_POE_PRIORITY_t *powerPriority);
534 
535 /*****************************************************************/
551  uint32_t unit, uint32_t ifNum,
552  OPEN_POE_PRIORITY_t powerPriority);
553 
554 /*****************************************************************/
571  uint32_t unit, uint32_t ifNum,
572  OPEN_POE_DETECTION_t *detectionMode);
573 
574 /*****************************************************************/
591  uint32_t unit, uint32_t ifNum,
592  OPEN_POE_DETECTION_t detectionMode);
593 
594 /*****************************************************************/
611  uint32_t unit, uint32_t ifNum,
612  OPEN_CONTROL_t *highPowerMode);
613 
614 /*****************************************************************/
631  uint32_t unit, uint32_t ifNum,
632  OPEN_CONTROL_t highPowerMode);
633 
634 /*****************************************************************/
651  uint32_t unit, uint32_t ifNum,
652  OPEN_POE_POWER_UP_MODE_t *powerUpMode);
653 
654 /*****************************************************************/
671  uint32_t unit, uint32_t ifNum,
672  OPEN_POE_POWER_UP_MODE_t powerUpMode);
673 
674 /*****************************************************************/
691  uint32_t unit, uint32_t ifNum,
692  OPEN_POE_LIMIT_TYPE_t *violationType);
693 
694 /*****************************************************************/
711  uint32_t unit, uint32_t ifNum,
712  OPEN_POE_LIMIT_TYPE_t violationType);
713 
714 /*****************************************************************/
728  uint32_t unit, uint32_t *threshold);
729 
730 /*****************************************************************/
746  uint32_t unit, uint32_t threshold);
747 
748 /*****************************************************************/
763  uint32_t unit,
764  uint32_t *power);
765 
766 /*****************************************************************/
783  uint32_t unit, open_buffdesc *version);
784 
785 /*****************************************************************/
800  uint32_t unit,
802 
803 /*****************************************************************/
820  uint32_t unit,
821  uint32_t *power);
822 
823 /*****************************************************************/
840  uint32_t unit,
841  uint32_t *power);
842 
843 /*****************************************************************/
858  uint32_t unit, OPEN_CONTROL_t *enabled);
859 
860 /*****************************************************************/
878  uint32_t unit, uint32_t ifNum,
879  open_buffdesc *timerName);
880 
881 /*****************************************************************/
900  uint32_t unit, uint32_t ifNum,
901  open_buffdesc *timerName);
902 
903 /*****************************************************************/
918  uint32_t unit, uint32_t ifNum);
919 
920 /*****************************************************************/
934  uint32_t unit);
935 
936 /*****************************************************************/
951  uint32_t unit, OPEN_CONTROL_t adminMode);
952 
953 /*****************************************************************/
968  uint32_t unit, OPEN_CONTROL_t enabled);
969 
970 /*****************************************************************/
986  uint32_t unit, OPEN_POE_PRIORITY_t powerPriority);
987 
988 /*****************************************************************/
1005  uint32_t unit, uint32_t powerLimit);
1006 
1007 /*****************************************************************/
1022  uint32_t ifNum);
1023 
1024 /*****************************************************************/
1040  uint32_t unit, uint32_t ifNum,
1041  OPEN_CONTROL_t *highPower);
1042 
1043 #endif
1044 
Static with Port Priority.
Definition: openapi_poe.h:173
open_error_t openapiPoePsePortHighPowerModeSet(openapiClientHandle_t *client_handle, uint32_t unit, uint32_t ifNum, OPEN_CONTROL_t highPowerMode)
Sets interface ability to provide POE high power.
OPEN_POE_SYSTEM_OPER_STATUS_t
PoE main operational status code.
Definition: openapi_poe.h:107
open_error_t openapiPoePseMainDetectionModeGet(openapiClientHandle_t *client_handle, uint32_t unit, OPEN_POE_DETECTION_t *detectionMode)
Gets detection mode of a given unit.
open_error_t openapiPoePsePortSensorsGet(openapiClientHandle_t *client_handle, uint32_t unit, uint32_t ifNum, uint32_t *power, uint32_t *current, uint32_t *voltage, uint32_t *temperature)
Gets Interface port output power, current(milliamp), voltage drawn by device and temperature(degree c...
open_error_t openapiPoeFirstInterfaceGet(openapiClientHandle_t *client_handle, OPEN_POE_TYPE_t poeType, uint32_t unit, uint32_t *ifNum)
Get the PoE first interface number.
open_error_t openapiPoePsePortPowerUpModeGet(openapiClientHandle_t *client_handle, uint32_t unit, uint32_t ifNum, OPEN_POE_POWER_UP_MODE_t *powerUpMode)
Gets interface ability of power up.
open_error_t openapiPoePsePortDetectionStatusGet(openapiClientHandle_t *client_handle, uint32_t unit, uint32_t ifNum, uint32_t *detectionStatus)
Gets operational status of the port PD detection.
Uses 802.3af inrush , switch to 802.3at inrush immediately with out LLDP.
Definition: openapi_poe.h:146
OPEN_POE_PORT_DETECTION_STATUS_t
PoE port detection status.
Definition: openapi_poe.h:79
open_error_t openapiPoePsePortAdminEnableSet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_CONTROL_t adminMode)
Sets an interface's POE administrative mode.
OPEN_POE_DETECTION_t
PoE detection mode.
Definition: openapi_poe.h:115
Dynamic with Port Priority.
Definition: openapi_poe.h:174
open_error_t
OPEN uses these enumerators to indicate the error codes.
open_error_t openapiPoePsePortDetectionModeSet(openapiClientHandle_t *client_handle, uint32_t unit, uint32_t ifNum, OPEN_POE_DETECTION_t detectionMode)
Sets port detection mode on a given interface.
open_error_t openapiPoePseMainConsumptionPowerGet(openapiClientHandle_t *client_handle, uint32_t unit, uint32_t *power)
Get the total power consumed for a unit.
Type3 Power Up Mode.
Definition: openapi_poe.h:150
open_error_t openapiPoePsePortHighPowerModeGet(openapiClientHandle_t *client_handle, uint32_t unit, uint32_t ifNum, OPEN_CONTROL_t *highPowerMode)
Gets interface ability to provide POE high power.
open_error_t openapiPoePsePortHighPowerGet(openapiClientHandle_t *client_handle, uint32_t unit, uint32_t ifNum, OPEN_CONTROL_t *highPower)
Gets interface ability to provide POE high power.
open_error_t openapiPoePsePortCountersGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *mpsAbsentCtr, uint32_t *invalidSignatureCtr, uint32_t *powerDeniedCtr, uint32_t *overloadCtr, uint32_t *shortCtr)
Gets all counters of PSE state machine.
open_error_t openapiPoePsePortViolationTypeGet(openapiClientHandle_t *client_handle, uint32_t unit, uint32_t ifNum, OPEN_POE_LIMIT_TYPE_t *violationType)
Gets violation type of a given interface.
open_error_t openapiPoePsePortReset(openapiClientHandle_t *client_handle, uint32_t unit, uint32_t ifNum)
Reset PoE on a given interface.
open_error_t openapiPoePsePortCurPowerLimitSet(openapiClientHandle_t *client_handle, uint32_t unit, uint32_t ifNum, uint32_t powerLimit)
Sets the current watt limit the PSE can deliver to a port.
open_error_t openapiPoePsePortDetectionModeGet(openapiClientHandle_t *client_handle, uint32_t unit, uint32_t ifNum, OPEN_POE_DETECTION_t *detectionMode)
Gets port detection mode of a given interface.
OPEN_POE_PORT_POWER_CLASS_t
PoE port power class.
Definition: openapi_poe.h:63
open_error_t openapiPoePseMainPowerMgmtModeSet(openapiClientHandle_t *client_handle, uint32_t unit, OPEN_POE_POWER_MGMT_t mode)
Set the power management mode of the unit.
open_error_t openapiPoePseMainReset(openapiClientHandle_t *client_handle, uint32_t unit)
Reset PoE on all interfaces.
open_error_t openapiPoePsePortPowerUpModeSet(openapiClientHandle_t *client_handle, uint32_t unit, uint32_t ifNum, OPEN_POE_POWER_UP_MODE_t powerUpMode)
Sets interface ability of power up.
open_error_t openapiPoePseThresholdPowerGet(openapiClientHandle_t *client_handle, uint32_t unit, uint32_t *power)
Obtain threshold power.
open_error_t openapiPoeFWImageVersionGet(openapiClientHandle_t *client_handle, uint32_t unit, open_buffdesc *version)
Obtain POE Firmware Version.
open_error_t openapiPoePsePortCurPowerLimitGet(openapiClientHandle_t *client_handle, uint32_t unit, uint32_t ifNum, uint32_t *powerLimit)
Gets the current watt limit the PSE can deliver to a port.
open_error_t openapiPoePseMainUsageThresholdGet(openapiClientHandle_t *client_handle, uint32_t unit, uint32_t *threshold)
Gets usage threshold in percent.
Cisco UPOE standard.
Definition: openapi_poe.h:148
open_error_t openapiPoePsePortCurPowerPrioritySet(openapiClientHandle_t *client_handle, uint32_t unit, uint32_t ifNum, OPEN_POE_PRIORITY_t powerPriority)
Sets interface port priority value used in management algorithm.
open_error_t openapiPoeTrapModeGet(openapiClientHandle_t *client_handle, uint32_t unit, OPEN_CONTROL_t *enabled)
Determine if POE Trap Mode is enabled.
open_error_t openapiPoeIsValidInterface(openapiClientHandle_t *client_handle, OPEN_POE_TYPE_t poeType, uint32_t ifNum, OPEN_BOOL_t *isValid)
Determine if the interface is capable of supporting PoE.
open_error_t openapiPoeTrapModeSet(openapiClientHandle_t *client_handle, uint32_t unit, OPEN_CONTROL_t enabled)
Sets POE Trap Mode.
open_error_t openapiPoePsePortPowerClassificationsGet(openapiClientHandle_t *client_handle, uint32_t unit, uint32_t ifNum, uint32_t *powerClass)
Gets interface port terminal classification, eg.
OPEN_CONTROL_t
OPEN uses these enumerators to indicate enable or disable for a given config or status parameter...
open_error_t openapiPoeIsSupported(openapiClientHandle_t *client_handle, uint32_t unit, OPEN_BOOL_t *isSupported)
Check to see if PoE is supported on this platform.
open_error_t openapiPoePsePortAdminEnableGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_CONTROL_t *adminMode)
Gets an interface's POE administrative mode.
OPEN_BOOL_t
OPEN uses these enumerators to indicate true or false for a given config or status parameter...
open_error_t openapiPoePsePortTimerScheduleNameGet(openapiClientHandle_t *client_handle, uint32_t unit, uint32_t ifNum, open_buffdesc *timerName)
Get timer schedule name for a given interface.
open_error_t openapiPoePseMainCurPowerPrioritySet(openapiClientHandle_t *client_handle, uint32_t unit, OPEN_POE_PRIORITY_t powerPriority)
Sets port priority value used in management algorithm on all interfaces.
open_error_t openapiPoePethPsePortTimerCtrlClear(openapiClientHandle_t *client_handle, uint32_t ifNum)
Clear timer schedule association for the port.
OPEN_POE_POWER_UP_MODE_t
Definition: openapi_poe.h:141
open_error_t openapiPoePseMainCurPowerLimitSet(openapiClientHandle_t *client_handle, uint32_t unit, uint32_t powerLimit)
Sets the current watt limit the PSE can deliver on all interfaces.
OPEN_POE_LIMIT_TYPE_t
Definition: openapi_poe.h:156
OPEN_POE_TYPE_t
PoE types.
Definition: openapi_poe.h:50
open_error_t openapiPoePseMainDetectionModeSet(openapiClientHandle_t *client_handle, uint32_t unit, OPEN_POE_DETECTION_t detectionMode)
Sets detection mode of a given unit.
open_error_t openapiPoePseTotalAvailablePowerGet(openapiClientHandle_t *client_handle, uint32_t unit, uint32_t *power)
Obtain total available power.
open_error_t openapiPoePseMainUsageThresholdSet(openapiClientHandle_t *client_handle, uint32_t unit, uint32_t threshold)
Sets usage threshold in percent.
open_error_t openapiPoePseMainPowerMgmtModeGet(openapiClientHandle_t *client_handle, uint32_t unit, OPEN_POE_POWER_MGMT_t *mode)
Get the power management mode of the unit.
open_error_t openapiPoePsePortTimerScheduleNameSet(openapiClientHandle_t *client_handle, uint32_t unit, uint32_t ifNum, open_buffdesc *timerName)
Sets the timer schedule name for a given interface.
open_error_t openapiPoePsePortErrorCodeGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *errorCode)
Gets Interface port error code.
open_error_t openapiPoeFindMaxPowerLimit(openapiClientHandle_t *client_handle, uint32_t unit, uint32_t ifNum, uint32_t *maxPowerLimit)
Find max power limit based on PoE/PoE+/UPoE for given unit and interface number.
Legacy PD's requiring high inrush current > 400mA.
Definition: openapi_poe.h:145
open_error_t openapiPoePseMainAdminEnableSet(openapiClientHandle_t *client_handle, uint32_t unit, OPEN_CONTROL_t adminMode)
Sets global POE administrative mode .
OPEN_POE_PRIORITY_t
Definition: openapi_poe.h:130
open_error_t openapiPoePsePortCurPowerPriorityGet(openapiClientHandle_t *client_handle, uint32_t unit, uint32_t ifNum, OPEN_POE_PRIORITY_t *powerPriority)
Gets interface port priority value used in management algorithm.
OPEN_POE_PORT_FAULT_STATUS_t
PoE port error code.
Definition: openapi_poe.h:93
open_error_t openapiPoePsePortViolationTypeSet(openapiClientHandle_t *client_handle, uint32_t unit, uint32_t ifNum, OPEN_POE_LIMIT_TYPE_t violationType)
Sets violation type on a given interface.
OPEN_POE_POWER_MGMT_t
PoE Mgmt Mode.
Definition: openapi_poe.h:168
Dynamic without Port Priority.
Definition: openapi_poe.h:172
open_error_t openapiPoePseMainOperStatusGet(openapiClientHandle_t *client_handle, uint32_t unit, OPEN_POE_SYSTEM_OPER_STATUS_t *status)
Obtain PSE Main Operational Status.
Static without Port Priority.
Definition: openapi_poe.h:171