Commit Graph

35 Commits

Author SHA1 Message Date
Michael Davidsaver
8febd176bb PVA client ref. loop breaking
Adjust ownership of BaseRequestImpl sub-classes.
Keep two weak_ptr<>.
one (internal) for tracking relations with Channel.
one (external) for tracking relations w/ user code, and send Q.

external wraps internal, and calls destroy() to break
ref. loops involving internal.

death to m_thisPointer!
2017-06-07 13:33:10 +02:00
Michael Davidsaver
de84fadeb7 ChannelProviderRegistry::add w/ factory function 2017-06-06 10:35:13 +02:00
Michael Davidsaver
34eeb0717a SimpleChannelProviderFactory: weak_ptr to shared instance 2017-06-06 09:46:47 +02:00
Michael Davidsaver
860054a7a2 ChannelProviderRegistry update add()/remove()
add() return created SimpleChannelProviderFactory instance.

remove()

missing Lock
and remove by instance as well as by name.
2017-06-06 08:28:08 +02:00
Michael Davidsaver
7c2a093338 add ChannelBaseRequester::channelDisconnect()
per-operation notification of channel disconnect/destroy.
2017-05-25 18:01:41 -04:00
Michael Davidsaver
d7a7b81900 move monitor.h from pvDataCPP 2017-05-24 17:20:17 -04:00
Michael Davidsaver
24c9b31cf6 update pvAccess.h doc comments
describe how things should be!
2017-05-24 17:20:17 -04:00
Michael Davidsaver
bbe6cb2553 Lock provide default no-op implementation for lock/unlock 2017-05-24 17:20:17 -04:00
Michael Davidsaver
d404769133 add default for first Channel::createChannel()
default for first form which calls the second
2017-05-24 17:20:17 -04:00
Michael Davidsaver
568054ce68 add virtual dtors
being pedantic...
2017-05-24 17:20:17 -04:00
Michael Davidsaver
9253c31c0b rework ChannelProviderRegistry
Replace interface+impls with a single concrete container
which wraps a map.

This breaks code which was sub-classing.
However, no external code can be found which does this.

A build() method is used instead of simple ctor so
that the ctor is private, which will cause theoretical
external sub-class code to fail to compile.

Code using getChannelProviderRegistry()
and existing methods will behave as before.

Add ChannelProviderRegistry::getFactory() for pass through
to ChannelProviderFactory (Registery is just a proxy()...)

Remove existing get/create virtual method in favor of getFactory.
Update both existing implementations.

Add SimpleChannelProviderFactory to cut down on boilerplace
for the common case.

Add method to clear mapping and release any saved sharedInstance.
2017-04-25 21:15:43 -04:00
Andrew Johnson
7ed5f8b4bf Wrong keyword, use epicsShareFunc 2016-04-06 10:59:22 -05:00
Matej Sekoranja
cce2a6c4b7 Merge pull request #36 from mdavidsaver/reqoptypedef
Add requester_type and operation_type
2016-03-21 22:00:42 +01:00
Matej Sekoranja
f14fdd207c merge 2016-03-21 21:54:37 +01:00
Michael Davidsaver
8679619c83 add requester_type and operation_type
Typedefs to link associated *Requester classes
with their associated "operation"s.

eg. ChannelGet::requester_type is ChannelGetRequester
and ChannelGetRequester::operation_type is ChannelGet.

ChannelFind/List is an ambiguous.  All others
are 1-to-1.

ChannelFind::requester_type is ChannelFind
operation_type for both ChannelListRequester and
ChannelFindRequester is ChannelFind.
2016-03-20 10:17:43 -04:00
Michael Davidsaver
15449dde6b used aliased names for Monitor* 2016-03-18 15:01:48 -04:00
Michael Davidsaver
7af6031da6 alias Requester and Monitor into epics::pvAccess::
While defined in pvDataCPP neither of these
is actually used there.
Alias into the epics::pvAccess:: namespace
as a first step towards moving
these definitions to this module.
2016-03-18 15:00:45 -04:00
Michael Davidsaver
f3035ff758 Defaults for some Channel methods
printInfo() to std::cout, as a no-op
isConnected() using getConnectionState()
various create*() fail with "Not Implemented"
Requester methods try to forward to ChannelRequest,
fallback to std::cerr.
2016-03-18 14:57:21 -04:00
Matej Sekoranja
5279d247ca general indent beautification 2016-03-10 23:36:16 +01:00
Matej Sekoranja
56b6279035 manual merge 2016-03-02 13:34:05 +01:00
Michael Davidsaver
58914fd093 update Makefiles for pv/
add pv/ prefix for INC
2016-01-26 15:50:49 -05:00
Michael Davidsaver
49058d260b move installed headers to pv/ sub-dir 2016-01-26 15:36:07 -05:00
Matej Sekoranja
a692546170 ServerChannelRequesterImpl::getRequesterName() returns client's address 2015-12-16 23:30:53 +01:00
Michael Davidsaver
609237a551 TODO: add virtual dtor for all classes w/ virtual methods 2015-12-14 17:04:58 -05:00
Michael Davidsaver
c0ee432598 Allow ChannelProviderFactory::newInstance to accept a Configuration
Deprecate ChannelProvider::configure(), which doesn't do much and
is incompatible with the idea of shared context.

A lot of down-stream mess related to the confused relationship
between InternalClientContextImpl and InternalClientContextImpl::ChannelProviderImpl.
This is changed to compose the provider within the context
and use a nested shared_ptr so that references to the provider
are really references to the context.

This brings the ownership semantic in line with what the API
suggests, and what other providers implement.
2015-12-14 17:04:57 -05:00
mrkraimer
99c7a1ae24 more work on pvAccessCPP.html 2015-12-07 12:27:22 -05:00
Matej Sekoranja
55328e4a53 merge 2015-10-15 21:18:56 +02:00
Matej Sekoranja
5884d5b778 PipelineMonitor instead of epics::pvData::Monitor 2015-10-15 20:59:15 +02:00
Marty Kraimer
8fd0bee15e remove hg files; add .gitignore; update documentation 2015-06-16 07:41:06 -04:00
Ralph Lange
be9d267626 REVERT: Merge pull request #4 from mrkraimer/default
merged
(reverted from commit 9869e611ea)
2015-06-12 16:13:26 +02:00
Marty Kraimer
bf550ebd4e Update pvAccessCPP.html. pvAccessOverview.html also appears in doxygen. 2015-06-05 09:09:34 -04:00
Matej Sekoranja
16eeeb992b get/setLength capacity removed 2014-07-22 09:04:08 +02:00
Matej Sekoranja
ba4102639e String -> std::string, toString methods removed 2014-06-19 14:29:41 +02:00
Matej Sekoranja
99df13dc72 completed merge 2014-06-10 00:09:08 +02:00
Andrew Johnson
a886984258 Rename pvAccessApp to src, adjust Makefiles 2014-03-28 11:53:02 -05:00