1 / 6

Implementation CAN Communication Engine

This document outlines the implementation details of a CAN Communication Engine by Hansang Kwon and Bongsu, elaborated on October 14, 2002. The engine operates as a TCP Server, consistently listening on port 4444 for incoming connections. It handles message reception and queuing through a structured message queue system utilizing a hash table for synchronization. Key functionalities include subscribing and unsubscribing from message notifications, retrieving messages from the queue, and sending messages to specified IP addresses. This implementation is crucial for ensuring reliable communication in CAN systems.

karl
Télécharger la présentation

Implementation CAN Communication Engine

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Implementation CANCommunication Engine By Rhee, Hansang Kwon, Bongsu 10/14/2002

  2. Communication Engine : Over View TCPServer TCP Listener Msg RCV MsgQueue Register CommEngine Send Msg API

  3. Communication Engine • TCP Sever : Demon always running • TCP port (4444) Listening • Process • A node try connect -> accept->receive msg ->Queuing Message • Message Queue handling • Socket Interface • Receive message • Send message

  4. Class TCP Server • Thread Have to wait until accept a connection… • Message Queue Using HashTable (id = key, msg = value) Synchronization ( Mutex or Monitor)

  5. Class CommEgine public bool SubscribeMsg(byte[] id) - insert id in the register public bool UnsubscribeMsg(byte[] id) - delete id in the register public byte[] GetMsg(byte[] id) - register check -> get Msg from Msg Queue -> return Msg public bool SendMsg(byte[] id, byte[] msg, string ip) - create a socket -> connect -> send Msg

More Related