Esempio n. 1
0
 public void MarshalSaHpiDimiTestT( SaHpiDimiTestT x )
 {
     MarshalSaHpiTextBufferT( x.TestName );
     MarshalSaHpiDimiTestServiceImpactT( x.ServiceImpact );
     for ( int i = 0; i < HpiConst.SAHPI_DIMITEST_MAX_ENTITIESIMPACTED; ++i ) {
     MarshalSaHpiDimiTestAffectedEntityT( x.EntitiesImpacted[i] );
     }
     MarshalSaHpiBoolT( x.NeedServiceOS );
     MarshalSaHpiTextBufferT( x.ServiceOS );
     MarshalSaHpiTimeT( x.ExpectedRunDuration );
     MarshalSaHpiDimiTestCapabilityT( x.TestCapabilities );
     for ( int i = 0; i < HpiConst.SAHPI_DIMITEST_MAX_PARAMETERS; ++i ) {
     MarshalSaHpiDimiTestParamsDefinitionT( x.TestParameters[i] );
     }
 }
Esempio n. 2
0
            public static long saHpiDimiTestInfoGet(
        long SessionId,
        long ResourceId,
        long DimiNum,
        long TestNum,
        out SaHpiDimiTestT DimiTest
    )
            {
                long rv;
                bool rc;

                DimiTest = 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() );
                m.MarshalSaHpiResourceIdT( ResourceId );
                m.MarshalSaHpiDimiNumT( DimiNum );
                m.MarshalSaHpiDimiTestNumT( TestNum );
                rc = m.Interchange( OhpiConst.RPC_SAHPI_DIMI_TEST_INFO_GET );
                if ( !rc ) {
                m.Close();
                return HpiConst.SA_ERR_HPI_NO_RESPONSE;
                }
                rv = m.DemarshalSaErrorT();
                if ( rv == HpiConst.SA_OK ) {
                DimiTest = m.DemarshalSaHpiDimiTestT();
                }
                s.PutMarshal( m );

                return rv;
            }
Esempio n. 3
0
            public SaHpiDimiTestT DemarshalSaHpiDimiTestT()
            {
                SaHpiDimiTestT x = new SaHpiDimiTestT();

                x.TestName = DemarshalSaHpiTextBufferT();
                x.ServiceImpact = DemarshalSaHpiDimiTestServiceImpactT();
                x.EntitiesImpacted = new SaHpiDimiTestAffectedEntityT[HpiConst.SAHPI_DIMITEST_MAX_ENTITIESIMPACTED];
                for ( int i = 0; i < HpiConst.SAHPI_DIMITEST_MAX_ENTITIESIMPACTED; ++i ) {
                x.EntitiesImpacted[i] = DemarshalSaHpiDimiTestAffectedEntityT();
                }
                x.NeedServiceOS = DemarshalSaHpiBoolT();
                x.ServiceOS = DemarshalSaHpiTextBufferT();
                x.ExpectedRunDuration = DemarshalSaHpiTimeT();
                x.TestCapabilities = DemarshalSaHpiDimiTestCapabilityT();
                x.TestParameters = new SaHpiDimiTestParamsDefinitionT[HpiConst.SAHPI_DIMITEST_MAX_PARAMETERS];
                for ( int i = 0; i < HpiConst.SAHPI_DIMITEST_MAX_PARAMETERS; ++i ) {
                x.TestParameters[i] = DemarshalSaHpiDimiTestParamsDefinitionT();
                }

                return x;
            }
Esempio n. 4
0
 /**
  * Check function for HPI struct SaHpiDimiTestT
  */
 public static bool Check( SaHpiDimiTestT x )
 {
     if ( x == null ) {
     return false;
     }
     if ( !Check( x.TestName ) ) {
     return false;
     }
     if ( x.EntitiesImpacted == null ) {
     return false;
     }
     if ( x.EntitiesImpacted.Length != HpiConst.SAHPI_DIMITEST_MAX_ENTITIESIMPACTED ) {
     return false;
     }
     for ( int i = 0; i < HpiConst.SAHPI_DIMITEST_MAX_ENTITIESIMPACTED; ++i ) {
     if ( !Check( x.EntitiesImpacted[i] ) ) {
     return false;
     }
     }
     if ( !Check( x.ServiceOS ) ) {
     return false;
     }
     if ( x.TestParameters == null ) {
     return false;
     }
     if ( x.TestParameters.Length != HpiConst.SAHPI_DIMITEST_MAX_PARAMETERS ) {
     return false;
     }
     for ( int i = 0; i < HpiConst.SAHPI_DIMITEST_MAX_PARAMETERS; ++i ) {
     if ( !Check( x.TestParameters[i] ) ) {
     return false;
     }
     }
     return true;
 }