tEplKernel EplDlluAsyncSend(tEplFrameInfo * pFrameInfo_p, tEplDllAsyncReqPriority Priority_p) { tEplKernel Ret = kEplSuccessful; Ret = EplDlluCalAsyncSend(pFrameInfo_p, Priority_p); return Ret; }
//--------------------------------------------------------------------------- // // Function: EplSdoAsnduSendData // // Description: send data using existing connection // // // // Parameters: SdoConHandle_p = connection handle // pSrcData_p = pointer to data // dwDataSize_p = number of databyte // -> without asnd-header!!! // // Returns: tEplKernel = Errorcode // // // State: // //--------------------------------------------------------------------------- tEplKernel PUBLIC EplSdoAsnduSendData(tEplSdoConHdl SdoConHandle_p, tEplFrame * pSrcData_p, DWORD dwDataSize_p) { tEplKernel Ret; unsigned int uiArray; tEplFrameInfo FrameInfo; Ret = kEplSuccessful; uiArray = (SdoConHandle_p & ~EPL_SDO_ASY_HANDLE_MASK); if(uiArray > EPL_SDO_MAX_CONNECTION_ASND) { Ret = kEplSdoAsndInvalidHandle; goto Exit; } // fillout Asnd header // own node id not needed -> filled by DLL // set message type AmiSetByteToLe(&pSrcData_p->m_le_bMessageType, (BYTE)kEplMsgTypeAsnd); // ASnd == 0x06 // target node id AmiSetByteToLe(&pSrcData_p->m_le_bDstNodeId, (BYTE) SdoAsndInstance_g.m_auiSdoAsndConnection[uiArray]); // set source-nodeid (filled by DLL 0) AmiSetByteToLe(&pSrcData_p->m_le_bSrcNodeId, 0x00); // calc size (add Ethernet and ASnd header size) dwDataSize_p += (DWORD) ((BYTE*) &pSrcData_p->m_Data.m_Asnd.m_Payload.m_SdoSequenceFrame - (BYTE*) pSrcData_p); // send function of DLL FrameInfo.m_uiFrameSize = dwDataSize_p; FrameInfo.m_pFrame = pSrcData_p; #if(((EPL_MODULE_INTEGRATION) & (EPL_MODULE_DLLU)) != 0) Ret = EplDlluCalAsyncSend(&FrameInfo,kEplDllAsyncReqPrioGeneric); if (Ret == kEplDllAsyncTxBufferFull) { // ignore TxBufferFull errors Ret = kEplSuccessful; } #endif Exit: return Ret; }
//--------------------------------------------------------------------------- // // Function: EplSdoAsnduSendData // // Description: send data using exisiting connection // // // // Parameters: SdoConHandle_p = connection handle // pSrcData_p = pointer to data // dwDataSize_p = number of databyte // -> without asnd-header!!! // // Returns: tEplKernel = Errorcode // // // State: // //--------------------------------------------------------------------------- tEplKernel PUBLIC EplSdoAsnduSendData(tEplSdoConHdl SdoConHandle_p, tEplFrame * pSrcData_p, DWORD dwDataSize_p) { tEplKernel Ret; unsigned int uiArray; tEplFrameInfo FrameInfo; Ret = kEplSuccessful; uiArray = (SdoConHandle_p & ~EPL_SDO_ASY_HANDLE_MASK); if (uiArray > EPL_SDO_MAX_CONNECTION_ASND) { Ret = kEplSdoAsndInvalidHandle; goto Exit; } // fillout Asnd header // own node id not needed -> filled by DLL // set message type AmiSetByteToLe(&pSrcData_p->m_le_bMessageType, (BYTE) kEplMsgTypeAsnd); // ASnd == 0x06 // target node id AmiSetByteToLe(&pSrcData_p->m_le_bDstNodeId, (BYTE) SdoAsndInstance_g. m_auiSdoAsndConnection[uiArray]); // set source-nodeid (filled by DLL 0) AmiSetByteToLe(&pSrcData_p->m_le_bSrcNodeId, 0x00); // calc size dwDataSize_p += EPL_ASND_HEADER_SIZE; // send function of DLL FrameInfo.m_uiFrameSize = dwDataSize_p; FrameInfo.m_pFrame = pSrcData_p; EPL_MEMSET(&FrameInfo.m_NetTime, 0x00, sizeof(tEplNetTime)); #if(((EPL_MODULE_INTEGRATION) & (EPL_MODULE_DLLU)) != 0) Ret = EplDlluCalAsyncSend(&FrameInfo, kEplDllAsyncReqPrioGeneric); #endif Exit: return Ret; }