Dynamic Engineering PMC2PCI Dokumentacja Strona 75

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 128
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 74
INTELLIGENT PLATFORM MANAGEMENT INTERFACE
PP 41x/03x 7-19
7.6.3 Reading Sensors
The IPMI specification supports many commands to manage and interrogate sensors. The
following program fragment illustrates how the current reading of a sensor can be obtained.
/* network function codes */
#define NFC_SENSOR_EVENT_RQ 0x04
/* commands */
#define CMD_GET_SENS_RD 0x2D /* Get sensor reading */
/* Completion codes */
#define COMPLETION_OK 0 /* Completion code OK */
/* error codes */
#define E_OK 0 /* OK */
#define E_COMPLETION 0x400 /* wrong completion code */
/* forward declarations */
void vBmcSmicSmsMessageWrite (const unsigned char *pbMessage,
unsigned char bLength);
void vBmcSmicSmsMessageRead (unsigned char *pbMessage,
unsigned char *bMessageLength);
/* response data structure provided to wGetSensorReadingCmd() */
struct SENSOR_READING
{
unsigned char bData;
unsigned char bStatus;
};
/******************************************************************************
*
* wGetSensorReadingCmd
*
* This function gets current sensor reading.
*
* RETURNS: E_OK if it is OK, or error code
*
*/
unsigned short int wGetSensorReadingCmd
(
unsigned char bSensorId,
struct SENSOR_READING *psSensorReading
)
{
unsigned char bLength;
Przeglądanie stron 74
1 2 ... 70 71 72 73 74 75 76 77 78 79 80 ... 127 128

Komentarze do niniejszej Instrukcji

Brak uwag