allowed acces to the chid from the evid

This commit is contained in:
Jeff Hill
2000-10-06 00:14:00 +00:00
parent c07cd661cd
commit c5f33a7475
6 changed files with 17 additions and 3 deletions

View File

@@ -422,6 +422,11 @@ int epicsShareAPI ca_clear_event ( evid pMon )
return ECA_NORMAL;
}
chid epicsShareAPI ca_evid_to_chid ( evid pMon )
{
return & pMon->channel ();
}
/*
* ca_clear_channel ()
*/

View File

@@ -1261,7 +1261,7 @@ void caTaskExistTest ()
printf ( "in ca_task_exit() for %f sec\n", delay );
}
verifyDataTypeMacros ()
void verifyDataTypeMacros ()
{
short type;
@@ -1314,6 +1314,7 @@ int acctst ( char *pName, unsigned channelCount, unsigned repetitionCount )
status = ca_search ( pName, &chan );
SEVCHK ( status, NULL );
assert ( strcmp ( pName, ca_name (chan) ) == 0 );
status = ca_pend_io ( 100.0 );
SEVCHK ( status, NULL );

View File

@@ -479,7 +479,7 @@ void cac::beaconNotify ( const inetAddrID &addr )
status = getsockname ( this->pudpiiu->getSock (), (struct sockaddr *) &saddr, &saddr_length );
if ( status < 0 ) {
epicsPrintf ( "CAC: getsockname () error was \"%s\"\n", SOCKERRSTR (SOCKERRNO) );
this->printf ( "CAC: getsockname () error was \"%s\"\n", SOCKERRSTR (SOCKERRNO) );
this->defaultMutex.unlock ();
return;
}

View File

@@ -574,6 +574,8 @@ epicsShareFunc int epicsShareAPI ca_add_masked_array_event
long mask
);
epicsShareFunc chid epicsShareAPI ca_evid_to_chid ( evid id );
/************************************************************************/
/* Remove a function from a list of those specified to run */
/* whenever significant changes occur to a channel */
@@ -952,7 +954,7 @@ epicsShareFunc int epicsShareAPI ca_import_cancel (threadId tid);
#else /* CAC_ANSI_FUNC_PROTO */
epicsShareFunc short epicsShareAPI ca_get_field_type ();
epicsShareFunc unsigned long epicsShareAPI ca_element_count ();
epicsShareFunc char * epicsShareAPI ca_name (chid chan);
epicsShareFunc char * epicsShareAPI ca_name ();
epicsShareFunc enum channel_state epicsShareAPI ca_state ();
epicsShareFunc void epicsShareAPI ca_set_puser ();
epicsShareFunc void epicsShareAPI ca_get_puser ();

View File

@@ -87,6 +87,7 @@ struct oldSubscription : public cacNotify {
public:
oldSubscription ( oldChannel &chan, caEventCallBackFunc *pFunc, void *pPrivate );
void destroy ();
oldChannel &channel ();
void * operator new ( size_t size );
void operator delete ( void *pCadaver, size_t size );

View File

@@ -24,6 +24,11 @@ oldSubscription::~oldSubscription ()
{
}
oldChannel &oldSubscription::channel ()
{
return this->chan;
}
void oldSubscription::completionNotify (unsigned type, unsigned long count, const void *pData)
{
struct event_handler_args args;