Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
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 {
60 
62 typedef enum
63 {
72 
74 typedef enum
75 {
86 
88 typedef enum
89 {
100 
102 typedef enum
103 {
108 
110 typedef enum
111 {
122 
123 typedef enum
124 {
133 
134 typedef enum
135 {
145 
146 typedef enum
147 {
155 
156 
158 typedef enum
159 {
167 
168 
169 /*****************************************************************/
185  OPEN_POE_TYPE_t poeType, uint32_t unit,
186  uint32_t *ifNum);
187 
188 /*****************************************************************/
202  uint32_t unit, OPEN_BOOL_t *isSupported);
203 
204 /*****************************************************************/
219  OPEN_POE_TYPE_t poeType, uint32_t ifNum,
220  OPEN_BOOL_t *isValid);
221 
222 /*****************************************************************/
239  uint32_t ifNum, OPEN_CONTROL_t *adminMode);
240 
241 /*****************************************************************/
258  uint32_t ifNum, OPEN_CONTROL_t adminMode);
259 
260 /*****************************************************************/
278  uint32_t unit, uint32_t ifNum,
279  uint32_t *powerClass);
280 
281 /*****************************************************************/
301  uint32_t unit, uint32_t ifNum, uint32_t *power,
302  uint32_t *current, uint32_t *voltage, uint32_t *temperature);
303 
304 /*****************************************************************/
326  uint32_t unit, uint32_t ifNum,
327  uint32_t *detectionStatus);
328 
329 /*****************************************************************/
344  uint32_t ifNum, uint32_t *errorCode);
345 
346 /*****************************************************************/
365  uint32_t ifNum, uint32_t *mpsAbsentCtr,
366  uint32_t *invalidSignatureCtr, uint32_t *powerDeniedCtr,
367  uint32_t *overloadCtr, uint32_t *shortCtr);
368 
369 /*****************************************************************/
390  uint32_t unit,
391  OPEN_POE_POWER_MGMT_t *mode);
392 
393 
394 /*****************************************************************/
411  uint32_t unit,
412  OPEN_POE_POWER_MGMT_t mode);
413 
414 /*****************************************************************/
431  uint32_t unit, uint32_t ifNum,
432  uint32_t *maxPowerLimit);
433 
434 /*****************************************************************/
448  uint32_t unit, OPEN_POE_DETECTION_t *detectionMode);
449 
450 /*****************************************************************/
464  uint32_t unit, OPEN_POE_DETECTION_t detectionMode);
465 
466 /*****************************************************************/
482  uint32_t unit, uint32_t ifNum,
483  uint32_t *powerLimit);
484 
485 /*****************************************************************/
503  uint32_t unit, uint32_t ifNum,
504  uint32_t powerLimit);
505 
506 /*****************************************************************/
522  uint32_t unit, uint32_t ifNum,
523  OPEN_POE_PRIORITY_t *powerPriority);
524 
525 /*****************************************************************/
541  uint32_t unit, uint32_t ifNum,
542  OPEN_POE_PRIORITY_t powerPriority);
543 
544 /*****************************************************************/
561  uint32_t unit, uint32_t ifNum,
562  OPEN_POE_DETECTION_t *detectionMode);
563 
564 /*****************************************************************/
581  uint32_t unit, uint32_t ifNum,
582  OPEN_POE_DETECTION_t detectionMode);
583 
584 /*****************************************************************/
601  uint32_t unit, uint32_t ifNum,
602  OPEN_CONTROL_t *highPowerMode);
603 
604 /*****************************************************************/
621  uint32_t unit, uint32_t ifNum,
622  OPEN_CONTROL_t highPowerMode);
623 
624 /*****************************************************************/
641  uint32_t unit, uint32_t ifNum,
642  OPEN_POE_POWER_UP_MODE_t *powerUpMode);
643 
644 /*****************************************************************/
661  uint32_t unit, uint32_t ifNum,
662  OPEN_POE_POWER_UP_MODE_t powerUpMode);
663 
664 /*****************************************************************/
681  uint32_t unit, uint32_t ifNum,
682  OPEN_POE_LIMIT_TYPE_t *violationType);
683 
684 /*****************************************************************/
701  uint32_t unit, uint32_t ifNum,
702  OPEN_POE_LIMIT_TYPE_t violationType);
703 
704 /*****************************************************************/
718  uint32_t unit, uint32_t *threshold);
719 
720 /*****************************************************************/
736  uint32_t unit, uint32_t threshold);
737 
738 /*****************************************************************/
753  uint32_t unit,
754  uint32_t *power);
755 
756 /*****************************************************************/
773  uint32_t unit, open_buffdesc *version);
774 
775 /*****************************************************************/
790  uint32_t unit,
792 
793 /*****************************************************************/
810  uint32_t unit,
811  uint32_t *power);
812 
813 /*****************************************************************/
830  uint32_t unit,
831  uint32_t *power);
832 
833 /*****************************************************************/
848  uint32_t unit, OPEN_CONTROL_t *enabled);
849 
850 /*****************************************************************/
868  uint32_t unit, uint32_t ifNum,
869  open_buffdesc *timerName);
870 
871 /*****************************************************************/
890  uint32_t unit, uint32_t ifNum,
891  open_buffdesc *timerName);
892 
893 /*****************************************************************/
908  uint32_t unit, uint32_t ifNum);
909 
910 /*****************************************************************/
924  uint32_t unit);
925 
926 /*****************************************************************/
941  uint32_t unit, OPEN_CONTROL_t adminMode);
942 
943 /*****************************************************************/
958  uint32_t unit, OPEN_CONTROL_t enabled);
959 
960 /*****************************************************************/
976  uint32_t unit, OPEN_POE_PRIORITY_t powerPriority);
977 
978 /*****************************************************************/
995  uint32_t unit, uint32_t powerLimit);
996 
997 /*****************************************************************/
1012  uint32_t ifNum);
1013 
1014 /*****************************************************************/
1030  uint32_t unit, uint32_t ifNum,
1031  OPEN_CONTROL_t *highPower);
1032 
1033 #endif
1034 
Static with Port Priority.
Definition: openapi_poe.h:163
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:102
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:139
OPEN_POE_PORT_DETECTION_STATUS_t
PoE port detection status.
Definition: openapi_poe.h:74
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:110
Dynamic with Port Priority.
Definition: openapi_poe.h:164
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.
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:62
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:141
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:134
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:146
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:138
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:123
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:88
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:158
Dynamic without Port Priority.
Definition: openapi_poe.h:162
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:161