예제 #1
0
            public static long saHpiDomainInfoGet(
        long SessionId,
        out SaHpiDomainInfoT DomainInfo
    )
            {
                long rv;
                bool rc;

                DomainInfo = null;

                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() );
                rc = m.Interchange( OhpiConst.RPC_SAHPI_DOMAIN_INFO_GET );
                if ( !rc ) {
                m.Close();
                return HpiConst.SA_ERR_HPI_NO_RESPONSE;
                }
                rv = m.DemarshalSaErrorT();
                if ( rv == HpiConst.SA_OK ) {
                DomainInfo = m.DemarshalSaHpiDomainInfoT();
                }
                s.PutMarshal( m );

                return rv;
            }
예제 #2
0
            public SaHpiDomainInfoT DemarshalSaHpiDomainInfoT()
            {
                SaHpiDomainInfoT x = new SaHpiDomainInfoT();

                x.DomainId = DemarshalSaHpiDomainIdT();
                x.DomainCapabilities = DemarshalSaHpiDomainCapabilitiesT();
                x.IsPeer = DemarshalSaHpiBoolT();
                x.DomainTag = DemarshalSaHpiTextBufferT();
                x.DrtUpdateCount = DemarshalSaHpiUint32T();
                x.DrtUpdateTimestamp = DemarshalSaHpiTimeT();
                x.RptUpdateCount = DemarshalSaHpiUint32T();
                x.RptUpdateTimestamp = DemarshalSaHpiTimeT();
                x.DatUpdateCount = DemarshalSaHpiUint32T();
                x.DatUpdateTimestamp = DemarshalSaHpiTimeT();
                x.ActiveAlarms = DemarshalSaHpiUint32T();
                x.CriticalAlarms = DemarshalSaHpiUint32T();
                x.MajorAlarms = DemarshalSaHpiUint32T();
                x.MinorAlarms = DemarshalSaHpiUint32T();
                x.DatUserAlarmLimit = DemarshalSaHpiUint32T();
                x.DatOverflow = DemarshalSaHpiBoolT();
                x.Guid = DemarshalByteArray( HpiConst.SAHPI_GUID_LENGTH );

                return x;
            }
예제 #3
0
 public void MarshalSaHpiDomainInfoT( SaHpiDomainInfoT x )
 {
     MarshalSaHpiDomainIdT( x.DomainId );
     MarshalSaHpiDomainCapabilitiesT( x.DomainCapabilities );
     MarshalSaHpiBoolT( x.IsPeer );
     MarshalSaHpiTextBufferT( x.DomainTag );
     MarshalSaHpiUint32T( x.DrtUpdateCount );
     MarshalSaHpiTimeT( x.DrtUpdateTimestamp );
     MarshalSaHpiUint32T( x.RptUpdateCount );
     MarshalSaHpiTimeT( x.RptUpdateTimestamp );
     MarshalSaHpiUint32T( x.DatUpdateCount );
     MarshalSaHpiTimeT( x.DatUpdateTimestamp );
     MarshalSaHpiUint32T( x.ActiveAlarms );
     MarshalSaHpiUint32T( x.CriticalAlarms );
     MarshalSaHpiUint32T( x.MajorAlarms );
     MarshalSaHpiUint32T( x.MinorAlarms );
     MarshalSaHpiUint32T( x.DatUserAlarmLimit );
     MarshalSaHpiBoolT( x.DatOverflow );
     MarshalByteArray( x.Guid, HpiConst.SAHPI_GUID_LENGTH );
 }
예제 #4
0
 /**
  * Check function for HPI struct SaHpiDomainInfoT
  */
 public static bool Check( SaHpiDomainInfoT x )
 {
     if ( x == null ) {
     return false;
     }
     if ( !Check( x.DomainTag ) ) {
     return false;
     }
     if ( x.Guid == null ) {
     return false;
     }
     if ( x.Guid.Length != HpiConst.SAHPI_GUID_LENGTH ) {
     return false;
     }
     return true;
 }