FMUSER Wirless Transmit Video And Audio More Easier !

[email protected] WhatsApp +8618078869184
Language

    A British IT SJA1000 CAN communication interface functions extended application description

     

    On the basis of the interface function provided by the existing CAN_API.H, the CAN interface communication is introduced, which is mainly for each received data plus a time label to support real-time control applications. For compatibility with previous interface functions, can_api.h remain unchanged, another British record company defines a can_api_ex.h, defines the CAN data packet structure with time tags in the file. Typedef struct { // CAN data message ID, where bit 0-28: CAN identifier (11/29 bit) bit 29: error frame flag (0 = data frame, 1 = error frame) bit 30: remote transmission request flag (1 = rtr frame) bit 31: frame format flag (0 = standard 11 bit, 1 = extended 29 bit) DWORD dwCAN_ID; // CAN data length of the data packets DWORD dwCAN_DatLen; Data // CAN data packets UCHAR ucDat [8]; // CAN data packet time stamp in milliseconds DWORD dwTimeTick; } CAN_FRAME, * PCAN_FRAME; CAN acquiring time-stamped received message, may be implemented by a standard calling the ReadFile (), the respective transmission function can call the WriteFile () to process. The following method to receive the thread acquiring CAN data packets with a time stamp: WaitForSingleObject (ceCAN->m_hRxEvent, 15); { dwLen = 0; bResult = ReadFile (ceCAN->m_hCAN, & CeCAN->can_frame, sizeof (CAN_FRAME), & dwLen, NULL); if (dwLen == sizeof (CAN_FRAME)) // receive a can frame { if (dwLastTimeTick == 0) { printf ( '0x% 08x -% ld \ n', ceCAN->can_frame.dwCAN_ID, ceCAN->can_frame.dwTimeTick); dwLastTimeTick = ceCAN->can_frame.dwTimeTick; } Else { printf ( '0x% 08x -% ld \ n', ceCAN->can_frame.dwCAN_ID, ceCAN->can_frame.dwTimeTick-dwLastTimeTick); dwLastTimeTick = ceCAN->can_frame.dwTimeTick; } } } After testing, the embedded time stamp record CAN board in the UK to ensure accuracy in ± 1ms. Since the CAN data read time-stamped message uses the standard system function ReadFile, so interested in the extension and old customers, the need for the existing British record embedded motherboards WinCE kernel upgrade, can_api.lib do not need any changes. Referring particularly can_api.h interface function defined in "SJA1000 based CAN communication interface function for use" article. Interested customers can create and British technical support. Read more

     

     

     

     

    List all Question

    Nickname

    Email

    Questions

    Our other product:

    Professional FM Radio Station Equipment Package

     



     

    Hotel IPTV Solution

     


      Enter email  to get a surprise

      fmuser.org

      es.fmuser.org
      it.fmuser.org
      fr.fmuser.org
      de.fmuser.org
      af.fmuser.org ->Afrikaans
      sq.fmuser.org ->Albanian
      ar.fmuser.org ->Arabic
      hy.fmuser.org ->Armenian
      az.fmuser.org ->Azerbaijani
      eu.fmuser.org ->Basque
      be.fmuser.org ->Belarusian
      bg.fmuser.org ->Bulgarian
      ca.fmuser.org ->Catalan
      zh-CN.fmuser.org ->Chinese (Simplified)
      zh-TW.fmuser.org ->Chinese (Traditional)
      hr.fmuser.org ->Croatian
      cs.fmuser.org ->Czech
      da.fmuser.org ->Danish
      nl.fmuser.org ->Dutch
      et.fmuser.org ->Estonian
      tl.fmuser.org ->Filipino
      fi.fmuser.org ->Finnish
      fr.fmuser.org ->French
      gl.fmuser.org ->Galician
      ka.fmuser.org ->Georgian
      de.fmuser.org ->German
      el.fmuser.org ->Greek
      ht.fmuser.org ->Haitian Creole
      iw.fmuser.org ->Hebrew
      hi.fmuser.org ->Hindi
      hu.fmuser.org ->Hungarian
      is.fmuser.org ->Icelandic
      id.fmuser.org ->Indonesian
      ga.fmuser.org ->Irish
      it.fmuser.org ->Italian
      ja.fmuser.org ->Japanese
      ko.fmuser.org ->Korean
      lv.fmuser.org ->Latvian
      lt.fmuser.org ->Lithuanian
      mk.fmuser.org ->Macedonian
      ms.fmuser.org ->Malay
      mt.fmuser.org ->Maltese
      no.fmuser.org ->Norwegian
      fa.fmuser.org ->Persian
      pl.fmuser.org ->Polish
      pt.fmuser.org ->Portuguese
      ro.fmuser.org ->Romanian
      ru.fmuser.org ->Russian
      sr.fmuser.org ->Serbian
      sk.fmuser.org ->Slovak
      sl.fmuser.org ->Slovenian
      es.fmuser.org ->Spanish
      sw.fmuser.org ->Swahili
      sv.fmuser.org ->Swedish
      th.fmuser.org ->Thai
      tr.fmuser.org ->Turkish
      uk.fmuser.org ->Ukrainian
      ur.fmuser.org ->Urdu
      vi.fmuser.org ->Vietnamese
      cy.fmuser.org ->Welsh
      yi.fmuser.org ->Yiddish

       
  •  

    FMUSER Wirless Transmit Video And Audio More Easier !

  • Contact

    Address:
    No.305 Room HuiLan Building No.273 Huanpu Road Guangzhou China 510620

    E-mail:
    [email protected]

    Tel / WhatApps:
    +8618078869184

  • Categories

  • Newsletter

    FIRST OR FULL NAME

    E-mail

  • paypal solution  Western UnionBank OF China
    E-mail:[email protected]   WhatsApp:+8618078869184   Skype:sky198710021 Chat with me
    Copyright 2006-2020 Powered By www.fmuser.org

    Contact Us