Beijer Electronics (formerly QSI Corporation)

Manufacturer of Mobile Data and Human Machine Interface Terminals.
It is currently Tue Nov 21, 2017 8:40 pm

All times are UTC - 7 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: include
PostPosted: Tue Jul 20, 2010 6:24 pm 
Offline

Joined: Fri May 28, 2010 6:35 am
Posts: 22
How does `include` work? I am auto-generating my communications objects externally and include them into my code. It looks like it took the include file and merged it into the code. Now if I change the external file it doesn't see the changes. The original contents are there and reloading the workspace or restarting foundry doesn't trigger it to take the new file either.

What am I missing here? What is the right way to do what I want to do?

Thanks!


Top
 Profile  
 
 Post subject: Re: include
PostPosted: Wed Jul 21, 2010 6:22 am 
Offline
QSI Support
QSI Support
User avatar

Joined: Wed Mar 08, 2006 12:25 pm
Posts: 881
Location: Salt Lake City, Utah
When you typed
Code:
include "filename"


In Qlarity foundry, it should have given you a warning that it wanted to merge the include into the main workspace, and would do so the next time the workspace was opened. This is due to certain legacy requirements of Qlarity Foundry.

What you probably want to do is move your include statement to the advanced code section. (If the advanced code section is not visible, go to Tools->Settings->Editor->Show Advanced Code Sections)

Type your include line in there. Qlarity Foundry does not monitor the advanced code section for special Qlarity code constructs such as include, declare and define statements.

_________________
Jeremy
http://www.beijerinc.com


Top
 Profile  
 
PostPosted: Fri Jul 30, 2010 9:03 am 
Offline

Joined: Fri May 28, 2010 6:35 am
Posts: 22
How do I edit or set breakpoints in my included code?

I have my include statement in the advanced section and it works but I can't step into the code or have it available for debugging or breakpoints. When I "step into" it seems to ignore that file and show the next lower function that my included code calls but is in a library instead.


Top
 Profile  
 
 Post subject: Re: include
PostPosted: Fri Jul 30, 2010 10:59 am 
Offline
QSI Support
QSI Support
User avatar

Joined: Wed Mar 08, 2006 12:25 pm
Posts: 881
Location: Salt Lake City, Utah
Qlarity Foundry has fairly limited support for included code sections. When the debugger attempts to stop execution on a line that is unknown to the IDE, the debugger is unable to display code on that line, so it gives up and attempts the next instruction. (This is similar to the fact that you cannot double click compiler errors that occur in external files). This is something we could consider for future Qlarity development. Up until now, there has been relatively little use of the include directive.


Top
 Profile  
 
 Post subject: Re: include
PostPosted: Mon Aug 02, 2010 8:39 am 
Offline

Joined: Fri May 28, 2010 6:35 am
Posts: 22
It would be nice if it was added and it doesn't seem like a difficult thing to add.

I guess in the meantime I could remove the include and cut and paste the file into the advanced section. that would probably get me through the initial development. The included code is autogenerated and repetitive so that once it works I shouldn't have to step into it again.

For me I have a few dozen commands in my serial protocol and each one can have a structure of data fields. What I do is autogenerate Qlarity object for each command that has the fields (properties) an the Pack() and Unpack() methods to translate between the properties and the binary buffer used in the serial protocol. I also auto generate the error codes and strings this way. These do change which is why I want to automate it so that the change is only one place and I don't have to modify the qlarity code directly.

thanks,

jv


Top
 Profile  
 
 Post subject: Re: include
PostPosted: Mon Aug 02, 2010 8:58 am 
Offline
QSI Support
QSI Support
User avatar

Joined: Wed Mar 08, 2006 12:25 pm
Posts: 881
Location: Salt Lake City, Utah
Would you be interested in a utility that could take your dynamically generated .qly file and add it to a library? This would solve most of your include headaches and allow you to debug your application.

When we author our object libraries, we create normal .qly workspaces that contain the object template plus testing code. We use this utility, called NLS, to strip the testing code and place the template into a library. That way we can, with a single command, build all the Qlarity libraries.

We do not support the utility externally (i.e. you would be on your own with it), but you could use it if it meets your needs.

A couple of forum threads talk about NLS:
viewtopic.php?f=6&t=3699&p=4838&hilit=NLS#p4838
viewtopic.php?f=6&t=3867&p=5684&hilit=NLS#p5684

_________________
Jeremy
http://www.beijerinc.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 7 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group