Commit Graph
22 Commits
Author SHA1 Message Date
Andrew Johnsonandmdavidsaver 98e81a542e Use epicsMutex and epicsEvent instead of pv::data equivalents 2021-01-05 11:01:02 -08:00
Andrew Johnsonandmdavidsaver f9c40e96cf Collect ca_client_context operations
Each instance of the caContext class represents a separate CA context,
so each CAChannelProvider creates one and keeps a shared_ptr to it,
making that available to its channels and channel operations. These
also take their own shared_ptr to it as well so the context cannot be
destroyed while it might be needed.

A related caContext Attach object is intended to be short-lived, and
to be allocated on the stack. When created it saves the current CA
context for the thread, replacing it from the caContext given to its
constructor. CA operations will now use the attached context. When the
Attach destructor runs it detaches the thread from the current context
(checking still has the expected value) and re-attaches the thread to
any context that was saved by the constructor.
2021-01-05 11:01:02 -08:00
Andrew Johnsonandmdavidsaver 06c2fb579f Replaced 4 notification threads with 2 notifierConveyors
Channel connection notifications are now handled by connectNotifier,
getDone, putDone and monitor events handled by resultNotifier.
A notifierConveyor is generic, and contains a queue and a thread.
You pass a Notification pointing to a NotifierClient to a Conveyor's
notifyClient() method, and the thread will call the client's
notifyClient() method once it reaches the front of the queue.

The conveyor threads stop when the caProvider is destroyed.
The queue stores weak pointers, so queued notifications won't prevent
client objects from being destroyed.
2021-01-05 11:01:02 -08:00
Andrew Johnsonandmdavidsaver 2729903a10 Make the channelConnectThread per-provider
This passes the tests (on MacOS).
2021-01-05 11:01:02 -08:00
Andrew Johnsonandmdavidsaver 44fda51935 Start of major overhaul
Moved duplicated EXCEPTION_GUARD macro to private header file.
Removed all DEBUG_LEVEL and similar prints.
Some reformatting and code simplification.
2021-01-05 11:01:02 -08:00
mrkraimer 16268cc9d6 add channelConnectThread; should fix connecting to 50000 channels 2018-07-20 13:18:59 -04:00
mrkraimer df45c70149 add putDoneThread and getDoneThread; fix issue 114 2018-07-14 11:46:26 -04:00
mrkraimer 184e92b346 delete stopMonitorThread; add monitorEventThread 2018-06-19 13:11:01 -04:00
mrkraimer c377d35aee StopMonitorThread addNoEventsCallback replaces waitForNoEvent 2018-06-10 14:28:23 -04:00
mrkraimer fe8184cf95 added aux thread to call ca_clear_subscription 2018-06-08 15:22:08 -04:00
mrkraimer 99d20ae903 get and monitor: only report fields that have changed 2018-02-16 06:03:57 -05:00
mrkraimer 952c482d68 merge with latest from epics-base 2018-02-08 07:58:52 -05:00
mrkraimer fcaeb414a0 termination and error handling changes.
epicsAtExit is no longer used to call ca_context_destroy.
It is now called from the destructor for CAChannelProvider.

Several changes were made for handling errors.
2018-02-06 10:20:29 -05:00
Michael Davidsaver a039b48c1f caProvider: remove deprecation warnings
make no-op destroy() private to prevent
accidental usage.
2018-01-31 12:49:10 -08:00
Michael Davidsaver d33356ced6 drop deprecated 2018-01-31 12:48:59 -08:00
mrkraimer d3ce104c33 fix issue #77 2017-12-23 06:35:23 -05:00
mrkraimer 39c8eb90e0 remove more code for destroy 2017-09-06 14:06:41 -04:00
mrkraimer a652086e91 channelGet, etc now have shared_ptr to Channel 2017-09-05 06:01:43 -04:00
mrkraimer 30650bfa48 merge latest from epics-base 2017-09-01 14:34:51 -04:00
mrkraimer 734ad725ea changes for RAII 2017-09-01 10:34:15 -04:00
Michael Davidsaver 146b445832 caProvider add reftrack counters 2017-08-30 17:51:52 -05:00
mrkraimer d36e6f31b1 CAProvider: only CAClientFactory is public 2017-08-07 11:05:20 -04:00