Пример #1
0
/*
 *  ======== processWait ========
 */
static XDAS_Int32 processWait(IVIDDEC_Handle h, XDM_BufDesc *inBufs,
    XDM_BufDesc *outBufs, IVIDDEC_InArgs *inArgs, IVIDDEC_OutArgs *outArgs,
    UInt timeout)
{
    XDAS_Int32 retVal;
    _VIDDEC_Msg *msg;
    VISA_Handle visa = (VISA_Handle)h;

    GT_assert(CURTRACE, !VISA_isLocal(visa));

    /* wait for completion of "last" message */
    retVal = VISA_wait(visa, (VISA_Msg *)&msg, timeout);

    /*
     * Unmarshall outArgs if there is a msg to unmarshall.
     */
    if (msg != NULL) {
        GT_assert(CURTRACE, msg->visa.cmd == _VIDDEC_CPROCESS);

        retVal = unmarshallMsg(h, inBufs, outBufs, inArgs, outArgs, msg,
                               retVal);
    }

    return (retVal);
}
/*
 *  ======== processWait ========
 */
static XDAS_Int32 processWait(IVIDDEC2BACK_Handle h, XDM_Context *context,
        IVIDDEC2_OutArgs *outArgs, UInt timeout)
{
    XDAS_Int32 retVal;
    _VIDDEC2BACK_Msg *msg;
    VISA_Handle visa = (VISA_Handle)h;

    Assert_isTrue(!VISA_isLocal(visa), (Assert_Id)NULL);

    /* wait for completion of "last" message */
    retVal = VISA_wait(visa, (VISA_Msg *)&msg, timeout);

    Assert_isTrue(msg->visa.cmd == _VIDDEC2BACK_CPROCESS, (Assert_Id)NULL);

    /*
     * Regardless of return value, unmarshall outArgs.
     */
    retVal = unmarshallMsg(h, context, outArgs, msg, retVal);

    return (retVal);
}
Пример #3
0
/*
 *  ======== processWait ========
 */
static XDAS_Int32 processWait(IAUDENC1_Handle h, XDM1_BufDesc *inBufs,
    XDM1_BufDesc *outBufs, IAUDENC1_InArgs *inArgs, IAUDENC1_OutArgs *outArgs,
    UInt timeout)
{
    XDAS_Int32 retVal;
    _AUDENC1_Msg *msg;
    VISA_Handle visa = (VISA_Handle)h;

    Assert_isTrue(!VISA_isLocal(visa), (Assert_Id)NULL);

    /* wait for completion of "last" message */
    retVal = VISA_wait(visa, (VISA_Msg *)&msg, timeout);

    /* Unmarshall outArgs if there is a msg to unmarshall. */
    if (msg != NULL) {
        Assert_isTrue(msg->visa.cmd == _AUDENC1_CPROCESS, (Assert_Id)NULL);

        unmarshallMsg(h, inBufs, outBufs, inArgs, outArgs, msg);
    }

    return (retVal);
}