Skip to content

Commit

Permalink
0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mdavidsaver committed Jul 28, 2021
1 parent ff880e9 commit 63663f3
Show file tree
Hide file tree
Showing 12 changed files with 50 additions and 32 deletions.
6 changes: 3 additions & 3 deletions documentation/client.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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++

Expand Down
2 changes: 2 additions & 0 deletions documentation/details.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 17 additions & 1 deletion documentation/releasenotes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,38 @@
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

* Add server ignore address list. cf. `pvxs::server::Config::ignoreAddrs`. Configured from $EPICS_PVAS_IGNORE_ADDR_LIST.
* 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)
----------------
Expand Down
4 changes: 2 additions & 2 deletions documentation/server.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
24 changes: 12 additions & 12 deletions src/pvxs/client.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<Subscription> shared_from_this() const =0;
};

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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).
Expand All @@ -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<ServerGUID>& guids);

//! Compile report about peers and channels
//! @since UNRELEASED
//! @since 0.2.0
Report report(bool zero=true) const;
#endif

Expand Down Expand Up @@ -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(); }
};
Expand Down Expand Up @@ -821,7 +821,7 @@ class RequestBuilder : public detail::CommonBuilder<RequestBuilder, detail::Comm
RequestBuilder Context::request() { return RequestBuilder{}; }

//! cf. Context::connect()
//! @since UNRELEASED
//! @since 0.2.0
class ConnectBuilder
{
std::shared_ptr<Context::Pvt> ctx;
Expand All @@ -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; }

Expand All @@ -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<std::string> 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
Expand Down
4 changes: 2 additions & 2 deletions src/pvxs/data.h
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ class PVXS_API Value {
* - std::string
* - Value
* - shared_array<const void>
* - 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
Expand Down Expand Up @@ -656,7 +656,7 @@ class PVXS_API Value {
* - std::string
* - Value
* - shared_array<const void>
* - 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<typename T>
void from(const T& val) {
Expand Down
2 changes: 1 addition & 1 deletion src/pvxs/netcommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions src/pvxs/server.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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<std::string> ignoreAddrs;
//! Addresses (**not** host names) to which (UDP) beacons message will be sent.
//! May include broadcast and/or unicast addresses.
Expand All @@ -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()
Expand Down
8 changes: 4 additions & 4 deletions src/pvxs/srvcommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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<const ClientCredentials>& credentials() const { return _cred; }
//! Operation type
op_t op() const { return _op; }
Expand All @@ -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<void()>&& cb) {
return _timerOneShot(delay, std::move(cb));
}
Expand Down
2 changes: 1 addition & 1 deletion src/pvxs/unittest.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/pvxs/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ std::ostream& target_information(std::ostream&);
* }
* @endcode
*
* @since UNRELEASED
* @since 0.2.0
*/
template<typename T>
class MPMCFIFO {
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 63663f3

Please sign in to comment.