Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic Rhapsody (steve huntington)
Decrease font size
Increase font size
Topic Title: Serial port handler in Rhapsody
Topic Summary:
Created On: 19-Oct-2005 14:52
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 19-Oct-2005 14:52
User is offline View Users Profile Print this message


paul brown

Posts: 3
Joined: 30-Mar-2005

Is it possible to get rhapsody to produce code that responds to windows events/interrupts for the serial ports on a windows system.

Outside of Rhapsody I would create a thread that used setCommMask and WaitCommEvent to wait on an EV_RXCHAR event. However I can not see how I would acheive the same thing within Rhapsody.

The closest I can get is to use a state machine that polls the serial port but this is not very efficient and the smallest resolution is 1ms.

Is it possible to produce such an event handler in Rhapsody?

Paul
Report this to a Moderator Report this to a Moderator
 15-Dec-2005 13:34
User is offline View Users Profile Print this message


Paul Coene

Posts: 10
Joined: 15-Dec-2005

Well, you can do just about anything in Rhapsody that you can do outside of it. If you need to use OS specific calls, then you wouldn't be able to code gen for another OS without changes however.

You can make an object it's own thread bu making it active instead of sequential on the features tab.

If you just want an object to go into a loop doing blocked reads, make the object a thread usinf the "active" tag and then put your code loop inside a state in the object. The state model could eventually evolve to reset itself and reinitialize on faults, but always ends up in the looping state when connected, with a while or other looping construct.
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic Rhapsody forum.
There are currently 0 users logged in.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.