From 63663f36c60bd9ca7c6da5aac278fc510d79bb26 Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Tue, 27 Jul 2021 23:18:57 -0700 Subject: [PATCH] 0.2.0 --- documentation/client.rst | 6 +++--- documentation/details.rst | 2 ++ documentation/releasenotes.rst | 18 +++++++++++++++++- documentation/server.rst | 4 ++-- setup.py | 2 +- src/pvxs/client.h | 24 ++++++++++++------------ src/pvxs/data.h | 4 ++-- src/pvxs/netcommon.h | 2 +- src/pvxs/server.h | 6 +++--- src/pvxs/srvcommon.h | 8 ++++---- src/pvxs/unittest.h | 2 +- src/pvxs/util.h | 4 ++-- 12 files changed, 50 insertions(+), 32 deletions(-) diff --git a/documentation/client.rst b/documentation/client.rst index 61f9c39d8..8ac75c51a 100644 --- a/documentation/client.rst +++ b/documentation/client.rst @@ -28,10 +28,10 @@ EPICS_PVA_BROADCAST_PORT EPICS_PVA_CONN_TMO Inactivity timeout for TCP connections. For compatibility with pvAccessCPP a multiplier of 4/3 is applied. So a value of 30 results in a 40 second timeout. - Prior to UNRELEASED this variable was ignored. + Prior to 0.2.0 this variable was ignored. -.. versionadded:: UNRELEASED - Prior to UNRELEASED *EPICS_PVA_CONN_TMO* was ignored. +.. versionadded:: 0.2.0 + Prior to 0.2.0 *EPICS_PVA_CONN_TMO* was ignored. .. code-block:: c++ diff --git a/documentation/details.rst b/documentation/details.rst index 2184b725c..8d4b302f5 100644 --- a/documentation/details.rst +++ b/documentation/details.rst @@ -117,6 +117,8 @@ If a change is considered, best effort will be made to involve developers/sites known to make use of Expert API. Prospective users of the Expert API are encouraged to contact the author. +Elements of the Expert API may be "promoted" to regular/full API status if warranted. + .. _contrib: Contributing diff --git a/documentation/releasenotes.rst b/documentation/releasenotes.rst index be1014f53..274e5558b 100644 --- a/documentation/releasenotes.rst +++ b/documentation/releasenotes.rst @@ -3,15 +3,27 @@ Release Notes ============= -0.2.0 (UNRELEASED) +0.2.1 (UNRELEASED) ------------------ +0.2.0 (July 2021) +----------------- + +* Bug fixes + + * Resolve ambiguity between Value::as(T&) and Value::as(FN&&) causing issue with GCC 4.8. + * Fix encoding of (Sub)Struct w/ valid set. + * Fix locking issue with client tracking of server beacons. + * Fix binding to specific interface addresses. + * Changes * To simplify usage in situations with complex threading, many client methods avoid unnecessary synchronization with the client worker thread. Cancellation still synchronizes by default, but this may now be controlled with the new syncCancel() Builder methods. cf. `pvxs::client::detail::CommonBuilder::syncCancel()`. + * Client Op Builder server() method now implemented. + * Client channel cache now periodically prunes unused Channels automatically. * Additions @@ -19,6 +31,10 @@ Release Notes * Allow TCP timeout to be configured. * Add `pvxs::client::Context::connect()` to force Channel creation and retention. * Add `pvxs::client::Subscription::shared_from_this()` which can be used with eg. the new `pvxs::MPMCFIFO` to create a work queue. + * Add `pvxs::server::ExecOp::pvRequest()` + * Semi-public :ref:`expertapi`. + * Update bundled libevent + * Preliminary support for RTEMS 5.1 with libbsd 0.1.5 (May 2021) ---------------- diff --git a/documentation/server.rst b/documentation/server.rst index 47d9d15cd..e17ff92a4 100644 --- a/documentation/server.rst +++ b/documentation/server.rst @@ -78,8 +78,8 @@ EPICS_PVA_CONN_TMO Inactivity timeout for TCP connections. For compatibility with pvAccessCPP a multiplier of 4/3 is applied. So a value of 30 results in a 40 second timeout. -.. versionadded:: UNRELEASED - Prior to UNRELEASED *EPICS_PVA_CONN_TMO* was ignored. +.. versionadded:: 0.2.0 + Prior to 0.2.0 *EPICS_PVA_CONN_TMO* was ignored. .. doxygenstruct:: pvxs::server::Config :members: diff --git a/setup.py b/setup.py index 0190fe79f..77c833506 100755 --- a/setup.py +++ b/setup.py @@ -620,7 +620,7 @@ def define_DSOS(self): setup( name='pvxslibs', - version=pvxs_ver+"a4", + version=pvxs_ver+"", description="PVXS libraries packaged for python", url='https://mdavidsaver.github.io/pvxs', author='Michael Davidsaver', diff --git a/src/pvxs/client.h b/src/pvxs/client.h index 20fc178fd..c85715301 100644 --- a/src/pvxs/client.h +++ b/src/pvxs/client.h @@ -215,7 +215,7 @@ struct PVXS_API Subscription { //! Return strong internal reference which will not prevent //! implicit cancellation when the last reference returned //! by exec() is released. - //! @since UNRELEASED + //! @since 0.2.0 virtual std::shared_ptr shared_from_this() const =0; }; @@ -433,7 +433,7 @@ class PVXS_API Context { * may be used to get asynchronous notification, or * the returned Connect object may be used to poll Channel (dis)connect state. * - * @since UNRELEASED + * @since 0.2.0 */ inline ConnectBuilder connect(const std::string& pvname); @@ -481,7 +481,7 @@ class PVXS_API Context { #ifdef PVXS_EXPERT_API_ENABLED //! Actions of cacheClear() - //! @since UNRELEASED + //! @since 0.2.0 enum cacheAction { Clean, //!< Remove channel(s) if unused. Optional for user code. Drop, //!< Remove channel(s) unconditionally. Prevents reuse of open channel(s). @@ -492,16 +492,16 @@ class PVXS_API Context { * * @param action cf. cacheAction * - * @since UNRELEASED 'name' and 'action' arguments. Defaults to previous behavior. + * @since 0.2.0 'name' and 'action' arguments. Defaults to previous behavior. */ void cacheClear(const std::string& name = std::string(), cacheAction action = Clean); //! Ignore any search replies with these GUIDs - //! @since UNRELEASED + //! @since 0.2.0 void ignoreServerGUIDs(const std::vector& guids); //! Compile report about peers and channels - //! @since UNRELEASED + //! @since 0.2.0 Report report(bool zero=true) const; #endif @@ -609,7 +609,7 @@ class CommonBuilder : public Base { * When true (the default) explicit or implicit cancel blocks until any * in progress callback has completed. This makes safe some use of * references in callbacks. - * @since UNRELEASED + * @since 0.2.0 */ SubBuilder& syncCancel(bool b) { this->_syncCancel = b; return _sb(); } }; @@ -821,7 +821,7 @@ class RequestBuilder : public detail::CommonBuilder ctx; @@ -845,7 +845,7 @@ class ConnectBuilder * When true (the default) explicit or implicit cancel blocks until any * in progress callback has completed. This makes safe some use of * references in callbacks. - * @since UNRELEASED + * @since 0.2.0 */ ConnectBuilder& syncCancel(bool b) { this->_syncCancel = b; return *this; } @@ -866,20 +866,20 @@ struct PVXS_API Config { //! List of TCP name servers. //! Client context will maintain connections, and send search requests, to these servers. - //! @since UNRELEASED + //! @since 0.2.0 std::vector nameServers; //! UDP port to bind. Default is 5076. May be zero, cf. Server::config() to find allocated port. unsigned short udp_port = 5076; //! Default TCP port for name servers - //! @since UNRELEASED + //! @since 0.2.0 unsigned short tcp_port = 5075; //! Whether to extend the addressList with local interface broadcast addresses. (recommended) bool autoAddrList = true; //! Inactivity timeout interval for TCP connections. (seconds) - //! @since UNRELEASED + //! @since 0.2.0 double tcpTimeout = 40.0; // compat diff --git a/src/pvxs/data.h b/src/pvxs/data.h index 2a73fa490..90b1a416e 100644 --- a/src/pvxs/data.h +++ b/src/pvxs/data.h @@ -599,7 +599,7 @@ class PVXS_API Value { * - std::string * - Value * - shared_array - * - An enum where the underlying type is one of the preceding (since UNRELEASED). + * - An enum where the underlying type is one of the preceding (since 0.2.0). * * @throws NoField !this->valid() * @throws NoConvert if the field value can not be coerced to type T @@ -656,7 +656,7 @@ class PVXS_API Value { * - std::string * - Value * - shared_array - * - An enum where the underlying type is one of the preceding (since UNRELEASED). + * - An enum where the underlying type is one of the preceding (since 0.2.0). */ template void from(const T& val) { diff --git a/src/pvxs/netcommon.h b/src/pvxs/netcommon.h index d0cd9788f..367d3306b 100644 --- a/src/pvxs/netcommon.h +++ b/src/pvxs/netcommon.h @@ -33,7 +33,7 @@ namespace impl { * * cf. pvxs::server::Server::report() and pvxs::client::Context::report() * - * @since UNRELEASED + * @since 0.2.0 */ struct Report { //! Info for a single channel (to a particular PV name on a particular server) diff --git a/src/pvxs/server.h b/src/pvxs/server.h index 3a02cfcfb..668a0d93c 100644 --- a/src/pvxs/server.h +++ b/src/pvxs/server.h @@ -117,7 +117,7 @@ class PVXS_API Server #ifdef PVXS_EXPERT_API_ENABLED //! Compile report about peers and channels //! @param zero If true, zero counters after reading - //! @since UNRELEASED + //! @since 0.2.0 Report report(bool zero=true) const; #endif @@ -144,7 +144,7 @@ struct PVXS_API Config { //! Ignore client requests originating from addresses in this list. //! Entries must be IP addresses with optional port numbers. //! Port number zero (default) is treated as a wildcard which matches any port. - //! @since UNRELEASED + //! @since 0.2.0 std::vector ignoreAddrs; //! Addresses (**not** host names) to which (UDP) beacons message will be sent. //! May include broadcast and/or unicast addresses. @@ -158,7 +158,7 @@ struct PVXS_API Config { bool auto_beacon = true; //! Inactivity timeout interval for TCP connections. (seconds) - //! @since UNRELEASED + //! @since 0.2.0 double tcpTimeout = 40.0; //! Server unique ID. Only meaningful in readback via Server::config() diff --git a/src/pvxs/srvcommon.h b/src/pvxs/srvcommon.h index a6d4414f2..d17d1cdaf 100644 --- a/src/pvxs/srvcommon.h +++ b/src/pvxs/srvcommon.h @@ -25,7 +25,7 @@ namespace server { * - "ca" - Client provided account name. * - "anonymous" - Client provided no credentials. account will also be "anonymous". * - * @since UNRELEASED + * @since 0.2.0 */ struct PVXS_API ClientCredentials { //! Peer address (eg. numeric IPv4) @@ -71,7 +71,7 @@ struct PVXS_API OpBase { //! The Channel name const std::string& name() const { return _name; } //! Client credentials. Never NULL. - //! @since UNRELEASED + //! @since 0.2.0 const std::shared_ptr& credentials() const { return _cred; } //! Operation type op_t op() const { return _op; } @@ -95,14 +95,14 @@ struct PVXS_API ExecOp : public OpBase { Value _pvRequest; public: //! Access to pvRequest blob - //! @since UNRELEASED + //! @since 0.2.0 const Value& pvRequest() const { return _pvRequest; } virtual ~ExecOp(); #ifdef PVXS_EXPERT_API_ENABLED //! Create/start timer. cb runs on worker associated with Channel of this Operation. - //! @since UNRELEASED + //! @since 0.2.0 Timer timerOneShot(double delay, std::function&& cb) { return _timerOneShot(delay, std::move(cb)); } diff --git a/src/pvxs/unittest.h b/src/pvxs/unittest.h index 562919d4a..484900129 100644 --- a/src/pvxs/unittest.h +++ b/src/pvxs/unittest.h @@ -283,7 +283,7 @@ testCase testThrowsMatch(const std::string& expr, FN fn) //! Evaluates to a pvxs::testCase //! Functionally equivalent to testNotEq() with two std::string instances. //! Prints diff-like output which is friendlier to multi-line strings. -//! @since UNRELEASED +//! @since 0.2.0 #define testStrNotEq(LHS, RHS) ::pvxs::detail::_testStrTest(0, #LHS, ::pvxs::detail::asStr(LHS), #RHS, ::pvxs::detail::asStr(RHS)) //! Macro which asserts that STR matches the regular expression EXPR diff --git a/src/pvxs/util.h b/src/pvxs/util.h index c322dc2ca..945f941f5 100644 --- a/src/pvxs/util.h +++ b/src/pvxs/util.h @@ -191,7 +191,7 @@ std::ostream& target_information(std::ostream&); * } * @endcode * - * @since UNRELEASED + * @since 0.2.0 */ template class MPMCFIFO { @@ -301,7 +301,7 @@ struct Timer; #ifdef PVXS_EXPERT_API_ENABLED //! Timer associated with a client::Context or server::Server -//! @since UNRELEASED +//! @since 0.2.0 struct PVXS_API Timer { struct Pvt;