Intel MPCMM0001 Network Card User Manual


 
MPCMM0001 Chassis Management Module Software Technical Product Specification 187
Remote Procedure Calls (RPC)
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
ChassisManagementApi()
[in] Parameters
ChassisManagementApi() [out] Parameters
Get the
chassis
temperature.
pszCMMHost: localhost
uCmdCode: CMD_GET
pszLocation: Chassis
pszTarget: TempSensorName
pszDataItem: current
uReturnType: DATA_TYPE_STRING
ppvbuffer: A null-terminated string of the format:
Value [Units]
Get the fan
tray presence.
pszCMMHost: localhost
uCmdCode: CMD_GET
pszLocation: fantray1..3
pszTarget: NA
pszDataItem: presence
uReturnType: DATA_TYPE_INT
ppvbuffer: Integer value indicating presence
1 = Present
0 = Not Present
Get the CPU
temperature
of blade 5.
pszCMMHost: localhost
uCmdCode: CMD_GET
pszLocation: blade5
pszTarget: CPUTempSensorName
pszDataItem: current
uReturnType: DATA_TYPE_STRING
ppvbuffer: A null-terminated string of the format:
Value [Units]
Determine if a
certain blade
is present.
pszCMMHost: localhost
uCmdCode: CMD_GET
pszLocation: blade[1-n]
pszDataItem: presence
uReturnType: DATA_TYPE_INT
ppvbuffer:
Present
The call to ChassisManagementApi() returns
E_BLADE_NOT_PRESENT if the selected blade
is not present.
Get all
thresholds for
the +3.3 V
sensor on
blade 2.
pszCMMHost: localhost
uCmdCode: CMD_GET
pszLocation: blade2
pszTarget: 3.3vSensorName
pszDataItem: ThresholdsAll
uReturnType: DATA_TYPE_ALL_THRESHOLDS
ppvbuffer: A THRESHOLDS_ALL structure as
defined in cli_client.h