Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
Functions
BCM SDK Shell [OPENAPI_BCMSDK_ACCESS]

Functions

open_error_t openapiSdkPortRegReadByName (openapiClientHandle_t *client_handle, uint32_t UnitIndex, open_buffdesc *regName, uint32_t portNum, uint64_t *val)
 Read a Port Register given its Name. More...
 
open_error_t openapiSdkRegReadByName (openapiClientHandle_t *client_handle, uint32_t bcmUnit, open_buffdesc *regName, uint64_t *val)
 Read a register given its Name. More...
 
open_error_t openapiSdkShellCmdRun (openapiClientHandle_t *client_handle, open_buffdesc *cliCmd, open_buffdesc *fileName, uint32_t appendToFile)
 Execute BCM SDK shell commands. More...
 

Detailed Description

Function Documentation

open_error_t openapiSdkPortRegReadByName ( openapiClientHandle_t client_handle,
uint32_t  UnitIndex,
open_buffdesc regName,
uint32_t  portNum,
uint64_t *  val 
)

Read a Port Register given its Name.

Parameters
[in]client_handleclient handle from registration API
[in]UnitIndexunit number for the device.
[in]regNameRegister Name.
[in]portNumPort number.
[out]valoutput location.
Return values
OPEN_E_NONEPort register read success.
OPEN_E_FAILFailed to read the port register.
OPEN_E_PARAMError in parameter passed.
OPEN_E_UNAVAILNot supported for this platform.
Note
Please note that the port related register names can be determined using the BCM shell on the switch via the "Listreg" command. In addition, the registers are also listed in the associated Programmer's Register Reference Guide. OpEN API Version: 1.1
Examples:
sdkportregbyname.c.
open_error_t openapiSdkRegReadByName ( openapiClientHandle_t client_handle,
uint32_t  bcmUnit,
open_buffdesc regName,
uint64_t *  val 
)

Read a register given its Name.

Parameters
[in]client_handleclient handle from registration API
[in]bcmUnitBCM unit number for the device.
[in]regNameRegister Name.
[out]valoutput location.
Return values
OPEN_E_NONEregister read success.
OPEN_E_FAILFailed to read the register.
OPEN_E_PARAMError in parameter passed.
OPEN_E_UNAVAILNot supported for this platform.
Note
Please note that the global register names can be determined using the BCM shell on the switch via the "Listreg" command. In addition, the registers are also listed in the associated Programmer's Register Reference Guide.

OpEN API Version: 1.1

Examples:
sdkregbyname.c.
open_error_t openapiSdkShellCmdRun ( openapiClientHandle_t client_handle,
open_buffdesc cliCmd,
open_buffdesc fileName,
uint32_t  appendToFile 
)

Execute BCM SDK shell commands.

Parameters
[in]client_handleclient handle from registration API
[in]cliCmdShell commands to be executed. Multiple shell commands can be specified by separating them by a semicolon.
[in]fileNameName of file to which command output is written. The name must include the complete path for the file. If the complete path is not specified, then the file is created in flash. NULL: Indicates output should be printed to console
[in]appendToFileIf the output is to be written to a file, OPEN_ENABLE indicates that the output should be appended to the file and OPEN_DISABLE indicates that the output should override the contents of file.
Warning
This API should not be used to change any state in the Broadcom switching silicon.
Return values
OPEN_E_NONEExecuted BCM SDK shell commands.
OPEN_E_FAILFailed to Execute BCM SDK shell commands.
OPEN_E_PARAMError in parameter passed.
OPEN_E_UNAVAILNot supported for this platform.

OpEN API Version: 1.1