Exemple #1
0
            public SaHpiEventUnionT DemarshalSaHpiEventUnionT( long mod )
            {
                SaHpiEventUnionT x = new SaHpiEventUnionT();

                if ( mod == HpiConst.SAHPI_ET_RESOURCE ) {
                x.ResourceEvent = DemarshalSaHpiResourceEventT();
                }
                if ( mod == HpiConst.SAHPI_ET_DOMAIN ) {
                x.DomainEvent = DemarshalSaHpiDomainEventT();
                }
                if ( mod == HpiConst.SAHPI_ET_SENSOR ) {
                x.SensorEvent = DemarshalSaHpiSensorEventT();
                }
                if ( mod == HpiConst.SAHPI_ET_SENSOR_ENABLE_CHANGE ) {
                x.SensorEnableChangeEvent = DemarshalSaHpiSensorEnableChangeEventT();
                }
                if ( mod == HpiConst.SAHPI_ET_HOTSWAP ) {
                x.HotSwapEvent = DemarshalSaHpiHotSwapEventT();
                }
                if ( mod == HpiConst.SAHPI_ET_WATCHDOG ) {
                x.WatchdogEvent = DemarshalSaHpiWatchdogEventT();
                }
                if ( mod == HpiConst.SAHPI_ET_HPI_SW ) {
                x.HpiSwEvent = DemarshalSaHpiHpiSwEventT();
                }
                if ( mod == HpiConst.SAHPI_ET_OEM ) {
                x.OemEvent = DemarshalSaHpiOemEventT();
                }
                if ( mod == HpiConst.SAHPI_ET_USER ) {
                x.UserEvent = DemarshalSaHpiUserEventT();
                }
                if ( mod == HpiConst.SAHPI_ET_DIMI ) {
                x.DimiEvent = DemarshalSaHpiDimiEventT();
                }
                if ( mod == HpiConst.SAHPI_ET_DIMI_UPDATE ) {
                x.DimiUpdateEvent = DemarshalSaHpiDimiUpdateEventT();
                }
                if ( mod == HpiConst.SAHPI_ET_FUMI ) {
                x.FumiEvent = DemarshalSaHpiFumiEventT();
                }

                return x;
            }
Exemple #2
0
 /**
  * Check function for HPI union SaHpiEventUnionT
  */
 public static bool Check( SaHpiEventUnionT x, long mod )
 {
     if ( x == null ) {
     return false;
     }
     if ( mod == HpiConst.SAHPI_ET_RESOURCE ) {
     if ( !Check( x.ResourceEvent ) ) {
     return false;
     }
     }
     if ( mod == HpiConst.SAHPI_ET_DOMAIN ) {
     if ( !Check( x.DomainEvent ) ) {
     return false;
     }
     }
     if ( mod == HpiConst.SAHPI_ET_SENSOR ) {
     if ( !Check( x.SensorEvent ) ) {
     return false;
     }
     }
     if ( mod == HpiConst.SAHPI_ET_SENSOR_ENABLE_CHANGE ) {
     if ( !Check( x.SensorEnableChangeEvent ) ) {
     return false;
     }
     }
     if ( mod == HpiConst.SAHPI_ET_HOTSWAP ) {
     if ( !Check( x.HotSwapEvent ) ) {
     return false;
     }
     }
     if ( mod == HpiConst.SAHPI_ET_WATCHDOG ) {
     if ( !Check( x.WatchdogEvent ) ) {
     return false;
     }
     }
     if ( mod == HpiConst.SAHPI_ET_HPI_SW ) {
     if ( !Check( x.HpiSwEvent ) ) {
     return false;
     }
     }
     if ( mod == HpiConst.SAHPI_ET_OEM ) {
     if ( !Check( x.OemEvent ) ) {
     return false;
     }
     }
     if ( mod == HpiConst.SAHPI_ET_USER ) {
     if ( !Check( x.UserEvent ) ) {
     return false;
     }
     }
     if ( mod == HpiConst.SAHPI_ET_DIMI ) {
     if ( !Check( x.DimiEvent ) ) {
     return false;
     }
     }
     if ( mod == HpiConst.SAHPI_ET_DIMI_UPDATE ) {
     if ( !Check( x.DimiUpdateEvent ) ) {
     return false;
     }
     }
     if ( mod == HpiConst.SAHPI_ET_FUMI ) {
     if ( !Check( x.FumiEvent ) ) {
     return false;
     }
     }
     return true;
 }