Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
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 */
55 
57 typedef enum
58 {
59  OPEN_TEMPSENSOR_STATE_NONE = 0, /* N/A */
60  OPEN_TEMPSENSOR_STATE_LOW = 1,
61  OPEN_TEMPSENSOR_STATE_NORMAL = 2,
62  OPEN_TEMPSENSOR_STATE_WARNING = 3,
63  OPEN_TEMPSENSOR_STATE_CRITICAL = 4,
64  OPEN_TEMPSENSOR_STATE_SHUTDOWN = 5,
65  OPEN_TEMPSENSOR_STATE_NOTPRESENT = 6,
66  OPEN_TEMPSENSOR_STATE_NOTOPERATIONAL = 7
68 
70 typedef enum
71 {
72  OPEN_TYPE_NONE = 0, /* N/A */
73  OPEN_TYPE_FIXED = 1,
74  OPEN_TYPE_REMOVABLE = 2
76 
77 typedef enum
78 {
90 
91 typedef enum
92 {
93  OPEN_LED_CMD_OFF = 0,
94  OPEN_LED_CMD_ON = 1
95 }OPEN_LED_CMD_t;
96 
97 typedef enum
98 {
99  OPEN_LED_STATUS_OFF = 0,
100  OPEN_LED_STATUS_ON = 1
101 }OPEN_LED_STATUS_t;
102 
103 #define OPEN_BXS_STR_BUFFER_SIZE 128
105 /******************************************************************************/
128 open_error_t openapiFiberPortsOpticsFaultStatusGet(openapiClientHandle_t *client_handle, uint32_t ifNum,
129  uint32_t *localFaultStatus, uint32_t *remoteFaultStatus);
130 
131 /******************************************************************************/
158 open_error_t openapiFiberPortsOpticsGet(openapiClientHandle_t *client_handle, uint32_t ifNum,
159  uint32_t *temperature, uint32_t *voltage, uint32_t *current,
160  uint64_t *powerIn, uint64_t *powerOut,
161  OPEN_BOOL_t *txFault, OPEN_BOOL_t *los);
162 
163 /******************************************************************************/
195 open_error_t openapiFiberPortsLaneOpticsGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t lane,
196  uint32_t *temperature, uint32_t *voltage, uint32_t *current,
197  open_buffdesc *powerIn, open_buffdesc *powerOut,
198  OPEN_BOOL_t *txFault, OPEN_BOOL_t *los);
199 
200 /*****************************************************************/
221  uint32_t ifNum, OPEN_BOOL_t *present);
222 
223 /*****************************************************************/
238  uint32_t * genFanSpeed);
239 
240 /*****************************************************************/
255  uint32_t * genFanDutyLevel);
256 
257 /******************************************************************************/
272  uint32_t * numFans);
273 
274 /*****************************************************************/
290  uint32_t fanNum, uint32_t * fanSpeed);
291 
292 
293 /*****************************************************************/
309  uint32_t fanNum,
310  OPEN_BOXS_ITEM_STATE_t * fanState);
311 
312 /*****************************************************************/
328  uint32_t fanNum,
329  OPEN_BOXS_ITEM_TYPE_t * fanType);
330 
331 /*****************************************************************/
347  uint32_t fanNum, uint32_t * fanDuty);
348 
349 /*****************************************************************************************/
363  client_handle,
364  uint32_t * descripSize);
365 
366 /*****************************************************************************************/
384  client_handle,
385  uint32_t fanNum,
386  open_buffdesc * descrip);
387 
388 /*****************************************************************/
403  client_handle,
404  uint32_t * numPowSuplies);
405 
406 /*****************************************************************/
422  client_handle, uint32_t psNo,
423  OPEN_BOXS_ITEM_STATE_t * psState);
424 
425 /*****************************************************************/
441  client_handle, uint32_t psNo,
442  OPEN_BOXS_ITEM_TYPE_t * psType);
443 
444 /*****************************************************************************************/
458  client_handle,
459  uint32_t * descripSize);
460 
461 /*****************************************************************************************/
479  client_handle,
480  uint32_t psNum,
481  open_buffdesc * descrip);
482 
483 /*****************************************************************/
499  client_handle,
500  uint32_t * minTemp,
501  uint32_t * maxTemp);
502 
503 /************************************************************************************/
518  client_handle,
519  uint32_t * genTemp);
520 
521 /*****************************************************************/
536  client_handle,
537  uint32_t * numOfTempSemsors);
538 
539 /*****************************************************************************************/
554  client_handle,
555  uint32_t * descripSize);
556 
557 /*****************************************************************************************/
575  client_handle,
576  uint32_t sensorNum,
577  open_buffdesc * descrip);
578 
579 /************************************************************************************/
593  uint32_t sensorNum, uint32_t * temperature);
594 
595 /*****************************************************************/
610  client_handle, uint32_t sensorNum,
612  state);
613 
614 /*******************************************************************************/
630  client_handle,
631  uint32_t sensorNum,
632  uint32_t * maxTemperature);
633 
634 /*****************************************************************/
649  uint32_t ifNum, OPEN_SFP_MODULE_TYPE_t *moduleType);
650 
651 /*****************************************************************/
670  uint32_t ifNum, open_buffdesc *vendorNameDesc);
671 
672 /*****************************************************************/
691  uint32_t ifNum, open_buffdesc *serialNumberDesc);
692 
693 /*****************************************************************/
712  uint32_t ifNum, open_buffdesc *partNumberDesc);
713 
714 
715 /*****************************************************************/
733  uint32_t ifNum, open_buffdesc *vendorRevDesc);
734 
735 /*****************************************************************/
751  uint32_t ifNum, uint32_t *linkLength50um);
752 
753 /*****************************************************************/
769  uint32_t ifNum, uint32_t *linkLength62_5um);
770 
771 /*****************************************************************/
788  uint32_t ifNum, uint32_t *nominalSigRate);
789 
790 /*****************************************************************/
809  uint32_t ifNum, open_buffdesc *complianceDesc);
810 
811 /*****************************************************************/
824  uint32_t *vendorNameSize);
825 
826 /*****************************************************************/
839  uint32_t *serialNumberSize);
840 
841 /*****************************************************************/
854  uint32_t *partNumberSize);
855 
856 /*****************************************************************/
869  uint32_t *vendorRevSize);
870 
871 /*****************************************************************/
884  uint32_t *complianceSize);
885 
886 /*****************************************************************/
899 
900 /*****************************************************************/
915  uint32_t interface,
916  OPEN_CONTROL_t enable);
917 
918 /*****************************************************************/
936  open_buffdesc *cpldVersion);
937 
938 /******************************************************************************/
952  uint32_t *version);
953 
954 /*****************************************************************/
971  OPEN_LED_CMD_t val);
972 
973 /*****************************************************************/
989  OPEN_LED_STATUS_t *val);
990 
991 /*****************************************************************/
1008  OPEN_LED_CMD_t val);
1009 
1010 /*****************************************************************/
1026  OPEN_LED_STATUS_t *val);
1027 #endif /* OPENAPI_BOXS_H_INCLUDED */
1028 
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:77
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:57
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:86
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:87
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:84
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:88
Stacking module, AX742.
Definition: openapi_boxs.h:85
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:70
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:83
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.