public void MarshalSaHpiSensorThresholdsT( SaHpiSensorThresholdsT x ) { MarshalSaHpiSensorReadingT( x.LowCritical ); MarshalSaHpiSensorReadingT( x.LowMajor ); MarshalSaHpiSensorReadingT( x.LowMinor ); MarshalSaHpiSensorReadingT( x.UpCritical ); MarshalSaHpiSensorReadingT( x.UpMajor ); MarshalSaHpiSensorReadingT( x.UpMinor ); MarshalSaHpiSensorReadingT( x.PosThdHysteresis ); MarshalSaHpiSensorReadingT( x.NegThdHysteresis ); }
public static long saHpiSensorThresholdsSet( long SessionId, long ResourceId, long SensorNum, SaHpiSensorThresholdsT SensorThresholds ) { long rv; bool rc; rc = HpiUtil.Check( SensorThresholds ); if ( !rc ) { return HpiConst.SA_ERR_HPI_INVALID_PARAMS; } HpiSession s = HpiCore.GetSession( SessionId ); if ( s == null ) { return HpiConst.SA_ERR_HPI_INVALID_SESSION; } OhpiMarshal m = s.GetMarshal(); if ( m == null ) { return HpiConst.SA_ERR_HPI_NO_RESPONSE; } m.MarshalSaHpiSessionIdT( s.GetRemoteSid() ); m.MarshalSaHpiResourceIdT( ResourceId ); m.MarshalSaHpiSensorNumT( SensorNum ); m.MarshalSaHpiSensorThresholdsT( SensorThresholds ); rc = m.Interchange( OhpiConst.RPC_SAHPI_SENSOR_THRESHOLDS_SET ); if ( !rc ) { m.Close(); return HpiConst.SA_ERR_HPI_NO_RESPONSE; } rv = m.DemarshalSaErrorT(); if ( rv == HpiConst.SA_OK ) { // No output arguments } s.PutMarshal( m ); return rv; }
public SaHpiSensorThresholdsT DemarshalSaHpiSensorThresholdsT() { SaHpiSensorThresholdsT x = new SaHpiSensorThresholdsT(); x.LowCritical = DemarshalSaHpiSensorReadingT(); x.LowMajor = DemarshalSaHpiSensorReadingT(); x.LowMinor = DemarshalSaHpiSensorReadingT(); x.UpCritical = DemarshalSaHpiSensorReadingT(); x.UpMajor = DemarshalSaHpiSensorReadingT(); x.UpMinor = DemarshalSaHpiSensorReadingT(); x.PosThdHysteresis = DemarshalSaHpiSensorReadingT(); x.NegThdHysteresis = DemarshalSaHpiSensorReadingT(); return x; }
/** * Check function for HPI struct SaHpiSensorThresholdsT */ public static bool Check( SaHpiSensorThresholdsT x ) { if ( x == null ) { return false; } if ( !Check( x.LowCritical ) ) { return false; } if ( !Check( x.LowMajor ) ) { return false; } if ( !Check( x.LowMinor ) ) { return false; } if ( !Check( x.UpCritical ) ) { return false; } if ( !Check( x.UpMajor ) ) { return false; } if ( !Check( x.UpMinor ) ) { return false; } if ( !Check( x.PosThdHysteresis ) ) { return false; } if ( !Check( x.NegThdHysteresis ) ) { return false; } return true; }