Esempio n. 1
0
            public static long oHpiHandlerInfo(
                long SessionId,
                long HandlerId,
                out oHpiHandlerInfoT HandlerInfo,
                out oHpiHandlerConfigT HandlerConfig
                )
            {
                long rv;
                bool rc;

                HandlerInfo   = null;
                HandlerConfig = 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.MarshaloHpiHandlerIdT(HandlerId);
                rc = m.Interchange(OhpiConst.RPC_OHPI_HANDLER_INFO);
                if (!rc)
                {
                    m.Close();
                    return(HpiConst.SA_ERR_HPI_NO_RESPONSE);
                }
                rv = m.DemarshalSaErrorT();
                if (rv == HpiConst.SA_OK)
                {
                    HandlerInfo   = m.DemarshaloHpiHandlerInfoT();
                    HandlerConfig = m.DemarshaloHpiHandlerConfigT();
                }
                s.PutMarshal(m);

                return(rv);
            }
Esempio n. 2
0
            public static long oHpiHandlerGetNext(
                long SessionId,
                long HandlerId,
                out long NextHandlerId
                )
            {
                long rv;
                bool rc;

                NextHandlerId = HpiConst.SAHPI_LAST_ENTRY;

                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.MarshaloHpiHandlerIdT(HandlerId);
                rc = m.Interchange(OhpiConst.RPC_OHPI_HANDLER_GET_NEXT);
                if (!rc)
                {
                    m.Close();
                    return(HpiConst.SA_ERR_HPI_NO_RESPONSE);
                }
                rv = m.DemarshalSaErrorT();
                if (rv == HpiConst.SA_OK)
                {
                    NextHandlerId = m.DemarshaloHpiHandlerIdT();
                }
                s.PutMarshal(m);

                return(rv);
            }
Esempio n. 3
0
            public static long oHpiHandlerRetry(
                long SessionId,
                long HandlerId
                )
            {
                long rv;
                bool rc;

                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.MarshaloHpiHandlerIdT(HandlerId);
                rc = m.Interchange(OhpiConst.RPC_OHPI_HANDLER_RETRY);
                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);
            }