Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  Index 2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018 
<== Date ==> <== Thread ==>

Subject: RE: A question about how to send message in the callback function
From: "Jeff Hill" <johill@lanl.gov>
To: 'ÕÔ»¶' <zhaohuan@sinap.ac.cn>, <core-talk@aps.anl.gov>
Date: Mon, 27 Mar 2006 08:45:24 -0700

PPS: I made some revisions in that section of the manual this morning.

 

Jeff

 

CA Client Contexts and Application Specific Auxiliary Threads

 

It is often necessary for several CA client side tools running in the same address space (process) to be independent of each other. For example, the database CA links and the sequencer are designed to not use the same CA client library threads, network circuits, and data structures. Each thread that calls ca_context_create() for the first time either directly, or implicitly when calling any CA library function for the first time, creates a CA client library context. A CA client library context contains all of the threads, network circuits, and data structures required to connect and communicate with the channels that a CA client application has created. The priority of auxiliary threads spawned by the CA client library are at fixed offsets from the priority of the thread that called ca_context_create(). An application specific auxiliary thread can join a CA context by calling ca_attach_context() using the CA context identifier that was returned from ca_current_context() when it is called by the thread that created the context which needs to be joined. A context which is to be joined must be preemptive - it must be created using ca_context_create(ca_enable_preemptive_callback). It is not possible to attach a thread to a non-preemptive CA context created explicitly or implicitly with ca_create_context(ca_disable_preemptive_callback). Once a thread has joined with a CA context it need only make ordinary ca_xxxx() library calls to use the context.

 

 

 

-----Original Message-----
From: ÕÔ»¶ [mailto:zhaohuan@sinap.ac.cn]
Sent: Sunday, March 26, 2006 8:52 PM
To: core-talk@aps.anl.gov
Subject: A question about how to send message in the callback function

 

 Dear everybody:
 
 
     I am a novice to EPICS. I want to develop a simple
 application which will have functions of put,get and monitor channels in
 IOC. I have installed  EPICS Base R3.14.5 in a PC/Windows .
 
 
Now, I face a puzzle.  I cteate a auxiliary thread. And in the auxiliary thread, I do an operation of create a 
 
monitor(ca_create_subscription). Then in the monitors callback faction, I make an operation of sendmessage. The problem 
 
is coming. The runing programe is dead at the sendmessage step.
 
       
       If somebody have the experience,  tell me what is wrong in my application, and how can I resolve it.
 
  Thanks
 
  ZHAO HUAN
 
 Shanghai Institute of Applied Physics
 Chinese Academy of Sciences
 P. O. Box 800-204, Shanghai 201800, P. R. China
 Tel: +86-21-59553146

 


References:
A question about how to send message in the callback function 赵欢

Navigate by Date:
Prev: RE: A question about how to send message in the callback function Jeff Hill
Next: Re: EPICS Meeting Agenda Ralph Lange
Index: 2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018 
Navigate by Thread:
Prev: RE: A question about how to send message in the callback function Jeff Hill
Next: Re: EPICS Meeting Agenda Ralph Lange
Index: 2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018 
ANJ, 02 Feb 2012 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·