Commit Graph

376 Commits

Author SHA1 Message Date
Michael Davidsaver
c98c872835 fix race in channelAccessIFTest 2017-07-04 12:20:51 +02:00
Michael Davidsaver
aadf428212 test debugging 2017-07-03 19:32:55 +02:00
Michael Davidsaver
4fe837c9a0 add RPC loopback test 2017-07-03 19:24:01 +02:00
Michael Davidsaver
749e8d71d1 replace all internal use of getChannelProviderRegistry() 2017-07-03 19:24:00 +02:00
Michael Davidsaver
a3185f11da MonitorElement const and state tracking
Mark MonitorElement member pointers as const
to prevent user code from accidentally mangling.

Add 'state' tracking to help debugging
2017-06-27 15:42:27 +02:00
Michael Davidsaver
35d2c610bf separate ChannelProviderRegistry for client/server 2017-06-21 14:41:24 +02:00
Michael Davidsaver
3a190cb572 deprecate RPCClient::sendRequest()
Changes to provider factory registery make this
very inefficient (build a new client context of each request)
2017-06-08 20:37:20 +02:00
Michael Davidsaver
3e37781d85 update RPCClient
Addition ctor to use specific Provider (w/ custom config).
Start connect immediately.
Remove need to issueConnect()/waitConnect().
2017-06-08 20:35:43 +02:00
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
ce25f0b175 ServerContext ref. loop breaking and threading
Drop unnecessary "worker" thread which does no work.
Ensure that returned shared_ptr is unique()==true.

Add ServerContext::create() to start a new server
with specific config and/or providers
2017-05-31 11:40:51 +02:00
Michael Davidsaver
7c85e6073b move ServerContextImpl into private header 2017-05-30 12:07:23 +02:00
Michael Davidsaver
3283bed413 drop PVA_ALIGNMENT constant
This will forevermore be 1, so no
reason to incur complexity of testing this.

size % PVA_ALIGNMENT -> 0
alignBuffer(PVA_ALIGNMENT) -> no-op
alignedValue(val, PVA_ALIGNMENT) -> val
2017-05-24 17:20:17 -04:00
Michael Davidsaver
87dca19708 codec: avoid indirection when accessing buffers
avoid some indirection to make this code easier to follow.
move buffer lower limit to base class.
2017-05-24 17:20:17 -04:00
Michael Davidsaver
b05e7699b5 remove no-op lock/unlock from Lock sub-classes 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
Matej Sekoranja
74028c9640 testRAII added 2016-05-19 14:53:16 +02:00
Andrew Johnson
0884a199b3 Adjust time-stamp comparison to be approximately 1 second.
Also found another time-stamp comparison test, similar changes there.
2016-04-21 15:34:39 -05:00
Andrew Johnson
6e0b772880 Improve test robustness (was failing on a Mac VM)
Store and compare the complete time-stamp, not just the seconds field.
2016-04-21 11:13:19 -05:00
Andrew Johnson
9a8644033d Prevent redefinition of NOMINMAX
While this protection is not strictly necessary here, if someone
does a cut-and-paste into a header file it should be included.
2016-04-06 15:22:11 -05:00
Andrew Johnson
962e139c1a Don't use %z modifier, not portable. 2016-04-06 11:40:16 -05:00
Andrew Johnson
d76d7faab6 Prevent redefinition warning on MinGW 2016-04-06 11:33:59 -05:00
Andrew Johnson
8fdf0d7411 Use lower-case header filenames for MinGW cross-compilation 2016-04-06 10:59:22 -05:00
Matej Sekoranja
04a90c4780 c++11 compilation issues
references #28
2016-03-23 22:04:09 +01:00
Michael Davidsaver
15449dde6b used aliased names for Monitor* 2016-03-18 15:01:48 -04:00
Matej Sekoranja
5279d247ca general indent beautification 2016-03-10 23:36:16 +01:00
Matej Sekoranja
b1539df759 remote client context: context-provider relationship removed, unnecessary dangling transport creation (server on multiple NIFs) 2016-03-08 22:25:21 +01:00
Matej Sekoranja
9b6fdaaaff rtems: reference to 'Thread' is ambiguous 2016-03-03 00:29:54 +01:00
Matej Sekoranja
a27df1f8f4 rtems: reference to 'Configuration' is ambiguous 2016-03-02 23:50:00 +01:00
Matej Sekoranja
27a292d7f2 vxWorks test build fix 2016-03-02 23:41:30 +01:00
Matej Sekoranja
d380e4c367 VxWorks compilation fixes 2016-03-02 15:01:14 +01:00
Matej Sekoranja
56b6279035 manual merge 2016-03-02 13:34:05 +01:00
Matej Sekoranja
0db4a9a342 udp transport initialization refactoring (deduplication) 2016-03-02 12:37:58 +01:00
Matej Sekoranja
87fa71070d automatic broadcast port 2016-03-02 11:08:58 +01:00
Matej Sekoranja
19031af095 added testClientFactory test 2016-03-01 08:22:05 +01:00
Matej Sekoranja
9be026efc7 allow EPICS_PVAS_INTF_ADDR_LIST=127.0.0.1, tests pass now 2016-02-25 10:37:44 +01:00
Michael Davidsaver
069555a524 remove use of throw() specifier 2016-02-10 12:06:35 -05:00
Matej Sekoranja
125822d18f one instance of responseHandler per context 2015-12-17 09:12:33 +01:00
Matej Sekoranja
a692546170 ServerChannelRequesterImpl::getRequesterName() returns client's address 2015-12-16 23:30:53 +01:00
Matej Sekoranja
91b5cc707d fixed testChannelAccess 2015-12-16 13:52:56 +01:00
Matej Sekoranja
22d6db2818 fixed testServer 2015-12-16 12:00:20 +01:00
Michael Davidsaver
b64e99c680 todo: attempt to fix testChannelAccess 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
Michael Davidsaver
b9dd9e8e6c getRemoteName()
Cache the TCP peer address as a string and pass it to createChannel().
2015-12-14 17:04:57 -05:00
Michael Davidsaver
4a1bfff40f Remove clearSendQueue
Use BreakTransport exception instead
2015-12-14 16:59:55 -05:00
Michael Davidsaver
730d30fe54 AbstractCodec use fair_queue 2015-12-14 16:59:55 -05:00
Matej Sekoranja
55328e4a53 merge 2015-10-15 21:18:56 +02:00
Dave Hickin
0af5599457 Remove calls of deprecated getScalarArrayField 2015-07-24 15:00:25 +01:00
Michael Davidsaver
ef46931276 use getSubField 2015-06-22 15:04:44 -04:00
Matej Sekoranja
b381d84e64 cancel(), done(), ackAny param 2015-05-06 11:08:23 +02:00
Matej Sekoranja
197f763452 pipeline support 2015-04-29 15:17:54 -04:00