Skip to content

Releases: DatAsianBoi123/nt_client

v0.4.0

30 May 22:03
b08eed2

Choose a tag to compare

This release adds some final touches to the lib before version 1.0.0.

Full Changelog: v0.3.0-alpha...v0.4.0-alpha

Breaking Changes

  • Method Topic::name_mut now returns a &mut String instead of a &mut str.
  • AnnouncedTopics and AnnouncedTopic structs no longer implement Eq.
  • Trait NetworkTableData no longer has a Clone requirement.
  • Removed error variants ReceiveMessageError::FailedDeserializingJson and ReceiveMessageError::FailedDeserializingMsgPack in favor of warn logs
  • Topic::subscribe and TopicCollection::subscribe now return a Result.

Additions

  • Created method Client.connect_setup that allows a callback to be called once the client has connected.
  • DataType now implements Copy
  • Created a non-generic version of Publisher to allow for publishing arbitrary data at runtime via Topic::generic_publish.
  • Created a way to retrieve a topic's value via AnnouncedTopic::value.
  • Added feature publish_bypass that adds bypass versions of publishing as a workaround to a NetworkTables bug.
  • Created a cheaply-clonable ClientHandle, accessed via Client::handle, that can be used in asynchronous environments.

Improvements

  • Tracing is now much more reliable and contains more information.
  • Channel capacity for websocket messages greatly increased, reducing lagged errors.
  • Several more docs are now clearer and include examples.

crates.io
docs.rs

v0.3.0

17 Mar 00:50
9fe51e5

Choose a tag to compare

This release adds support for topic properties and a reconnection handler, among other additions.

Breaking Changes

  • Split the port field in NewClientOptions into unsecure_port and secure_port
  • set and set_default methods of Publisher now return a result

Additions

  • Reconnect handling via the crate::reconnect function
  • TopicPath struct and path! macro for easy manipulation of slash-delimited topic names
  • Creation of TopicCollection, allowing for the subscription of multiple topics at once
  • Support for updating topic properties via Publisher.update_props and UpdateProps struct
  • More examples

...and other various improvements!

crates.io
docs.rs

v0.2.0

23 Aug 01:03
230a896

Choose a tag to compare

This release adds many many features and actually makes this crate somewhat usable! Expect a full 1.0.0 release within the next few versions.

Breaking Changes

  • Transparent data structs (such as JsonString) no longer impl Deref and DerefMut. Use .into() and .from() to convert between the inner data.
  • Vec transparent data structs (such as RawData) now impl FromIterator.
  • RawData, Rpc, and Protobuf now all have a from_value impl, meaning they can be received from the server.
  • Vec primitives now all have a from_value impl meaning they can be received from the server.
  • Renamed NetworkTableDataType to NetworkTableData.
  • Field Client.time is now private, use the method Client.time() instead.
  • response_timeout, ping_interval, and update_time_interval are now options that can be changed via NewClientOptions.
  • Serialize and deserialize DataType as a u32 is now private.
  • Type aliases NTServerSender, NTServerReceiver, NTClientSender, and NTClientReceiver are now all pub(crate) instead of pub.
  • New error variants with subscribers and publishers.
  • The module dataframe has been renamed to data.
  • The module dataframe/datatype has been renamed to data/type.
  • Common traits (Clone, PartialEq, Eq, etc.) have now been implemented for many public structs/enums.
  • Many internal structs/enums in the data module are now pub(crate) instead of pub.
  • Reworked how subscribers work to allow for the subscription of multiple topics (using the prefix option, for example).
    Now, announce, update, and unannounce messages are all received.
  • Creating a subscriber no longer returns a Result, but instead Self.
  • ConnectError enum now has many more variants.
  • ConnectError has been moved to the error module.
  • NTAddr.into_addr() now returns a Result and not an Option.

Additions

  • SubscriptionOptions now has an extra field for extra values.
  • The client now keeps track of announced topics using the AnnouncedTopic struct and can be retrieved using the method Client.announced_topics().
  • Created method Subscriber.topics() that retrieves all subscribed topics.

Changes

  • Publishing now doesn't have a timeout. If a timeout is still necessary, use tokio::time::timeout on the future returned by Topic.publish().

Improvements

  • The crate tracing is now used for logging.
  • Much clearer logs.
  • Much better error handling and less panics.

Bug Fixes

  • Subscribing using the periodic option now works as intended.
  • Creating a client before the server no longer panics.

Docs

  • Added documentation for the whole crate.

...and many other various improvements!

crates.io
docs.rs

v0.1.0

02 Aug 21:22
f5d4e85

Choose a tag to compare

Initial release.

crates.io
docs.rs

Features include:

  • Full coverage of the NetworkTables 4.1 spec
  • Publishing to topics
  • Subscribing to topics