Download presentation
Presentation is loading. Please wait.
1
Implementation CAN Communication 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 Socket Interface
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
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.