Rpc Sample Code; Rpc Usage Examples - Intel NetStructure MPCMM0001 Software Instructions

Chassis management module
Table of Contents

Advertisement

19.3

RPC Sample Code

Sample code for interfacing with the CMM through RPC is available in the file cli_client.c. The
sample code compiles into a command-line executable for use with Linux or a .o file for use with
VxWorks. To select the appropriate target, remove the comment from the appropriate #define in the
source code.
The sample code first authenticates to the CMM through GetAuthCapability(). When the
authentication is successful, the user's command-line arguments (for Linux) or calling parameters
(for VxWorks) are passed to the CMM through ChassisManagementApi(). The return code is then
checked and the result is printed to the console.
19.4

RPC Usage Examples

Table 85
presents examples of using RPC calls to get and set fields on the CMM. Data returned by
RPC calls are returned in the ppvbuffer and uReturnType parameters to ChassisManagementApi().
Table 85. RPC Usage Examples (Sheet 1 of 3)
Example
Get the
chassis
temperature.
Get the fan
tray presence.
Get the CPU
temperature
of blade 5.
Determine if a
certain blade
is present.
Get all
thresholds for
the +3.3 V
sensor on
blade 2.
MPCMM0001 Chassis Management Module Software Technical Product Specification
Download from Www.Somanuals.com. All Manuals Search And Download.
ChassisManagementApi()
[in] Parameters
pszCMMHost: localhost
uCmdCode: CMD_GET
pszLocation: Chassis
pszTarget: TempSensorName
pszDataItem: current
pszCMMHost: localhost
uCmdCode: CMD_GET
pszLocation: fantray1..3
pszTarget: NA
pszDataItem: presence
pszCMMHost: localhost
uCmdCode: CMD_GET
pszLocation: blade5
pszTarget: CPUTempSensorName
pszDataItem: current
pszCMMHost: localhost
uCmdCode: CMD_GET
pszLocation: blade[1-n]
pszDataItem: presence
pszCMMHost: localhost
uCmdCode: CMD_GET
pszLocation: blade2
pszTarget: 3.3vSensorName
pszDataItem: ThresholdsAll
Remote Procedure Calls (RPC)
ChassisManagementApi() [out] Parameters
uReturnType: DATA_TYPE_STRING
ppvbuffer: A null-terminated string of the format:
Value [Units]
uReturnType: DATA_TYPE_INT
ppvbuffer: Integer value indicating presence
1 = Present
0 = Not Present
uReturnType: DATA_TYPE_STRING
ppvbuffer: A null-terminated string of the format:
Value [Units]
uReturnType: DATA_TYPE_INT
ppvbuffer:
Present
The call to ChassisManagementApi() returns
E_BLADE_NOT_PRESENT if the selected blade
is not present.
uReturnType: DATA_TYPE_ALL_THRESHOLDS
ppvbuffer: A THRESHOLDS_ALL structure as
defined in cli_client.h
187

Advertisement

Table of Contents
loading

Table of Contents