Re: C/Skill interface sample
- From: Svenn Are Bjerkem <svenn.bjerkem@xxxxxxxxxxxxxx>
- Date: Mon, 3 Dec 2007 02:18:24 -0800 (PST)
On Dec 3, 10:55 am, gvita...@xxxxxxxxx wrote:
On Dec 2, 4:52 am, Svenn Are Bjerkem <svenn.bjer...@xxxxxxxxxxxxxx>
wrote:
On Nov 30, 1:54 pm, gvita...@xxxxxxxxx wrote:
On 30 Noi, 14:22, Svenn Are Bjerkem <svenn.bjer...@xxxxxxxxxxxxxx>
wrote:
On Nov 30, 1:08 pm, gvita...@xxxxxxxxx wrote:
On Nov 21, 6:42 pm, gvita...@xxxxxxxxx wrote:
Hi
I see theitkdbasesamples from Cadence, but I don't know how to use
them ...
It is somewhere a detailed description how to use those samples? (Or
similar anothers)
Thank you
Hi
If I open a layout window, I can't access the database fromitkdbase,
for example:
1. open a window (the layout.cdb.cdslock appear)
2. start the c/c++ executable that must draw a line in cellview
I get a warning, the cellview have access lock
If I close the window, and start c/c++ executable again,
and after open the window the cdba is changed with a line.
How can I draw something in layout window with a c/c++ executable
(itkdbase) if the window is previously open.
Why would you? Have you looked into skipcref.pdf on the ipc*
functions? If you want to have a c program do work for you while you
look at it you could fork the program externally and have it send
skill commands to the parent icfb session.
I hope it will never be possible for any extrernal program to ignore
the cdslock. There is a reason why a layout is locked. Somebody is
working on it. Your c-program could seriously interfere with the work
of the current designer.
--
Svenn
Thank you, Svenn
I want to interactively change the layout window from C/C++(itkdbase).
I don't need to send skill commands from c/c++ with ipc*.
If I could get the rezult returned by cv=dbOpenCellViewByType(...)
from icfb to C/C++,
maybe I could draw somthing [dbCreateLine(cv, ..., ...)] in window
also interactively.
It's that posible?
If you have some serious process and time consuming work going on in
that c++ program I can understand why you would program this in c++.
If you just want to have some kind of way to automate layout drawing
of large repetitive structures this is maybe best done directly in
skill, or if you want to use another, easier scripting language, use
the ipc* functions to start an external process, define callback
functions to communicate with that process and have that process
generate more simple skill commands which are sent back to the mother
process. The "lisp and back again" document from Christopher Nelson
(currently only in google cache) show you how to create your own CIW
window in tcl/tk. This solution is a bit old and uses old function
calls, but the idea is still valid.
Just wanting to draw layout from a c++ program doesn't make much sense
to me so you will have to explain a bit more about what you want to do
if you want to get better answers than you have got so far.
--
Svenn
Hi, Svenn and Thank You
The ideia is that I have something done in skill, that draw
interactively, real time design drc check, and I want to make it
faster by writting the process consuming code in c/c++. For test, I do
a simple c/c++ program that draw grid lines (dbCreateLine ...) and
call the c/c++ executable from a gui that was maded in skill also.
[callback is with ipcBeginProcess(sprintf(nil "./gridlines %s %s %d
%d %d" lib cell vert_grid horiz_grid step))], where "./gridlines" is c/
c++ executable.
But, if I open a layout window first, I can't access interactively
from c/c++ the cdba of that layout window, I get a warrning with
access, file layout.cdb.cdslock.
I need a solution, any ideas are welcome
Your problem is that the c-code is trying to change the db while the
editor is also changing the db. This is never going to work the way
you want it to work. Since you already use ipc* to start your c-code,
you should extend the ipc* part with callbacks to read the file
handles written by your c-code, and then have the c-code send skill
code to its child write handle (I think it is 3 or 4, but that is
given in the example in the skipcref.pdf document.) The idea is the
same as the one described for tcl/tk in "lisp and back again", but you
will use c instead of tclx.
If you insist on accessing the db through c, then you could use the
child handles to make the c-code tell icfb to go read-only, make the
changes through c-api, then tell icfb to refresh or go to edit mode.
You have to implement some kind of hand-shake between your c-code and
icfb in order to open and close the view for editing as you cannot
have two editors at the same time.
You can, of course, have your c-program just delete that cdslock
because you know that you have saved your data back to disk, but I
think that will be more evil than good programming.
Is your c-code running in client-server skill mode, or are you firing
off the procedure every time? (use of ipcBeginProcess looks very much
like the last). Look at ipcSkillProcess and the programming example in
skipcref.pdf. for the client-server type communication. Andrew has
also provided the code for a tcl server here that create a deamon you
can talk to with telnet.
I am currently looking at doing the same with python, but not for
speed issues, it is more a fun project in order to see if I can have
an easier way to collect frequently done procedures in an environment
outside icfb. I don't expect this project to finish anytime soon. I
chose python as OpenAccess is supposed to have a python API but we are
currently using cdb.
--
Svenn
.
- Follow-Ups:
- Re: C/Skill interface sample
- From: gvitalie
- Re: C/Skill interface sample
- References:
- Re: C/Skill interface sample
- From: Svenn Are Bjerkem
- Re: C/Skill interface sample
- From: gvitalie
- Re: C/Skill interface sample
- Prev by Date: Re: C/Skill interface sample
- Next by Date: Re: C/Skill interface sample
- Previous by thread: Re: C/Skill interface sample
- Next by thread: Re: C/Skill interface sample
- Index(es):
Relevant Pages
|
|