Quantcast
Viewing all articles
Browse latest Browse all 5355

XlOpenport vector library

Hi, I am writing a driver for vector xl Hardware interfaces, the h/w type is XL_HWTYPE_VN1630. I have got succesful status for these interfaces.

xlOpenDriver();xlGetDriverConfig();xlGetApplConfig;xlSetApplConfig;xlGetChannelIndex.

But when I tried to open port using xlOpenPort interface, I am getting porthandle as a invalid port.and one more very strange thing is happend that sometimes its giving valid port and sometime not. I am not understanding why this type of thing is happening. below is my code:

 

   XLstatus         xlStatus=XL_ERROR;

   XLaccess         m_xlChannelMask_both;

  XLaccess         xlPermissionMask;

  char             tmp[100];

 

m_xlChannelMask_both=m_xlChannelMask[MASTER]|m_xlChannelMask[SLAVE];

xlPermissionMask=m_xlChannelMask_both;

xlStatus=xlOpenPort(&m_xlPortHandle,"LIN",m_xlChannelMask_both,&xlPermissionMask,256,XL_INTERFACE_VERSION,XL_BUS_TYPE_LIN);

 

 

if(m_xlPortHandle==XL_INVALID_PORTHANDLE)


{

      qDebug()<<"m_xlPortHandle"<<m_xlPortHandle;

  returnXL_ERROR;

  }

 

Please suggest where I have to look for the these error.It will be great help.

Thanks in advance


Viewing all articles
Browse latest Browse all 5355

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>