Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.11.1.2
openapi_boxs.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_boxs.h
28 *
29 * @purpose Box Services Configuration and Status
30 *
31 * @component OPEN
32 *
33 * @create 11/09/2012
34 *
35 * @end
36 *
37 **********************************************************************/
38 #ifndef OPENAPI_BOXS_H_INCLUDED
39 #define OPENAPI_BOXS_H_INCLUDED
40 
41 #include "openapi_common.h"
42 
44 typedef enum
45 {
46  OPEN_ITEMSTATE_NONE = 0, /* N/A */
47  OPEN_ITEMSTATE_NOT_PRESENT = 1,
48  OPEN_ITEMSTATE_OPERATIONAL = 2,
49  OPEN_ITEMSTATE_FAILED = 3,
50  OPEN_ITEMSTATE_POWERING = 4,
51  OPEN_ITEMSTATE_NOPOWER = 5,
52  OPEN_ITEMSTATE_NOT_POWERING = 6,
53  OPEN_ITEMSTATE_INCOMPATIBLE = 7, /* This state is possible on boards capable of pluggable Power supplies */
54  OPEN_ITEMSTATE_WARNING = 8,
55  OPEN_ITEMSTATE_PRESENT = 9 /* Added for detecting Xcvr inserted state */
57 
59 typedef enum
60 {
61  OPEN_TEMPSENSOR_STATE_NONE = 0, /* N/A */
62  OPEN_TEMPSENSOR_STATE_LOW = 1,
63  OPEN_TEMPSENSOR_STATE_NORMAL = 2,
64  OPEN_TEMPSENSOR_STATE_WARNING = 3,
65  OPEN_TEMPSENSOR_STATE_CRITICAL = 4,
66  OPEN_TEMPSENSOR_STATE_SHUTDOWN = 5,
67  OPEN_TEMPSENSOR_STATE_NOTPRESENT = 6,
68  OPEN_TEMPSENSOR_STATE_NOTOPERATIONAL = 7
70 
72 typedef enum
73 {
74  OPEN_TYPE_NONE = 0, /* N/A */
75  OPEN_TYPE_FIXED = 1,
76  OPEN_TYPE_REMOVABLE = 2
78 
79 typedef enum
80 {
93 
94 typedef enum
95 {
96  OPEN_LED_CMD_OFF = 0,
97  OPEN_LED_CMD_ON = 1
98 }OPEN_LED_CMD_t;
99 
100 typedef enum
101 {
102  OPEN_LED_STATUS_OFF = 0,
103  OPEN_LED_STATUS_ON = 1
104 }OPEN_LED_STATUS_t;
105 
106 #define OPEN_BXS_STR_BUFFER_SIZE 128
108 /******************************************************************************/
131 open_error_t openapiFiberPortsOpticsFaultStatusGet(openapiClientHandle_t *client_handle, uint32_t ifNum,
132  uint32_t *localFaultStatus, uint32_t *remoteFaultStatus);
133 
134 /******************************************************************************/
161 open_error_t openapiFiberPortsOpticsGet(openapiClientHandle_t *client_handle, uint32_t ifNum,
162  uint32_t *temperature, uint32_t *voltage, uint32_t *current,
163  uint64_t *powerIn, uint64_t *powerOut,
164  OPEN_BOOL_t *txFault, OPEN_BOOL_t *los);
165 
166 /******************************************************************************/
198 open_error_t openapiFiberPortsLaneOpticsGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t lane,
199  uint32_t *temperature, uint32_t *voltage, uint32_t *current,
200  open_buffdesc *powerIn, open_buffdesc *powerOut,
201  OPEN_BOOL_t *txFault, OPEN_BOOL_t *los);
202 
203 /*****************************************************************/
224  uint32_t ifNum, OPEN_BOOL_t *present);
225 
226 /*****************************************************************/
241  uint32_t * genFanSpeed);
242 
243 /*****************************************************************/
258  uint32_t * genFanDutyLevel);
259 
260 /******************************************************************************/
275  uint32_t * numFans);
276 
277 /*****************************************************************/
293  uint32_t fanNum, uint32_t * fanSpeed);
294 
295 
296 /*****************************************************************/
312  uint32_t fanNum,
313  OPEN_BOXS_ITEM_STATE_t * fanState);
314 
315 /*****************************************************************/
331  uint32_t fanNum,
332  OPEN_BOXS_ITEM_TYPE_t * fanType);
333 
334 /*****************************************************************/
350  uint32_t fanNum, uint32_t * fanDuty);
351 
352 /*****************************************************************************************/
366  client_handle,
367  uint32_t * descripSize);
368 
369 /*****************************************************************************************/
387  client_handle,
388  uint32_t fanNum,
389  open_buffdesc * descrip);
390 
391 /*****************************************************************/
406  client_handle,
407  uint32_t * numPowSuplies);
408 
409 /*****************************************************************/
425  client_handle, uint32_t psNo,
426  OPEN_BOXS_ITEM_STATE_t * psState);
427 
428 /*****************************************************************/
444  client_handle, uint32_t psNo,
445  OPEN_BOXS_ITEM_TYPE_t * psType);
446 
447 /*****************************************************************************************/
461  client_handle,
462  uint32_t * descripSize);
463 
464 /*****************************************************************************************/
482  client_handle,
483  uint32_t psNum,
484  open_buffdesc * descrip);
485 
486 /*****************************************************************/
502  client_handle,
503  uint32_t * minTemp,
504  uint32_t * maxTemp);
505 
506 /************************************************************************************/
521  client_handle,
522  uint32_t * genTemp);
523 
524 /*****************************************************************/
539  client_handle,
540  uint32_t * numOfTempSemsors);
541 
542 /*****************************************************************************************/
557  client_handle,
558  uint32_t * descripSize);
559 
560 /*****************************************************************************************/
578  client_handle,
579  uint32_t sensorNum,
580  open_buffdesc * descrip);
581 
582 /************************************************************************************/
596  uint32_t sensorNum, uint32_t * temperature);
597 
598 /*****************************************************************/
613  client_handle, uint32_t sensorNum,
615  state);
616 
617 /*******************************************************************************/
633  client_handle,
634  uint32_t sensorNum,
635  uint32_t * maxTemperature);
636 
637 /*****************************************************************/
652  uint32_t ifNum, OPEN_SFP_MODULE_TYPE_t *moduleType);
653 
654 /*****************************************************************/
673  uint32_t ifNum, open_buffdesc *vendorNameDesc);
674 
675 /*****************************************************************/
694  uint32_t ifNum, open_buffdesc *serialNumberDesc);
695 
696 /*****************************************************************/
715  uint32_t ifNum, open_buffdesc *partNumberDesc);
716 
717 
718 /*****************************************************************/
736  uint32_t ifNum, open_buffdesc *vendorRevDesc);
737 
738 /*****************************************************************/
754  uint32_t ifNum, uint32_t *linkLength50um);
755 
756 /*****************************************************************/
772  uint32_t ifNum, uint32_t *linkLength62_5um);
773 
774 /*****************************************************************/
791  uint32_t ifNum, uint32_t *nominalSigRate);
792 
793 /*****************************************************************/
812  uint32_t ifNum, open_buffdesc *complianceDesc);
813 
814 /*****************************************************************/
827  uint32_t *vendorNameSize);
828 
829 /*****************************************************************/
842  uint32_t *serialNumberSize);
843 
844 /*****************************************************************/
857  uint32_t *partNumberSize);
858 
859 /*****************************************************************/
872  uint32_t *vendorRevSize);
873 
874 /*****************************************************************/
887  uint32_t *complianceSize);
888 
889 /*****************************************************************/
902 
903 /*****************************************************************/
918  uint32_t interface,
919  OPEN_CONTROL_t enable);
920 
921 /*****************************************************************/
939  open_buffdesc *cpldVersion);
940 
941 /******************************************************************************/
955  uint32_t *version);
956 
957 /*****************************************************************/
974  OPEN_LED_CMD_t val);
975 
976 /*****************************************************************/
992  OPEN_LED_STATUS_t *val);
993 
994 /*****************************************************************/
1011  OPEN_LED_CMD_t val);
1012 
1013 /*****************************************************************/
1029  OPEN_LED_STATUS_t *val);
1030 #endif /* OPENAPI_BOXS_H_INCLUDED */
1031 
open_error_t openapiBoxsSfpPartNumberGet(openapiClientHandle_t *client_handle, uint32_t ifNum, open_buffdesc *partNumberDesc)
Gets the SFP transceiver part number.
open_error_t openapiBoxsTempRangeGet(openapiClientHandle_t *client_handle, uint32_t *minTemp, uint32_t *maxTemp)
Gets allowed temperature range for normal operation.
open_error_t openapiBoxsFanDutyCycleGet(openapiClientHandle_t *client_handle, uint32_t fanNum, uint32_t *fanDuty)
Gets the duty-cycle of a given fan number.
OPEN_SFP_MODULE_TYPE_t
Definition: openapi_boxs.h:79
open_error_t openapiBoxsFanTypeGet(openapiClientHandle_t *client_handle, uint32_t fanNum, OPEN_BOXS_ITEM_TYPE_t *fanType)
Gets the type of a given fan number.
open_error_t openapiBoxsTempSensorStatusGet(openapiClientHandle_t *client_handle, uint32_t sensorNum, OPEN_BOXS_TEMPSENSOR_STATE_t *state)
Gets the state of a given temperature sensor.
open_error_t openapiBoxsTempSensorDescripGet(openapiClientHandle_t *client_handle, uint32_t sensorNum, open_buffdesc *descrip)
Gets the description of a given temperature sensor.
OPEN_BOXS_TEMPSENSOR_STATE_t
Item state definition - for thermal sensors.
Definition: openapi_boxs.h:59
open_error_t openapiBoxsFanDescripSizeGet(openapiClientHandle_t *client_handle, uint32_t *descripSize)
Gets the maximum size for the fan description.
open_error_t openapiFiberPortsOpticsGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *temperature, uint32_t *voltage, uint32_t *current, uint64_t *powerIn, uint64_t *powerOut, OPEN_BOOL_t *txFault, OPEN_BOOL_t *los)
Get the diagnostic data for fiber ports optical transceiver.
open_error_t openapiBoxsSfpSerialNumberSizeGet(openapiClientHandle_t *client_handle, uint32_t *serialNumberSize)
Gets the size of serial number of SFP transceiver.
open_error_t openapiBoxsSfpVendorNameSizeGet(openapiClientHandle_t *client_handle, uint32_t *vendorNameSize)
Gets the size if vendor name of SFP transceiver.
open_error_t openapiBoxsSfpPartNumberSizeGet(openapiClientHandle_t *client_handle, uint32_t *partNumberSize)
Gets the size of part number of SFP transceiver.
open_error_t
OPEN uses these enumerators to indicate the error codes.
open_error_t openapiBoxsSfpLinkLength62_5umGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *linkLength62_5um)
Gets the Link Length(62_5um) of SFP transceiver.
open_error_t openapiBoxsPortLedsModeGet(openapiClientHandle_t *client_handle, OPEN_LED_STATUS_t *val)
Gets port and PoE LED status on the given interface(s).
open_error_t openapiBoxsSfpNominalSignalRate(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *nominalSigRate)
Gets the Nominal Signal Rate of SFP transceiver.
SFP+ plugin module, AX743.
Definition: openapi_boxs.h:88
open_error_t openapiBoxsiGeneralFanDutyLevelGet(openapiClientHandle_t *client_handle, uint32_t *genFanDutyLevel)
Gets the general fan duty-level.
open_error_t openapiPortLocatorInterfaceEnable(openapiClientHandle_t *client_handle, uint32_t interface, OPEN_CONTROL_t enable)
enable or disable port locator on an interface
open_error_t openapiBoxsTempGet(openapiClientHandle_t *client_handle, uint32_t sensorNum, uint32_t *temperature)
Gets the temperature value read by the given temperature sensor.
open_error_t openapiBoxsPortLedsModeSet(openapiClientHandle_t *client_handle, OPEN_LED_CMD_t val)
Turns on/off port and PoE LEDs on the given interface(s).
open_error_t openapiPortLocatorGlobalDisable(openapiClientHandle_t *client_handle)
Disables port locator globally.
CX4 plugin module, AX744.
Definition: openapi_boxs.h:89
open_error_t openapiBoxsPowSupplyDescripGet(openapiClientHandle_t *client_handle, uint32_t psNum, open_buffdesc *descrip)
Gets the description of a given power supply.
open_error_t openapiBoxsPowSupplyTypeGet(openapiClientHandle_t *client_handle, uint32_t psNo, OPEN_BOXS_ITEM_TYPE_t *psType)
Gets the type of a given power supply.
open_error_t openapiBoxsTempSensorDescripSizeGet(openapiClientHandle_t *client_handle, uint32_t *descripSize)
Gets the maximum size for the temperature sensor description.
open_error_t openapiBoxsHwVersionGet(openapiClientHandle_t *client_handle, uint32_t *version)
Gets the board revision number on the unit.
open_error_t openapiBoxsSystemLedModeSet(openapiClientHandle_t *client_handle, OPEN_LED_CMD_t val)
Turns on/off system LEDs.
XFP, AX741, 10G plugin module.
Definition: openapi_boxs.h:86
open_error_t openapiBoxsPowSupplyStateGet(openapiClientHandle_t *client_handle, uint32_t psNo, OPEN_BOXS_ITEM_STATE_t *psState)
Gets the status of a given power supply.
open_error_t openapiCpldVersionGet(openapiClientHandle_t *client_handle, open_buffdesc *cpldVersion)
Get the CPLD version of the system.
open_error_t openapiBoxsSfpComplianceSizeGet(openapiClientHandle_t *client_handle, uint32_t *complianceSize)
Gets the size of compliance of SFP transceiver.
open_error_t openapiBoxsFanDescripGet(openapiClientHandle_t *client_handle, uint32_t fanNum, open_buffdesc *descrip)
Gets the description of a given fan.
open_error_t openapiBoxsNumOfPowSuppliesGet(openapiClientHandle_t *client_handle, uint32_t *numPowSuplies)
Gets the maximum number of power supplies in the unit.
open_error_t openapiBoxsNumOfFansGet(openapiClientHandle_t *client_handle, uint32_t *numFans)
Gets the maximum number of FANs on the unit.
OPEN_CONTROL_t
OPEN uses these enumerators to indicate enable or disable for a given config or status parameter...
open_error_t openapiBoxsPowSupplyDescripSizeGet(openapiClientHandle_t *client_handle, uint32_t *descripSize)
Gets the maximum size for the power supply description.
open_error_t openapiBoxsSfpVendorRevSizeGet(openapiClientHandle_t *client_handle, uint32_t *vendorRevSize)
Gets the size of vendor revision of SFP transceiver.
open_error_t openapiBoxsSfpLinkLength50umGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *linkLength50um)
Gets the Link Length(50um) of SFP transceiver.
open_error_t openapiBoxsSystemLedModeGet(openapiClientHandle_t *client_handle, OPEN_LED_STATUS_t *val)
Gets system LED status.
OPEN_BOOL_t
OPEN uses these enumerators to indicate true or false for a given config or status parameter...
Copper 10G plugin module, AX745.
Definition: openapi_boxs.h:90
Stacking module, AX742.
Definition: openapi_boxs.h:87
open_error_t openapiBoxsSfpTypeGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_SFP_MODULE_TYPE_t *moduleType)
Gets the SFP module type.
open_error_t openapiBoxsNumOfTempSensorsGet(openapiClientHandle_t *client_handle, uint32_t *numOfTempSemsors)
Gets the maximum number of temperature sensors in the unit.
open_error_t openapiFiberPortsTransceiverPresenceGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_BOOL_t *present)
Get the transceiver presence status for fiber ports.
open_error_t openapiBoxsTempSensorMaxTempGet(openapiClientHandle_t *client_handle, uint32_t sensorNum, uint32_t *maxTemperature)
Gets the maximum temperature of a given temperature sensor.
open_error_t openapiBoxsSfpComplianceGet(openapiClientHandle_t *client_handle, uint32_t ifNum, open_buffdesc *complianceDesc)
Gets the compliance of SFP transceiver.
open_error_t openapiBoxsGeneralTempGet(openapiClientHandle_t *client_handle, uint32_t *genTemp)
Gets the general temperature of the system.
open_error_t openapiBoxsiGeneralFanSpeedGet(openapiClientHandle_t *client_handle, uint32_t *genFanSpeed)
Gets the general fan speed.
open_error_t openapiBoxsSfpVendorRevisionGet(openapiClientHandle_t *client_handle, uint32_t ifNum, open_buffdesc *vendorRevDesc)
Gets the SFP transceiver vendor revision number.
OPEN_BOXS_ITEM_STATE_t
Item state definition - for power supplies and fans.
Definition: openapi_boxs.h:44
OPEN_BOXS_ITEM_TYPE_t
Item type definitions.
Definition: openapi_boxs.h:72
open_error_t openapiBoxsSfpVendorNameGet(openapiClientHandle_t *client_handle, uint32_t ifNum, open_buffdesc *vendorNameDesc)
Gets the SFP transceiver vendor name.
Direct Attach Cable.
Definition: openapi_boxs.h:85
open_error_t openapiBoxsSfpSerialNumberGet(openapiClientHandle_t *client_handle, uint32_t ifNum, open_buffdesc *serialNumberDesc)
Gets the SFP transceiver serial number.
open_error_t openapiFiberPortsLaneOpticsGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t lane, uint32_t *temperature, uint32_t *voltage, uint32_t *current, open_buffdesc *powerIn, open_buffdesc *powerOut, OPEN_BOOL_t *txFault, OPEN_BOOL_t *los)
Test the fiber cable and return information on a per lane basis.
open_error_t openapiBoxsFanStateGet(openapiClientHandle_t *client_handle, uint32_t fanNum, OPEN_BOXS_ITEM_STATE_t *fanState)
Gets the state of a given fan number.
open_error_t openapiBoxsFanSpeedGet(openapiClientHandle_t *client_handle, uint32_t fanNum, uint32_t *fanSpeed)
Gets the speed of a given fan number.