Dynamic Engineering PMC2PCI Spécifications Page 75

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 128
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 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;
Vue de la page 74
1 2 ... 70 71 72 73 74 75 76 77 78 79 80 ... 127 128

Commentaires sur ces manuels

Pas de commentaire