diff --git a/src/ntcore/Generated/BooleanArrayEntry.cs b/src/ntcore/Generated/BooleanArrayEntry.cs index ad3e2af3..9daadbf7 100644 --- a/src/ntcore/Generated/BooleanArrayEntry.cs +++ b/src/ntcore/Generated/BooleanArrayEntry.cs @@ -6,13 +6,13 @@ namespace NetworkTables; -/** - * NetworkTables BooleanArray entry. - * - *

Unlike NetworkTableEntry, the entry goes away when close() is called. - */ +///

+/// NetworkTables BooleanArray entry. +/// public interface IBooleanArrayEntry : IBooleanArraySubscriber, IBooleanArrayPublisher { - /** Stops publishing the entry if it's published. */ + /// + /// Stops publishing the entry if its published. + /// void Unpublish(); } diff --git a/src/ntcore/Generated/BooleanArrayEntryImpl.cs b/src/ntcore/Generated/BooleanArrayEntryImpl.cs index c990accd..fc714bf4 100644 --- a/src/ntcore/Generated/BooleanArrayEntryImpl.cs +++ b/src/ntcore/Generated/BooleanArrayEntryImpl.cs @@ -10,16 +10,8 @@ namespace NetworkTables; -/** NetworkTables BooleanArray implementation. */ internal sealed class BooleanArrayEntryImpl : EntryBase, IBooleanArrayEntry where T : struct, INtEntryHandle { - /** - * Constructor. - * - * @param topic Topic - * @param handle Native handle - * @param defaultValue Default value for Get() - */ internal BooleanArrayEntryImpl(BooleanArrayTopic topic, T handle, bool[] defaultValue) : base(handle) { Topic = topic; @@ -28,7 +20,6 @@ internal BooleanArrayEntryImpl(BooleanArrayTopic topic, T handle, bool[] default public override BooleanArrayTopic Topic { get; } - public bool[] Get() { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -39,7 +30,6 @@ public bool[] Get() return m_defaultValue; } - public bool[] Get(bool[] defaultValue) { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -50,7 +40,6 @@ public bool[] Get(bool[] defaultValue) return defaultValue; } - public TimestampedObject GetAtomic() { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -58,7 +47,6 @@ public TimestampedObject GetAtomic() return new TimestampedObject(value.Time, value.ServerTime, baseValue); } - public TimestampedObject GetAtomic(bool[] defaultValue) { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -66,7 +54,6 @@ public TimestampedObject GetAtomic(bool[] defaultValue) return new TimestampedObject(value.Time, value.ServerTime, baseValue); } - public TimestampedObject[] ReadQueue() { NetworkTableValue[] values = NtCore.ReadQueueValue(Handle); @@ -78,7 +65,6 @@ public TimestampedObject[] ReadQueue() return timestamped; } - public bool[][] ReadQueueValues() { NetworkTableValue[] values = NtCore.ReadQueueValue(Handle); @@ -108,6 +94,7 @@ public void SetDefault(ReadOnlySpan value) RefNetworkTableValue ntValue = RefNetworkTableValue.MakeBooleanArray(value); NtCore.SetDefaultEntryValue(Handle, ntValue); } + public void Unpublish() { NtCore.Unpublish(Handle); diff --git a/src/ntcore/Generated/BooleanArrayPublisher.cs b/src/ntcore/Generated/BooleanArrayPublisher.cs index 4a3e9623..749804d9 100644 --- a/src/ntcore/Generated/BooleanArrayPublisher.cs +++ b/src/ntcore/Generated/BooleanArrayPublisher.cs @@ -8,39 +8,34 @@ namespace NetworkTables; -/** NetworkTables BooleanArray publisher. */ +/// +/// NetworkTables BooleanArray publisher. +/// public interface IBooleanArrayPublisher : IPublisher { - /** - * Get the corresponding topic. - * - * @return Topic - */ - + /// + /// Gets the corresponding topic. + /// new BooleanArrayTopic Topic { get; } - /** - * Publish a new value using current NT time. - * - * @param value value to publish - */ + /// + /// Publish a new value using the current NT time. + /// + /// value to publish void Set(ReadOnlySpan value); - /** - * Publish a new value. - * - * @param value value to publish - * @param time timestamp; 0 indicates current NT time should be used - */ + /// + /// Publish a new value. + /// + /// value to publish + /// timestamp; 0 indicates current NT time should be used void Set(ReadOnlySpan value, long time); - /** - * Publish a default value. - * On reconnect, a default value will never be used in preference to a - * published value. - * - * @param value value - */ + /// + /// Publish a default value. On reconnect, a default value will never be used + /// in prference to a published value + /// + /// value void SetDefault(ReadOnlySpan value); } diff --git a/src/ntcore/Generated/BooleanArraySubscriber.cs b/src/ntcore/Generated/BooleanArraySubscriber.cs index edcaa03a..cfa52e35 100644 --- a/src/ntcore/Generated/BooleanArraySubscriber.cs +++ b/src/ntcore/Generated/BooleanArraySubscriber.cs @@ -6,73 +6,62 @@ namespace NetworkTables; -/** NetworkTables BooleanArray subscriber. */ +/// +/// NetworkTables BooleanArray subscriver. +/// public interface IBooleanArraySubscriber : ISubscriber { - /** - * Get the corresponding topic. - * - * @return Topic - */ - + /// + /// Gets the corresponding topic. + /// new BooleanArrayTopic Topic { get; } - /** - * Get the last published value. - * If no value has been published, returns the stored default value. - * - * @return value - */ + /// + /// Get the last published value. + /// If no value has been published, returns the stored default value. + /// + /// value bool[] Get(); - /** - * Get the last published value. - * If no value has been published, returns the passed defaultValue. - * - * @param defaultValue default value to return if no value has been published - * @return value - */ + /// + /// Get the last published value. + /// If no value has been published, returns the passed default value. + /// + /// default value to return if no value has been published + /// value bool[] Get(bool[] defaultValue); - /** - * Get the last published value along with its timestamp - * If no value has been published, returns the stored default value and a - * timestamp of 0. - * - * @return timestamped value - */ + /// + /// Get the last published value along with its timestamp. + /// If no value has been published, returns the stored default value and a timestamp of 0. + /// + /// timestamped value TimestampedObject GetAtomic(); - /** - * Get the last published value along with its timestamp - * If no value has been published, returns the passed defaultValue and a - * timestamp of 0. - * - * @param defaultValue default value to return if no value has been published - * @return timestamped value - */ + /// + /// Get the last published value along with its timestamp. + /// If no value has been published, returns the passed default value and a timestamp of 0. + /// + /// default value to return if no value has been published + /// timestamped value TimestampedObject GetAtomic(bool[] defaultValue); - /** - * Get an array of all value changes since the last call to readQueue. - * Also provides a timestamp for each value. - * - *

The "poll storage" subscribe option can be used to set the queue - * depth. - * - * @return Array of timestamped values; empty array if no new changes have - * been published since the previous call. - */ + ///

+ /// Get an array of all value changes since the last call to ReadQueue. + /// Also provides a timestamp for each value. + /// + /// + /// The "poll storage" subscribe option can be used to set the queue depth. + /// Array of timestamped values; emptry if no new changes TimestampedObject[] ReadQueue(); - /** - * Get an array of all value changes since the last call to readQueue. - * - *

The "poll storage" subscribe option can be used to set the queue - * depth. - * - * @return Array of values; empty array if no new changes have been - * published since the previous call. - */ + ///

+ /// Get an array of all value changes since the last call to ReadQueue. + /// + /// + /// The "poll storage" subscribe option can be used to set the queue depth. + /// Array of values; emptry if no new changes bool[][] ReadQueueValues(); } diff --git a/src/ntcore/Generated/BooleanArrayTopic.cs b/src/ntcore/Generated/BooleanArrayTopic.cs index 495d5e24..75991405 100644 --- a/src/ntcore/Generated/BooleanArrayTopic.cs +++ b/src/ntcore/Generated/BooleanArrayTopic.cs @@ -10,48 +10,49 @@ namespace NetworkTables; -/** NetworkTables BooleanArray topic. */ +/// +/// NetworkTables BooleanArray topic. +/// public class BooleanArrayTopic : Topic { - /** The default type string for this topic type. */ + /// + /// The default type string for this topic type + /// public static string kTypeString => "boolean[]"; + /// + /// The default type string for this topic type in a UTF8 Span + /// public static ReadOnlySpan kTypeStringUtf8 => "boolean[]"u8; - /** - * Construct from a generic topic. - * - * @param topic Topic - */ - public BooleanArrayTopic(Topic topic) : base(topic.Instance, topic.Handle) - { - } + /// + /// Constructs a typed topic from a generic topic. + /// + /// typed topic + public BooleanArrayTopic(Topic topic) : base(topic.Instance, topic.Handle) { } - /** - * Constructor; use NetworkTableInstance.getBooleanArrayTopic() instead. - * - * @param inst Instance - * @param handle Native handle - */ - public BooleanArrayTopic(NetworkTableInstance inst, NtTopic handle) : base(inst, handle) - { - } + /// + /// Constructor; use NetworkTableInstance.GetBooleanArrayTopic() instead. + /// + /// Instance + /// Native handle + public BooleanArrayTopic(NetworkTableInstance inst, NtTopic handle) : base(inst, handle) { } - /** - * Create a new subscriber to the topic. - * - *

The subscriber is only active as long as the returned object - * is not closed. - * - *

Subscribers that do not match the published data type do not return - * any values. To determine if the data type matches, use the appropriate - * Topic functions. - * - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options subscribe options - * @return subscriber - */ + ///

+ /// Create a new subscriver to the topic. + /// + /// + /// The subscriber is only active as long as the returned object is not closed. + /// + /// Subscribers that do not match the published data type do not return any + /// values. To determine if the data type matches, use the appropriate Topic + /// functions. + /// + /// + /// default value used when a default is not provided to a getter function + /// + /// subscribe options + /// subscriber public IBooleanArraySubscriber Subscribe( bool[] defaultValue, PubSubOptions options) @@ -64,22 +65,22 @@ public IBooleanArraySubscriber Subscribe( defaultValue); } - /** - * Create a new subscriber to the topic, with specified type string. - * - *

The subscriber is only active as long as the returned object - * is not closed. - * - *

Subscribers that do not match the published data type do not return - * any values. To determine if the data type matches, use the appropriate - * Topic functions. - * - * @param typeString type string - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options subscribe options - * @return subscriber - */ + ///

+ /// Create a new subscriber to the topic, with the specified type string. + /// + /// + /// The subscriber is only active as long as the returned object is not closed. + /// + /// Subscribers that do not match the published data type do not return any + /// values. To determine if the data type matches, use the appropriate Topic + /// functions. + /// + /// type string + /// + /// default value used when a default is not provided to a getter function + /// + /// subscribe options + /// subscriber public IBooleanArraySubscriber SubscribeEx( string typeString, bool[] defaultValue, @@ -93,22 +94,22 @@ public IBooleanArraySubscriber SubscribeEx( defaultValue); } - /** - * Create a new subscriber to the topic, with specified type string. - * - *

The subscriber is only active as long as the returned object - * is not closed. - * - *

Subscribers that do not match the published data type do not return - * any values. To determine if the data type matches, use the appropriate - * Topic functions. - * - * @param typeString type string - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options subscribe options - * @return subscriber - */ + ///

+ /// Create a new subscriber to the topic, with the specified type string. + /// + /// + /// The subscriber is only active as long as the returned object is not closed. + /// + /// Subscribers that do not match the published data type do not return any + /// values. To determine if the data type matches, use the appropriate Topic + /// functions. + /// + /// type string + /// + /// default value used when a default is not provided to a getter function + /// + /// subscribe options + /// subscriber public IBooleanArraySubscriber SubscribeEx( ReadOnlySpan typeString, bool[] defaultValue, @@ -122,21 +123,20 @@ public IBooleanArraySubscriber SubscribeEx( defaultValue); } - /** - * Create a new publisher to the topic. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param options publish options - * @return publisher - */ + ///

+ /// Create a new publisher to the topic. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// publish options + /// publisher public IBooleanArrayPublisher Publish( PubSubOptions options) { @@ -148,22 +148,22 @@ public IBooleanArrayPublisher Publish( []); } - /** - * Create a new publisher to the topic. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param options publish options - * @return publisher - */ + ///

+ /// Create a new publisher to the topic, with type string and initial properties. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// JSON properties + /// publish options + /// publisher public IBooleanArrayPublisher PublishEx( string typeString, string properties, PubSubOptions options) @@ -176,24 +176,22 @@ public IBooleanArrayPublisher PublishEx( []); } - /** - * Create a new publisher to the topic, with type string and initial properties. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param properties JSON properties - * @param options publish options - * @return publisher - * @throws IllegalArgumentException if properties is not a JSON object - */ + ///

+ /// Create a new publisher to the topic, with type string and initial properties. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// JSON properties + /// publish options + /// publisher public IBooleanArrayPublisher PublishEx( ReadOnlySpan typeString, string properties, @@ -207,24 +205,22 @@ public IBooleanArrayPublisher PublishEx( []); } - /** - * Create a new publisher to the topic, with type string and initial properties. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param properties JSON properties - * @param options publish options - * @return publisher - * @throws IllegalArgumentException if properties is not a JSON object - */ + ///

+ /// Create a new publisher to the topic, with type string and initial properties. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// JSON properties + /// publish options + /// publisher public IBooleanArrayPublisher PublishEx( string typeString, ReadOnlySpan properties, @@ -238,24 +234,22 @@ public IBooleanArrayPublisher PublishEx( []); } - /** - * Create a new publisher to the topic, with type string and initial properties. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param properties JSON properties - * @param options publish options - * @return publisher - * @throws IllegalArgumentException if properties is not a JSON object - */ + ///

+ /// Create a new publisher to the topic, with type string and initial properties. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// JSON properties + /// publish options + /// publisher public IBooleanArrayPublisher PublishEx( ReadOnlySpan typeString, ReadOnlySpan properties, @@ -269,26 +263,26 @@ public IBooleanArrayPublisher PublishEx( []); } - /** - * Create a new entry for the topic. - * - *

Entries act as a combination of a subscriber and a weak publisher. The - * subscriber is active as long as the entry is not closed. The publisher is - * created when the entry is first written to, and remains active until either - * unpublish() is called or the entry is closed. - * - *

It is not possible to use two different data types with the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored), and the entry will show no new - * values if the data type does not match. To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options publish and/or subscribe options - * @return entry - */ + ///

+ /// Create a new entry for the topic. + /// + /// + /// Entries act as a combination of a subscriber and a weak publisher. The + /// subscriber is active as long as the entry is not closed. The publisher is + /// created when the entry is first written to, and remains active until either + /// Unpublish() is called or the entry is closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// + /// default value used when a default is not provided to a getter function + /// + /// publish and/or subscribe options + /// entry public IBooleanArrayEntry GetEntry( bool[] defaultValue, PubSubOptions options) @@ -301,27 +295,27 @@ public IBooleanArrayEntry GetEntry( defaultValue); } - /** - * Create a new entry for the topic, with specified type string. - * - *

Entries act as a combination of a subscriber and a weak publisher. The - * subscriber is active as long as the entry is not closed. The publisher is - * created when the entry is first written to, and remains active until either - * unpublish() is called or the entry is closed. - * - *

It is not possible to use two different data types with the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored), and the entry will show no new - * values if the data type does not match. To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options publish and/or subscribe options - * @return entry - */ + ///

+ /// Create a new entry for the topic, with the specified type string. + /// + /// + /// Entries act as a combination of a subscriber and a weak publisher. The + /// subscriber is active as long as the entry is not closed. The publisher is + /// created when the entry is first written to, and remains active until either + /// Unpublish() is called or the entry is closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// + /// default value used when a default is not provided to a getter function + /// + /// publish and/or subscribe options + /// entry public IBooleanArrayEntry GetEntryEx( string typeString, bool[] defaultValue, @@ -335,27 +329,27 @@ public IBooleanArrayEntry GetEntryEx( defaultValue); } - /** - * Create a new entry for the topic, with specified type string. - * - *

Entries act as a combination of a subscriber and a weak publisher. The - * subscriber is active as long as the entry is not closed. The publisher is - * created when the entry is first written to, and remains active until either - * unpublish() is called or the entry is closed. - * - *

It is not possible to use two different data types with the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored), and the entry will show no new - * values if the data type does not match. To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options publish and/or subscribe options - * @return entry - */ + ///

+ /// Create a new entry for the topic, with the specified type string. + /// + /// + /// Entries act as a combination of a subscriber and a weak publisher. The + /// subscriber is active as long as the entry is not closed. The publisher is + /// created when the entry is first written to, and remains active until either + /// Unpublish() is called or the entry is closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// + /// default value used when a default is not provided to a getter function + /// + /// publish and/or subscribe options + /// entry public IBooleanArrayEntry GetEntryEx( ReadOnlySpan typeString, bool[] defaultValue, @@ -369,6 +363,4 @@ public IBooleanArrayEntry GetEntryEx( defaultValue); } - - } diff --git a/src/ntcore/Generated/BooleanEntry.cs b/src/ntcore/Generated/BooleanEntry.cs index 0a11e122..626479d8 100644 --- a/src/ntcore/Generated/BooleanEntry.cs +++ b/src/ntcore/Generated/BooleanEntry.cs @@ -6,13 +6,13 @@ namespace NetworkTables; -/** - * NetworkTables Boolean entry. - * - *

Unlike NetworkTableEntry, the entry goes away when close() is called. - */ +///

+/// NetworkTables Boolean entry. +/// public interface IBooleanEntry : IBooleanSubscriber, IBooleanPublisher { - /** Stops publishing the entry if it's published. */ + /// + /// Stops publishing the entry if its published. + /// void Unpublish(); } diff --git a/src/ntcore/Generated/BooleanEntryImpl.cs b/src/ntcore/Generated/BooleanEntryImpl.cs index dc1d94fc..681dce87 100644 --- a/src/ntcore/Generated/BooleanEntryImpl.cs +++ b/src/ntcore/Generated/BooleanEntryImpl.cs @@ -10,16 +10,8 @@ namespace NetworkTables; -/** NetworkTables Boolean implementation. */ internal sealed class BooleanEntryImpl : EntryBase, IBooleanEntry where T : struct, INtEntryHandle { - /** - * Constructor. - * - * @param topic Topic - * @param handle Native handle - * @param defaultValue Default value for Get() - */ internal BooleanEntryImpl(BooleanTopic topic, T handle, bool defaultValue) : base(handle) { Topic = topic; @@ -28,7 +20,6 @@ internal BooleanEntryImpl(BooleanTopic topic, T handle, bool defaultValue) : bas public override BooleanTopic Topic { get; } - public bool Get() { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -39,7 +30,6 @@ public bool Get() return m_defaultValue; } - public bool Get(bool defaultValue) { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -50,7 +40,6 @@ public bool Get(bool defaultValue) return defaultValue; } - public TimestampedObject GetAtomic() { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -58,7 +47,6 @@ public TimestampedObject GetAtomic() return new TimestampedObject(value.Time, value.ServerTime, baseValue); } - public TimestampedObject GetAtomic(bool defaultValue) { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -66,7 +54,6 @@ public TimestampedObject GetAtomic(bool defaultValue) return new TimestampedObject(value.Time, value.ServerTime, baseValue); } - public TimestampedObject[] ReadQueue() { NetworkTableValue[] values = NtCore.ReadQueueValue(Handle); @@ -78,7 +65,6 @@ public TimestampedObject[] ReadQueue() return timestamped; } - public bool[] ReadQueueValues() { NetworkTableValue[] values = NtCore.ReadQueueValue(Handle); @@ -108,6 +94,7 @@ public void SetDefault(bool value) RefNetworkTableValue ntValue = RefNetworkTableValue.MakeBoolean(value); NtCore.SetDefaultEntryValue(Handle, ntValue); } + public void Unpublish() { NtCore.Unpublish(Handle); diff --git a/src/ntcore/Generated/BooleanPublisher.cs b/src/ntcore/Generated/BooleanPublisher.cs index 1a768fb6..2584dedf 100644 --- a/src/ntcore/Generated/BooleanPublisher.cs +++ b/src/ntcore/Generated/BooleanPublisher.cs @@ -8,39 +8,34 @@ namespace NetworkTables; -/** NetworkTables Boolean publisher. */ +/// +/// NetworkTables Boolean publisher. +/// public interface IBooleanPublisher : IPublisher { - /** - * Get the corresponding topic. - * - * @return Topic - */ - + /// + /// Gets the corresponding topic. + /// new BooleanTopic Topic { get; } - /** - * Publish a new value using current NT time. - * - * @param value value to publish - */ + /// + /// Publish a new value using the current NT time. + /// + /// value to publish void Set(bool value); - /** - * Publish a new value. - * - * @param value value to publish - * @param time timestamp; 0 indicates current NT time should be used - */ + /// + /// Publish a new value. + /// + /// value to publish + /// timestamp; 0 indicates current NT time should be used void Set(bool value, long time); - /** - * Publish a default value. - * On reconnect, a default value will never be used in preference to a - * published value. - * - * @param value value - */ + /// + /// Publish a default value. On reconnect, a default value will never be used + /// in prference to a published value + /// + /// value void SetDefault(bool value); } diff --git a/src/ntcore/Generated/BooleanSubscriber.cs b/src/ntcore/Generated/BooleanSubscriber.cs index 27618672..255d0f10 100644 --- a/src/ntcore/Generated/BooleanSubscriber.cs +++ b/src/ntcore/Generated/BooleanSubscriber.cs @@ -6,73 +6,62 @@ namespace NetworkTables; -/** NetworkTables Boolean subscriber. */ +/// +/// NetworkTables Boolean subscriver. +/// public interface IBooleanSubscriber : ISubscriber { - /** - * Get the corresponding topic. - * - * @return Topic - */ - + /// + /// Gets the corresponding topic. + /// new BooleanTopic Topic { get; } - /** - * Get the last published value. - * If no value has been published, returns the stored default value. - * - * @return value - */ + /// + /// Get the last published value. + /// If no value has been published, returns the stored default value. + /// + /// value bool Get(); - /** - * Get the last published value. - * If no value has been published, returns the passed defaultValue. - * - * @param defaultValue default value to return if no value has been published - * @return value - */ + /// + /// Get the last published value. + /// If no value has been published, returns the passed default value. + /// + /// default value to return if no value has been published + /// value bool Get(bool defaultValue); - /** - * Get the last published value along with its timestamp - * If no value has been published, returns the stored default value and a - * timestamp of 0. - * - * @return timestamped value - */ + /// + /// Get the last published value along with its timestamp. + /// If no value has been published, returns the stored default value and a timestamp of 0. + /// + /// timestamped value TimestampedObject GetAtomic(); - /** - * Get the last published value along with its timestamp - * If no value has been published, returns the passed defaultValue and a - * timestamp of 0. - * - * @param defaultValue default value to return if no value has been published - * @return timestamped value - */ + /// + /// Get the last published value along with its timestamp. + /// If no value has been published, returns the passed default value and a timestamp of 0. + /// + /// default value to return if no value has been published + /// timestamped value TimestampedObject GetAtomic(bool defaultValue); - /** - * Get an array of all value changes since the last call to readQueue. - * Also provides a timestamp for each value. - * - *

The "poll storage" subscribe option can be used to set the queue - * depth. - * - * @return Array of timestamped values; empty array if no new changes have - * been published since the previous call. - */ + ///

+ /// Get an array of all value changes since the last call to ReadQueue. + /// Also provides a timestamp for each value. + /// + /// + /// The "poll storage" subscribe option can be used to set the queue depth. + /// Array of timestamped values; emptry if no new changes TimestampedObject[] ReadQueue(); - /** - * Get an array of all value changes since the last call to readQueue. - * - *

The "poll storage" subscribe option can be used to set the queue - * depth. - * - * @return Array of values; empty array if no new changes have been - * published since the previous call. - */ + ///

+ /// Get an array of all value changes since the last call to ReadQueue. + /// + /// + /// The "poll storage" subscribe option can be used to set the queue depth. + /// Array of values; emptry if no new changes bool[] ReadQueueValues(); } diff --git a/src/ntcore/Generated/BooleanTopic.cs b/src/ntcore/Generated/BooleanTopic.cs index 635eded8..121edc2e 100644 --- a/src/ntcore/Generated/BooleanTopic.cs +++ b/src/ntcore/Generated/BooleanTopic.cs @@ -10,48 +10,49 @@ namespace NetworkTables; -/** NetworkTables Boolean topic. */ +/// +/// NetworkTables Boolean topic. +/// public class BooleanTopic : Topic { - /** The default type string for this topic type. */ + /// + /// The default type string for this topic type + /// public static string kTypeString => "boolean"; + /// + /// The default type string for this topic type in a UTF8 Span + /// public static ReadOnlySpan kTypeStringUtf8 => "boolean"u8; - /** - * Construct from a generic topic. - * - * @param topic Topic - */ - public BooleanTopic(Topic topic) : base(topic.Instance, topic.Handle) - { - } + /// + /// Constructs a typed topic from a generic topic. + /// + /// typed topic + public BooleanTopic(Topic topic) : base(topic.Instance, topic.Handle) { } - /** - * Constructor; use NetworkTableInstance.getBooleanTopic() instead. - * - * @param inst Instance - * @param handle Native handle - */ - public BooleanTopic(NetworkTableInstance inst, NtTopic handle) : base(inst, handle) - { - } + /// + /// Constructor; use NetworkTableInstance.GetBooleanTopic() instead. + /// + /// Instance + /// Native handle + public BooleanTopic(NetworkTableInstance inst, NtTopic handle) : base(inst, handle) { } - /** - * Create a new subscriber to the topic. - * - *

The subscriber is only active as long as the returned object - * is not closed. - * - *

Subscribers that do not match the published data type do not return - * any values. To determine if the data type matches, use the appropriate - * Topic functions. - * - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options subscribe options - * @return subscriber - */ + ///

+ /// Create a new subscriver to the topic. + /// + /// + /// The subscriber is only active as long as the returned object is not closed. + /// + /// Subscribers that do not match the published data type do not return any + /// values. To determine if the data type matches, use the appropriate Topic + /// functions. + /// + /// + /// default value used when a default is not provided to a getter function + /// + /// subscribe options + /// subscriber public IBooleanSubscriber Subscribe( bool defaultValue, PubSubOptions options) @@ -64,22 +65,22 @@ public IBooleanSubscriber Subscribe( defaultValue); } - /** - * Create a new subscriber to the topic, with specified type string. - * - *

The subscriber is only active as long as the returned object - * is not closed. - * - *

Subscribers that do not match the published data type do not return - * any values. To determine if the data type matches, use the appropriate - * Topic functions. - * - * @param typeString type string - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options subscribe options - * @return subscriber - */ + ///

+ /// Create a new subscriber to the topic, with the specified type string. + /// + /// + /// The subscriber is only active as long as the returned object is not closed. + /// + /// Subscribers that do not match the published data type do not return any + /// values. To determine if the data type matches, use the appropriate Topic + /// functions. + /// + /// type string + /// + /// default value used when a default is not provided to a getter function + /// + /// subscribe options + /// subscriber public IBooleanSubscriber SubscribeEx( string typeString, bool defaultValue, @@ -93,22 +94,22 @@ public IBooleanSubscriber SubscribeEx( defaultValue); } - /** - * Create a new subscriber to the topic, with specified type string. - * - *

The subscriber is only active as long as the returned object - * is not closed. - * - *

Subscribers that do not match the published data type do not return - * any values. To determine if the data type matches, use the appropriate - * Topic functions. - * - * @param typeString type string - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options subscribe options - * @return subscriber - */ + ///

+ /// Create a new subscriber to the topic, with the specified type string. + /// + /// + /// The subscriber is only active as long as the returned object is not closed. + /// + /// Subscribers that do not match the published data type do not return any + /// values. To determine if the data type matches, use the appropriate Topic + /// functions. + /// + /// type string + /// + /// default value used when a default is not provided to a getter function + /// + /// subscribe options + /// subscriber public IBooleanSubscriber SubscribeEx( ReadOnlySpan typeString, bool defaultValue, @@ -122,21 +123,20 @@ public IBooleanSubscriber SubscribeEx( defaultValue); } - /** - * Create a new publisher to the topic. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param options publish options - * @return publisher - */ + ///

+ /// Create a new publisher to the topic. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// publish options + /// publisher public IBooleanPublisher Publish( PubSubOptions options) { @@ -148,22 +148,22 @@ public IBooleanPublisher Publish( false); } - /** - * Create a new publisher to the topic. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param options publish options - * @return publisher - */ + ///

+ /// Create a new publisher to the topic, with type string and initial properties. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// JSON properties + /// publish options + /// publisher public IBooleanPublisher PublishEx( string typeString, string properties, PubSubOptions options) @@ -176,24 +176,22 @@ public IBooleanPublisher PublishEx( false); } - /** - * Create a new publisher to the topic, with type string and initial properties. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param properties JSON properties - * @param options publish options - * @return publisher - * @throws IllegalArgumentException if properties is not a JSON object - */ + ///

+ /// Create a new publisher to the topic, with type string and initial properties. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// JSON properties + /// publish options + /// publisher public IBooleanPublisher PublishEx( ReadOnlySpan typeString, string properties, @@ -207,24 +205,22 @@ public IBooleanPublisher PublishEx( false); } - /** - * Create a new publisher to the topic, with type string and initial properties. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param properties JSON properties - * @param options publish options - * @return publisher - * @throws IllegalArgumentException if properties is not a JSON object - */ + ///

+ /// Create a new publisher to the topic, with type string and initial properties. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// JSON properties + /// publish options + /// publisher public IBooleanPublisher PublishEx( string typeString, ReadOnlySpan properties, @@ -238,24 +234,22 @@ public IBooleanPublisher PublishEx( false); } - /** - * Create a new publisher to the topic, with type string and initial properties. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param properties JSON properties - * @param options publish options - * @return publisher - * @throws IllegalArgumentException if properties is not a JSON object - */ + ///

+ /// Create a new publisher to the topic, with type string and initial properties. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// JSON properties + /// publish options + /// publisher public IBooleanPublisher PublishEx( ReadOnlySpan typeString, ReadOnlySpan properties, @@ -269,26 +263,26 @@ public IBooleanPublisher PublishEx( false); } - /** - * Create a new entry for the topic. - * - *

Entries act as a combination of a subscriber and a weak publisher. The - * subscriber is active as long as the entry is not closed. The publisher is - * created when the entry is first written to, and remains active until either - * unpublish() is called or the entry is closed. - * - *

It is not possible to use two different data types with the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored), and the entry will show no new - * values if the data type does not match. To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options publish and/or subscribe options - * @return entry - */ + ///

+ /// Create a new entry for the topic. + /// + /// + /// Entries act as a combination of a subscriber and a weak publisher. The + /// subscriber is active as long as the entry is not closed. The publisher is + /// created when the entry is first written to, and remains active until either + /// Unpublish() is called or the entry is closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// + /// default value used when a default is not provided to a getter function + /// + /// publish and/or subscribe options + /// entry public IBooleanEntry GetEntry( bool defaultValue, PubSubOptions options) @@ -301,27 +295,27 @@ public IBooleanEntry GetEntry( defaultValue); } - /** - * Create a new entry for the topic, with specified type string. - * - *

Entries act as a combination of a subscriber and a weak publisher. The - * subscriber is active as long as the entry is not closed. The publisher is - * created when the entry is first written to, and remains active until either - * unpublish() is called or the entry is closed. - * - *

It is not possible to use two different data types with the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored), and the entry will show no new - * values if the data type does not match. To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options publish and/or subscribe options - * @return entry - */ + ///

+ /// Create a new entry for the topic, with the specified type string. + /// + /// + /// Entries act as a combination of a subscriber and a weak publisher. The + /// subscriber is active as long as the entry is not closed. The publisher is + /// created when the entry is first written to, and remains active until either + /// Unpublish() is called or the entry is closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// + /// default value used when a default is not provided to a getter function + /// + /// publish and/or subscribe options + /// entry public IBooleanEntry GetEntryEx( string typeString, bool defaultValue, @@ -335,27 +329,27 @@ public IBooleanEntry GetEntryEx( defaultValue); } - /** - * Create a new entry for the topic, with specified type string. - * - *

Entries act as a combination of a subscriber and a weak publisher. The - * subscriber is active as long as the entry is not closed. The publisher is - * created when the entry is first written to, and remains active until either - * unpublish() is called or the entry is closed. - * - *

It is not possible to use two different data types with the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored), and the entry will show no new - * values if the data type does not match. To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options publish and/or subscribe options - * @return entry - */ + ///

+ /// Create a new entry for the topic, with the specified type string. + /// + /// + /// Entries act as a combination of a subscriber and a weak publisher. The + /// subscriber is active as long as the entry is not closed. The publisher is + /// created when the entry is first written to, and remains active until either + /// Unpublish() is called or the entry is closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// + /// default value used when a default is not provided to a getter function + /// + /// publish and/or subscribe options + /// entry public IBooleanEntry GetEntryEx( ReadOnlySpan typeString, bool defaultValue, @@ -369,6 +363,4 @@ public IBooleanEntry GetEntryEx( defaultValue); } - - } diff --git a/src/ntcore/Generated/DoubleArrayEntry.cs b/src/ntcore/Generated/DoubleArrayEntry.cs index 45110057..88388795 100644 --- a/src/ntcore/Generated/DoubleArrayEntry.cs +++ b/src/ntcore/Generated/DoubleArrayEntry.cs @@ -6,13 +6,13 @@ namespace NetworkTables; -/** - * NetworkTables DoubleArray entry. - * - *

Unlike NetworkTableEntry, the entry goes away when close() is called. - */ +///

+/// NetworkTables DoubleArray entry. +/// public interface IDoubleArrayEntry : IDoubleArraySubscriber, IDoubleArrayPublisher { - /** Stops publishing the entry if it's published. */ + /// + /// Stops publishing the entry if its published. + /// void Unpublish(); } diff --git a/src/ntcore/Generated/DoubleArrayEntryImpl.cs b/src/ntcore/Generated/DoubleArrayEntryImpl.cs index b8814c57..77f67cd9 100644 --- a/src/ntcore/Generated/DoubleArrayEntryImpl.cs +++ b/src/ntcore/Generated/DoubleArrayEntryImpl.cs @@ -10,16 +10,8 @@ namespace NetworkTables; -/** NetworkTables DoubleArray implementation. */ internal sealed class DoubleArrayEntryImpl : EntryBase, IDoubleArrayEntry where T : struct, INtEntryHandle { - /** - * Constructor. - * - * @param topic Topic - * @param handle Native handle - * @param defaultValue Default value for Get() - */ internal DoubleArrayEntryImpl(DoubleArrayTopic topic, T handle, double[] defaultValue) : base(handle) { Topic = topic; @@ -28,7 +20,6 @@ internal DoubleArrayEntryImpl(DoubleArrayTopic topic, T handle, double[] default public override DoubleArrayTopic Topic { get; } - public double[] Get() { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -39,7 +30,6 @@ public double[] Get() return m_defaultValue; } - public double[] Get(double[] defaultValue) { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -50,7 +40,6 @@ public double[] Get(double[] defaultValue) return defaultValue; } - public TimestampedObject GetAtomic() { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -58,7 +47,6 @@ public TimestampedObject GetAtomic() return new TimestampedObject(value.Time, value.ServerTime, baseValue); } - public TimestampedObject GetAtomic(double[] defaultValue) { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -66,7 +54,6 @@ public TimestampedObject GetAtomic(double[] defaultValue) return new TimestampedObject(value.Time, value.ServerTime, baseValue); } - public TimestampedObject[] ReadQueue() { NetworkTableValue[] values = NtCore.ReadQueueValue(Handle); @@ -78,7 +65,6 @@ public TimestampedObject[] ReadQueue() return timestamped; } - public double[][] ReadQueueValues() { NetworkTableValue[] values = NtCore.ReadQueueValue(Handle); @@ -108,6 +94,7 @@ public void SetDefault(ReadOnlySpan value) RefNetworkTableValue ntValue = RefNetworkTableValue.MakeDoubleArray(value); NtCore.SetDefaultEntryValue(Handle, ntValue); } + public void Unpublish() { NtCore.Unpublish(Handle); diff --git a/src/ntcore/Generated/DoubleArrayPublisher.cs b/src/ntcore/Generated/DoubleArrayPublisher.cs index 784e9a11..6297f33a 100644 --- a/src/ntcore/Generated/DoubleArrayPublisher.cs +++ b/src/ntcore/Generated/DoubleArrayPublisher.cs @@ -8,39 +8,34 @@ namespace NetworkTables; -/** NetworkTables DoubleArray publisher. */ +/// +/// NetworkTables DoubleArray publisher. +/// public interface IDoubleArrayPublisher : IPublisher { - /** - * Get the corresponding topic. - * - * @return Topic - */ - + /// + /// Gets the corresponding topic. + /// new DoubleArrayTopic Topic { get; } - /** - * Publish a new value using current NT time. - * - * @param value value to publish - */ + /// + /// Publish a new value using the current NT time. + /// + /// value to publish void Set(ReadOnlySpan value); - /** - * Publish a new value. - * - * @param value value to publish - * @param time timestamp; 0 indicates current NT time should be used - */ + /// + /// Publish a new value. + /// + /// value to publish + /// timestamp; 0 indicates current NT time should be used void Set(ReadOnlySpan value, long time); - /** - * Publish a default value. - * On reconnect, a default value will never be used in preference to a - * published value. - * - * @param value value - */ + /// + /// Publish a default value. On reconnect, a default value will never be used + /// in prference to a published value + /// + /// value void SetDefault(ReadOnlySpan value); } diff --git a/src/ntcore/Generated/DoubleArraySubscriber.cs b/src/ntcore/Generated/DoubleArraySubscriber.cs index 3e9ddff2..20b041e5 100644 --- a/src/ntcore/Generated/DoubleArraySubscriber.cs +++ b/src/ntcore/Generated/DoubleArraySubscriber.cs @@ -6,73 +6,62 @@ namespace NetworkTables; -/** NetworkTables DoubleArray subscriber. */ +/// +/// NetworkTables DoubleArray subscriver. +/// public interface IDoubleArraySubscriber : ISubscriber { - /** - * Get the corresponding topic. - * - * @return Topic - */ - + /// + /// Gets the corresponding topic. + /// new DoubleArrayTopic Topic { get; } - /** - * Get the last published value. - * If no value has been published, returns the stored default value. - * - * @return value - */ + /// + /// Get the last published value. + /// If no value has been published, returns the stored default value. + /// + /// value double[] Get(); - /** - * Get the last published value. - * If no value has been published, returns the passed defaultValue. - * - * @param defaultValue default value to return if no value has been published - * @return value - */ + /// + /// Get the last published value. + /// If no value has been published, returns the passed default value. + /// + /// default value to return if no value has been published + /// value double[] Get(double[] defaultValue); - /** - * Get the last published value along with its timestamp - * If no value has been published, returns the stored default value and a - * timestamp of 0. - * - * @return timestamped value - */ + /// + /// Get the last published value along with its timestamp. + /// If no value has been published, returns the stored default value and a timestamp of 0. + /// + /// timestamped value TimestampedObject GetAtomic(); - /** - * Get the last published value along with its timestamp - * If no value has been published, returns the passed defaultValue and a - * timestamp of 0. - * - * @param defaultValue default value to return if no value has been published - * @return timestamped value - */ + /// + /// Get the last published value along with its timestamp. + /// If no value has been published, returns the passed default value and a timestamp of 0. + /// + /// default value to return if no value has been published + /// timestamped value TimestampedObject GetAtomic(double[] defaultValue); - /** - * Get an array of all value changes since the last call to readQueue. - * Also provides a timestamp for each value. - * - *

The "poll storage" subscribe option can be used to set the queue - * depth. - * - * @return Array of timestamped values; empty array if no new changes have - * been published since the previous call. - */ + ///

+ /// Get an array of all value changes since the last call to ReadQueue. + /// Also provides a timestamp for each value. + /// + /// + /// The "poll storage" subscribe option can be used to set the queue depth. + /// Array of timestamped values; emptry if no new changes TimestampedObject[] ReadQueue(); - /** - * Get an array of all value changes since the last call to readQueue. - * - *

The "poll storage" subscribe option can be used to set the queue - * depth. - * - * @return Array of values; empty array if no new changes have been - * published since the previous call. - */ + ///

+ /// Get an array of all value changes since the last call to ReadQueue. + /// + /// + /// The "poll storage" subscribe option can be used to set the queue depth. + /// Array of values; emptry if no new changes double[][] ReadQueueValues(); } diff --git a/src/ntcore/Generated/DoubleArrayTopic.cs b/src/ntcore/Generated/DoubleArrayTopic.cs index f854b3ef..c8c722ad 100644 --- a/src/ntcore/Generated/DoubleArrayTopic.cs +++ b/src/ntcore/Generated/DoubleArrayTopic.cs @@ -10,48 +10,49 @@ namespace NetworkTables; -/** NetworkTables DoubleArray topic. */ +/// +/// NetworkTables DoubleArray topic. +/// public class DoubleArrayTopic : Topic { - /** The default type string for this topic type. */ + /// + /// The default type string for this topic type + /// public static string kTypeString => "double[]"; + /// + /// The default type string for this topic type in a UTF8 Span + /// public static ReadOnlySpan kTypeStringUtf8 => "double[]"u8; - /** - * Construct from a generic topic. - * - * @param topic Topic - */ - public DoubleArrayTopic(Topic topic) : base(topic.Instance, topic.Handle) - { - } + /// + /// Constructs a typed topic from a generic topic. + /// + /// typed topic + public DoubleArrayTopic(Topic topic) : base(topic.Instance, topic.Handle) { } - /** - * Constructor; use NetworkTableInstance.getDoubleArrayTopic() instead. - * - * @param inst Instance - * @param handle Native handle - */ - public DoubleArrayTopic(NetworkTableInstance inst, NtTopic handle) : base(inst, handle) - { - } + /// + /// Constructor; use NetworkTableInstance.GetDoubleArrayTopic() instead. + /// + /// Instance + /// Native handle + public DoubleArrayTopic(NetworkTableInstance inst, NtTopic handle) : base(inst, handle) { } - /** - * Create a new subscriber to the topic. - * - *

The subscriber is only active as long as the returned object - * is not closed. - * - *

Subscribers that do not match the published data type do not return - * any values. To determine if the data type matches, use the appropriate - * Topic functions. - * - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options subscribe options - * @return subscriber - */ + ///

+ /// Create a new subscriver to the topic. + /// + /// + /// The subscriber is only active as long as the returned object is not closed. + /// + /// Subscribers that do not match the published data type do not return any + /// values. To determine if the data type matches, use the appropriate Topic + /// functions. + /// + /// + /// default value used when a default is not provided to a getter function + /// + /// subscribe options + /// subscriber public IDoubleArraySubscriber Subscribe( double[] defaultValue, PubSubOptions options) @@ -64,22 +65,22 @@ public IDoubleArraySubscriber Subscribe( defaultValue); } - /** - * Create a new subscriber to the topic, with specified type string. - * - *

The subscriber is only active as long as the returned object - * is not closed. - * - *

Subscribers that do not match the published data type do not return - * any values. To determine if the data type matches, use the appropriate - * Topic functions. - * - * @param typeString type string - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options subscribe options - * @return subscriber - */ + ///

+ /// Create a new subscriber to the topic, with the specified type string. + /// + /// + /// The subscriber is only active as long as the returned object is not closed. + /// + /// Subscribers that do not match the published data type do not return any + /// values. To determine if the data type matches, use the appropriate Topic + /// functions. + /// + /// type string + /// + /// default value used when a default is not provided to a getter function + /// + /// subscribe options + /// subscriber public IDoubleArraySubscriber SubscribeEx( string typeString, double[] defaultValue, @@ -93,22 +94,22 @@ public IDoubleArraySubscriber SubscribeEx( defaultValue); } - /** - * Create a new subscriber to the topic, with specified type string. - * - *

The subscriber is only active as long as the returned object - * is not closed. - * - *

Subscribers that do not match the published data type do not return - * any values. To determine if the data type matches, use the appropriate - * Topic functions. - * - * @param typeString type string - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options subscribe options - * @return subscriber - */ + ///

+ /// Create a new subscriber to the topic, with the specified type string. + /// + /// + /// The subscriber is only active as long as the returned object is not closed. + /// + /// Subscribers that do not match the published data type do not return any + /// values. To determine if the data type matches, use the appropriate Topic + /// functions. + /// + /// type string + /// + /// default value used when a default is not provided to a getter function + /// + /// subscribe options + /// subscriber public IDoubleArraySubscriber SubscribeEx( ReadOnlySpan typeString, double[] defaultValue, @@ -122,21 +123,20 @@ public IDoubleArraySubscriber SubscribeEx( defaultValue); } - /** - * Create a new publisher to the topic. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param options publish options - * @return publisher - */ + ///

+ /// Create a new publisher to the topic. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// publish options + /// publisher public IDoubleArrayPublisher Publish( PubSubOptions options) { @@ -148,22 +148,22 @@ public IDoubleArrayPublisher Publish( []); } - /** - * Create a new publisher to the topic. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param options publish options - * @return publisher - */ + ///

+ /// Create a new publisher to the topic, with type string and initial properties. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// JSON properties + /// publish options + /// publisher public IDoubleArrayPublisher PublishEx( string typeString, string properties, PubSubOptions options) @@ -176,24 +176,22 @@ public IDoubleArrayPublisher PublishEx( []); } - /** - * Create a new publisher to the topic, with type string and initial properties. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param properties JSON properties - * @param options publish options - * @return publisher - * @throws IllegalArgumentException if properties is not a JSON object - */ + ///

+ /// Create a new publisher to the topic, with type string and initial properties. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// JSON properties + /// publish options + /// publisher public IDoubleArrayPublisher PublishEx( ReadOnlySpan typeString, string properties, @@ -207,24 +205,22 @@ public IDoubleArrayPublisher PublishEx( []); } - /** - * Create a new publisher to the topic, with type string and initial properties. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param properties JSON properties - * @param options publish options - * @return publisher - * @throws IllegalArgumentException if properties is not a JSON object - */ + ///

+ /// Create a new publisher to the topic, with type string and initial properties. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// JSON properties + /// publish options + /// publisher public IDoubleArrayPublisher PublishEx( string typeString, ReadOnlySpan properties, @@ -238,24 +234,22 @@ public IDoubleArrayPublisher PublishEx( []); } - /** - * Create a new publisher to the topic, with type string and initial properties. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param properties JSON properties - * @param options publish options - * @return publisher - * @throws IllegalArgumentException if properties is not a JSON object - */ + ///

+ /// Create a new publisher to the topic, with type string and initial properties. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// JSON properties + /// publish options + /// publisher public IDoubleArrayPublisher PublishEx( ReadOnlySpan typeString, ReadOnlySpan properties, @@ -269,26 +263,26 @@ public IDoubleArrayPublisher PublishEx( []); } - /** - * Create a new entry for the topic. - * - *

Entries act as a combination of a subscriber and a weak publisher. The - * subscriber is active as long as the entry is not closed. The publisher is - * created when the entry is first written to, and remains active until either - * unpublish() is called or the entry is closed. - * - *

It is not possible to use two different data types with the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored), and the entry will show no new - * values if the data type does not match. To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options publish and/or subscribe options - * @return entry - */ + ///

+ /// Create a new entry for the topic. + /// + /// + /// Entries act as a combination of a subscriber and a weak publisher. The + /// subscriber is active as long as the entry is not closed. The publisher is + /// created when the entry is first written to, and remains active until either + /// Unpublish() is called or the entry is closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// + /// default value used when a default is not provided to a getter function + /// + /// publish and/or subscribe options + /// entry public IDoubleArrayEntry GetEntry( double[] defaultValue, PubSubOptions options) @@ -301,27 +295,27 @@ public IDoubleArrayEntry GetEntry( defaultValue); } - /** - * Create a new entry for the topic, with specified type string. - * - *

Entries act as a combination of a subscriber and a weak publisher. The - * subscriber is active as long as the entry is not closed. The publisher is - * created when the entry is first written to, and remains active until either - * unpublish() is called or the entry is closed. - * - *

It is not possible to use two different data types with the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored), and the entry will show no new - * values if the data type does not match. To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options publish and/or subscribe options - * @return entry - */ + ///

+ /// Create a new entry for the topic, with the specified type string. + /// + /// + /// Entries act as a combination of a subscriber and a weak publisher. The + /// subscriber is active as long as the entry is not closed. The publisher is + /// created when the entry is first written to, and remains active until either + /// Unpublish() is called or the entry is closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// + /// default value used when a default is not provided to a getter function + /// + /// publish and/or subscribe options + /// entry public IDoubleArrayEntry GetEntryEx( string typeString, double[] defaultValue, @@ -335,27 +329,27 @@ public IDoubleArrayEntry GetEntryEx( defaultValue); } - /** - * Create a new entry for the topic, with specified type string. - * - *

Entries act as a combination of a subscriber and a weak publisher. The - * subscriber is active as long as the entry is not closed. The publisher is - * created when the entry is first written to, and remains active until either - * unpublish() is called or the entry is closed. - * - *

It is not possible to use two different data types with the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored), and the entry will show no new - * values if the data type does not match. To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options publish and/or subscribe options - * @return entry - */ + ///

+ /// Create a new entry for the topic, with the specified type string. + /// + /// + /// Entries act as a combination of a subscriber and a weak publisher. The + /// subscriber is active as long as the entry is not closed. The publisher is + /// created when the entry is first written to, and remains active until either + /// Unpublish() is called or the entry is closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// + /// default value used when a default is not provided to a getter function + /// + /// publish and/or subscribe options + /// entry public IDoubleArrayEntry GetEntryEx( ReadOnlySpan typeString, double[] defaultValue, @@ -369,6 +363,4 @@ public IDoubleArrayEntry GetEntryEx( defaultValue); } - - } diff --git a/src/ntcore/Generated/DoubleEntry.cs b/src/ntcore/Generated/DoubleEntry.cs index 1792e772..f1025659 100644 --- a/src/ntcore/Generated/DoubleEntry.cs +++ b/src/ntcore/Generated/DoubleEntry.cs @@ -6,13 +6,13 @@ namespace NetworkTables; -/** - * NetworkTables Double entry. - * - *

Unlike NetworkTableEntry, the entry goes away when close() is called. - */ +///

+/// NetworkTables Double entry. +/// public interface IDoubleEntry : IDoubleSubscriber, IDoublePublisher { - /** Stops publishing the entry if it's published. */ + /// + /// Stops publishing the entry if its published. + /// void Unpublish(); } diff --git a/src/ntcore/Generated/DoubleEntryImpl.cs b/src/ntcore/Generated/DoubleEntryImpl.cs index 8b59dc57..9a6f8e55 100644 --- a/src/ntcore/Generated/DoubleEntryImpl.cs +++ b/src/ntcore/Generated/DoubleEntryImpl.cs @@ -10,16 +10,8 @@ namespace NetworkTables; -/** NetworkTables Double implementation. */ internal sealed class DoubleEntryImpl : EntryBase, IDoubleEntry where T : struct, INtEntryHandle { - /** - * Constructor. - * - * @param topic Topic - * @param handle Native handle - * @param defaultValue Default value for Get() - */ internal DoubleEntryImpl(DoubleTopic topic, T handle, double defaultValue) : base(handle) { Topic = topic; @@ -28,7 +20,6 @@ internal DoubleEntryImpl(DoubleTopic topic, T handle, double defaultValue) : bas public override DoubleTopic Topic { get; } - public double Get() { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -39,7 +30,6 @@ public double Get() return m_defaultValue; } - public double Get(double defaultValue) { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -50,7 +40,6 @@ public double Get(double defaultValue) return defaultValue; } - public TimestampedObject GetAtomic() { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -58,7 +47,6 @@ public TimestampedObject GetAtomic() return new TimestampedObject(value.Time, value.ServerTime, baseValue); } - public TimestampedObject GetAtomic(double defaultValue) { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -66,7 +54,6 @@ public TimestampedObject GetAtomic(double defaultValue) return new TimestampedObject(value.Time, value.ServerTime, baseValue); } - public TimestampedObject[] ReadQueue() { NetworkTableValue[] values = NtCore.ReadQueueValue(Handle); @@ -78,7 +65,6 @@ public TimestampedObject[] ReadQueue() return timestamped; } - public double[] ReadQueueValues() { NetworkTableValue[] values = NtCore.ReadQueueValue(Handle); @@ -108,6 +94,7 @@ public void SetDefault(double value) RefNetworkTableValue ntValue = RefNetworkTableValue.MakeDouble(value); NtCore.SetDefaultEntryValue(Handle, ntValue); } + public void Unpublish() { NtCore.Unpublish(Handle); diff --git a/src/ntcore/Generated/DoublePublisher.cs b/src/ntcore/Generated/DoublePublisher.cs index 1ebeca68..c2882142 100644 --- a/src/ntcore/Generated/DoublePublisher.cs +++ b/src/ntcore/Generated/DoublePublisher.cs @@ -8,39 +8,34 @@ namespace NetworkTables; -/** NetworkTables Double publisher. */ +/// +/// NetworkTables Double publisher. +/// public interface IDoublePublisher : IPublisher { - /** - * Get the corresponding topic. - * - * @return Topic - */ - + /// + /// Gets the corresponding topic. + /// new DoubleTopic Topic { get; } - /** - * Publish a new value using current NT time. - * - * @param value value to publish - */ + /// + /// Publish a new value using the current NT time. + /// + /// value to publish void Set(double value); - /** - * Publish a new value. - * - * @param value value to publish - * @param time timestamp; 0 indicates current NT time should be used - */ + /// + /// Publish a new value. + /// + /// value to publish + /// timestamp; 0 indicates current NT time should be used void Set(double value, long time); - /** - * Publish a default value. - * On reconnect, a default value will never be used in preference to a - * published value. - * - * @param value value - */ + /// + /// Publish a default value. On reconnect, a default value will never be used + /// in prference to a published value + /// + /// value void SetDefault(double value); } diff --git a/src/ntcore/Generated/DoubleSubscriber.cs b/src/ntcore/Generated/DoubleSubscriber.cs index 202be2b0..7dcab8e4 100644 --- a/src/ntcore/Generated/DoubleSubscriber.cs +++ b/src/ntcore/Generated/DoubleSubscriber.cs @@ -6,73 +6,62 @@ namespace NetworkTables; -/** NetworkTables Double subscriber. */ +/// +/// NetworkTables Double subscriver. +/// public interface IDoubleSubscriber : ISubscriber { - /** - * Get the corresponding topic. - * - * @return Topic - */ - + /// + /// Gets the corresponding topic. + /// new DoubleTopic Topic { get; } - /** - * Get the last published value. - * If no value has been published, returns the stored default value. - * - * @return value - */ + /// + /// Get the last published value. + /// If no value has been published, returns the stored default value. + /// + /// value double Get(); - /** - * Get the last published value. - * If no value has been published, returns the passed defaultValue. - * - * @param defaultValue default value to return if no value has been published - * @return value - */ + /// + /// Get the last published value. + /// If no value has been published, returns the passed default value. + /// + /// default value to return if no value has been published + /// value double Get(double defaultValue); - /** - * Get the last published value along with its timestamp - * If no value has been published, returns the stored default value and a - * timestamp of 0. - * - * @return timestamped value - */ + /// + /// Get the last published value along with its timestamp. + /// If no value has been published, returns the stored default value and a timestamp of 0. + /// + /// timestamped value TimestampedObject GetAtomic(); - /** - * Get the last published value along with its timestamp - * If no value has been published, returns the passed defaultValue and a - * timestamp of 0. - * - * @param defaultValue default value to return if no value has been published - * @return timestamped value - */ + /// + /// Get the last published value along with its timestamp. + /// If no value has been published, returns the passed default value and a timestamp of 0. + /// + /// default value to return if no value has been published + /// timestamped value TimestampedObject GetAtomic(double defaultValue); - /** - * Get an array of all value changes since the last call to readQueue. - * Also provides a timestamp for each value. - * - *

The "poll storage" subscribe option can be used to set the queue - * depth. - * - * @return Array of timestamped values; empty array if no new changes have - * been published since the previous call. - */ + ///

+ /// Get an array of all value changes since the last call to ReadQueue. + /// Also provides a timestamp for each value. + /// + /// + /// The "poll storage" subscribe option can be used to set the queue depth. + /// Array of timestamped values; emptry if no new changes TimestampedObject[] ReadQueue(); - /** - * Get an array of all value changes since the last call to readQueue. - * - *

The "poll storage" subscribe option can be used to set the queue - * depth. - * - * @return Array of values; empty array if no new changes have been - * published since the previous call. - */ + ///

+ /// Get an array of all value changes since the last call to ReadQueue. + /// + /// + /// The "poll storage" subscribe option can be used to set the queue depth. + /// Array of values; emptry if no new changes double[] ReadQueueValues(); } diff --git a/src/ntcore/Generated/DoubleTopic.cs b/src/ntcore/Generated/DoubleTopic.cs index 961a6f7c..d8669c6c 100644 --- a/src/ntcore/Generated/DoubleTopic.cs +++ b/src/ntcore/Generated/DoubleTopic.cs @@ -10,48 +10,49 @@ namespace NetworkTables; -/** NetworkTables Double topic. */ +/// +/// NetworkTables Double topic. +/// public class DoubleTopic : Topic { - /** The default type string for this topic type. */ + /// + /// The default type string for this topic type + /// public static string kTypeString => "double"; + /// + /// The default type string for this topic type in a UTF8 Span + /// public static ReadOnlySpan kTypeStringUtf8 => "double"u8; - /** - * Construct from a generic topic. - * - * @param topic Topic - */ - public DoubleTopic(Topic topic) : base(topic.Instance, topic.Handle) - { - } + /// + /// Constructs a typed topic from a generic topic. + /// + /// typed topic + public DoubleTopic(Topic topic) : base(topic.Instance, topic.Handle) { } - /** - * Constructor; use NetworkTableInstance.getDoubleTopic() instead. - * - * @param inst Instance - * @param handle Native handle - */ - public DoubleTopic(NetworkTableInstance inst, NtTopic handle) : base(inst, handle) - { - } + /// + /// Constructor; use NetworkTableInstance.GetDoubleTopic() instead. + /// + /// Instance + /// Native handle + public DoubleTopic(NetworkTableInstance inst, NtTopic handle) : base(inst, handle) { } - /** - * Create a new subscriber to the topic. - * - *

The subscriber is only active as long as the returned object - * is not closed. - * - *

Subscribers that do not match the published data type do not return - * any values. To determine if the data type matches, use the appropriate - * Topic functions. - * - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options subscribe options - * @return subscriber - */ + ///

+ /// Create a new subscriver to the topic. + /// + /// + /// The subscriber is only active as long as the returned object is not closed. + /// + /// Subscribers that do not match the published data type do not return any + /// values. To determine if the data type matches, use the appropriate Topic + /// functions. + /// + /// + /// default value used when a default is not provided to a getter function + /// + /// subscribe options + /// subscriber public IDoubleSubscriber Subscribe( double defaultValue, PubSubOptions options) @@ -64,22 +65,22 @@ public IDoubleSubscriber Subscribe( defaultValue); } - /** - * Create a new subscriber to the topic, with specified type string. - * - *

The subscriber is only active as long as the returned object - * is not closed. - * - *

Subscribers that do not match the published data type do not return - * any values. To determine if the data type matches, use the appropriate - * Topic functions. - * - * @param typeString type string - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options subscribe options - * @return subscriber - */ + ///

+ /// Create a new subscriber to the topic, with the specified type string. + /// + /// + /// The subscriber is only active as long as the returned object is not closed. + /// + /// Subscribers that do not match the published data type do not return any + /// values. To determine if the data type matches, use the appropriate Topic + /// functions. + /// + /// type string + /// + /// default value used when a default is not provided to a getter function + /// + /// subscribe options + /// subscriber public IDoubleSubscriber SubscribeEx( string typeString, double defaultValue, @@ -93,22 +94,22 @@ public IDoubleSubscriber SubscribeEx( defaultValue); } - /** - * Create a new subscriber to the topic, with specified type string. - * - *

The subscriber is only active as long as the returned object - * is not closed. - * - *

Subscribers that do not match the published data type do not return - * any values. To determine if the data type matches, use the appropriate - * Topic functions. - * - * @param typeString type string - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options subscribe options - * @return subscriber - */ + ///

+ /// Create a new subscriber to the topic, with the specified type string. + /// + /// + /// The subscriber is only active as long as the returned object is not closed. + /// + /// Subscribers that do not match the published data type do not return any + /// values. To determine if the data type matches, use the appropriate Topic + /// functions. + /// + /// type string + /// + /// default value used when a default is not provided to a getter function + /// + /// subscribe options + /// subscriber public IDoubleSubscriber SubscribeEx( ReadOnlySpan typeString, double defaultValue, @@ -122,21 +123,20 @@ public IDoubleSubscriber SubscribeEx( defaultValue); } - /** - * Create a new publisher to the topic. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param options publish options - * @return publisher - */ + ///

+ /// Create a new publisher to the topic. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// publish options + /// publisher public IDoublePublisher Publish( PubSubOptions options) { @@ -148,22 +148,22 @@ public IDoublePublisher Publish( 0); } - /** - * Create a new publisher to the topic. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param options publish options - * @return publisher - */ + ///

+ /// Create a new publisher to the topic, with type string and initial properties. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// JSON properties + /// publish options + /// publisher public IDoublePublisher PublishEx( string typeString, string properties, PubSubOptions options) @@ -176,24 +176,22 @@ public IDoublePublisher PublishEx( 0); } - /** - * Create a new publisher to the topic, with type string and initial properties. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param properties JSON properties - * @param options publish options - * @return publisher - * @throws IllegalArgumentException if properties is not a JSON object - */ + ///

+ /// Create a new publisher to the topic, with type string and initial properties. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// JSON properties + /// publish options + /// publisher public IDoublePublisher PublishEx( ReadOnlySpan typeString, string properties, @@ -207,24 +205,22 @@ public IDoublePublisher PublishEx( 0); } - /** - * Create a new publisher to the topic, with type string and initial properties. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param properties JSON properties - * @param options publish options - * @return publisher - * @throws IllegalArgumentException if properties is not a JSON object - */ + ///

+ /// Create a new publisher to the topic, with type string and initial properties. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// JSON properties + /// publish options + /// publisher public IDoublePublisher PublishEx( string typeString, ReadOnlySpan properties, @@ -238,24 +234,22 @@ public IDoublePublisher PublishEx( 0); } - /** - * Create a new publisher to the topic, with type string and initial properties. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param properties JSON properties - * @param options publish options - * @return publisher - * @throws IllegalArgumentException if properties is not a JSON object - */ + ///

+ /// Create a new publisher to the topic, with type string and initial properties. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// JSON properties + /// publish options + /// publisher public IDoublePublisher PublishEx( ReadOnlySpan typeString, ReadOnlySpan properties, @@ -269,26 +263,26 @@ public IDoublePublisher PublishEx( 0); } - /** - * Create a new entry for the topic. - * - *

Entries act as a combination of a subscriber and a weak publisher. The - * subscriber is active as long as the entry is not closed. The publisher is - * created when the entry is first written to, and remains active until either - * unpublish() is called or the entry is closed. - * - *

It is not possible to use two different data types with the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored), and the entry will show no new - * values if the data type does not match. To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options publish and/or subscribe options - * @return entry - */ + ///

+ /// Create a new entry for the topic. + /// + /// + /// Entries act as a combination of a subscriber and a weak publisher. The + /// subscriber is active as long as the entry is not closed. The publisher is + /// created when the entry is first written to, and remains active until either + /// Unpublish() is called or the entry is closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// + /// default value used when a default is not provided to a getter function + /// + /// publish and/or subscribe options + /// entry public IDoubleEntry GetEntry( double defaultValue, PubSubOptions options) @@ -301,27 +295,27 @@ public IDoubleEntry GetEntry( defaultValue); } - /** - * Create a new entry for the topic, with specified type string. - * - *

Entries act as a combination of a subscriber and a weak publisher. The - * subscriber is active as long as the entry is not closed. The publisher is - * created when the entry is first written to, and remains active until either - * unpublish() is called or the entry is closed. - * - *

It is not possible to use two different data types with the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored), and the entry will show no new - * values if the data type does not match. To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options publish and/or subscribe options - * @return entry - */ + ///

+ /// Create a new entry for the topic, with the specified type string. + /// + /// + /// Entries act as a combination of a subscriber and a weak publisher. The + /// subscriber is active as long as the entry is not closed. The publisher is + /// created when the entry is first written to, and remains active until either + /// Unpublish() is called or the entry is closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// + /// default value used when a default is not provided to a getter function + /// + /// publish and/or subscribe options + /// entry public IDoubleEntry GetEntryEx( string typeString, double defaultValue, @@ -335,27 +329,27 @@ public IDoubleEntry GetEntryEx( defaultValue); } - /** - * Create a new entry for the topic, with specified type string. - * - *

Entries act as a combination of a subscriber and a weak publisher. The - * subscriber is active as long as the entry is not closed. The publisher is - * created when the entry is first written to, and remains active until either - * unpublish() is called or the entry is closed. - * - *

It is not possible to use two different data types with the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored), and the entry will show no new - * values if the data type does not match. To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options publish and/or subscribe options - * @return entry - */ + ///

+ /// Create a new entry for the topic, with the specified type string. + /// + /// + /// Entries act as a combination of a subscriber and a weak publisher. The + /// subscriber is active as long as the entry is not closed. The publisher is + /// created when the entry is first written to, and remains active until either + /// Unpublish() is called or the entry is closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// + /// default value used when a default is not provided to a getter function + /// + /// publish and/or subscribe options + /// entry public IDoubleEntry GetEntryEx( ReadOnlySpan typeString, double defaultValue, @@ -369,6 +363,4 @@ public IDoubleEntry GetEntryEx( defaultValue); } - - } diff --git a/src/ntcore/Generated/FloatArrayEntry.cs b/src/ntcore/Generated/FloatArrayEntry.cs index 31a6e742..51aa3368 100644 --- a/src/ntcore/Generated/FloatArrayEntry.cs +++ b/src/ntcore/Generated/FloatArrayEntry.cs @@ -6,13 +6,13 @@ namespace NetworkTables; -/** - * NetworkTables FloatArray entry. - * - *

Unlike NetworkTableEntry, the entry goes away when close() is called. - */ +///

+/// NetworkTables FloatArray entry. +/// public interface IFloatArrayEntry : IFloatArraySubscriber, IFloatArrayPublisher { - /** Stops publishing the entry if it's published. */ + /// + /// Stops publishing the entry if its published. + /// void Unpublish(); } diff --git a/src/ntcore/Generated/FloatArrayEntryImpl.cs b/src/ntcore/Generated/FloatArrayEntryImpl.cs index 049674e4..ff53af7e 100644 --- a/src/ntcore/Generated/FloatArrayEntryImpl.cs +++ b/src/ntcore/Generated/FloatArrayEntryImpl.cs @@ -10,16 +10,8 @@ namespace NetworkTables; -/** NetworkTables FloatArray implementation. */ internal sealed class FloatArrayEntryImpl : EntryBase, IFloatArrayEntry where T : struct, INtEntryHandle { - /** - * Constructor. - * - * @param topic Topic - * @param handle Native handle - * @param defaultValue Default value for Get() - */ internal FloatArrayEntryImpl(FloatArrayTopic topic, T handle, float[] defaultValue) : base(handle) { Topic = topic; @@ -28,7 +20,6 @@ internal FloatArrayEntryImpl(FloatArrayTopic topic, T handle, float[] defaultVal public override FloatArrayTopic Topic { get; } - public float[] Get() { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -39,7 +30,6 @@ public float[] Get() return m_defaultValue; } - public float[] Get(float[] defaultValue) { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -50,7 +40,6 @@ public float[] Get(float[] defaultValue) return defaultValue; } - public TimestampedObject GetAtomic() { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -58,7 +47,6 @@ public TimestampedObject GetAtomic() return new TimestampedObject(value.Time, value.ServerTime, baseValue); } - public TimestampedObject GetAtomic(float[] defaultValue) { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -66,7 +54,6 @@ public TimestampedObject GetAtomic(float[] defaultValue) return new TimestampedObject(value.Time, value.ServerTime, baseValue); } - public TimestampedObject[] ReadQueue() { NetworkTableValue[] values = NtCore.ReadQueueValue(Handle); @@ -78,7 +65,6 @@ public TimestampedObject[] ReadQueue() return timestamped; } - public float[][] ReadQueueValues() { NetworkTableValue[] values = NtCore.ReadQueueValue(Handle); @@ -108,6 +94,7 @@ public void SetDefault(ReadOnlySpan value) RefNetworkTableValue ntValue = RefNetworkTableValue.MakeFloatArray(value); NtCore.SetDefaultEntryValue(Handle, ntValue); } + public void Unpublish() { NtCore.Unpublish(Handle); diff --git a/src/ntcore/Generated/FloatArrayPublisher.cs b/src/ntcore/Generated/FloatArrayPublisher.cs index d628b5dd..d952c32b 100644 --- a/src/ntcore/Generated/FloatArrayPublisher.cs +++ b/src/ntcore/Generated/FloatArrayPublisher.cs @@ -8,39 +8,34 @@ namespace NetworkTables; -/** NetworkTables FloatArray publisher. */ +/// +/// NetworkTables FloatArray publisher. +/// public interface IFloatArrayPublisher : IPublisher { - /** - * Get the corresponding topic. - * - * @return Topic - */ - + /// + /// Gets the corresponding topic. + /// new FloatArrayTopic Topic { get; } - /** - * Publish a new value using current NT time. - * - * @param value value to publish - */ + /// + /// Publish a new value using the current NT time. + /// + /// value to publish void Set(ReadOnlySpan value); - /** - * Publish a new value. - * - * @param value value to publish - * @param time timestamp; 0 indicates current NT time should be used - */ + /// + /// Publish a new value. + /// + /// value to publish + /// timestamp; 0 indicates current NT time should be used void Set(ReadOnlySpan value, long time); - /** - * Publish a default value. - * On reconnect, a default value will never be used in preference to a - * published value. - * - * @param value value - */ + /// + /// Publish a default value. On reconnect, a default value will never be used + /// in prference to a published value + /// + /// value void SetDefault(ReadOnlySpan value); } diff --git a/src/ntcore/Generated/FloatArraySubscriber.cs b/src/ntcore/Generated/FloatArraySubscriber.cs index 7f5566fd..1fbd9324 100644 --- a/src/ntcore/Generated/FloatArraySubscriber.cs +++ b/src/ntcore/Generated/FloatArraySubscriber.cs @@ -6,73 +6,62 @@ namespace NetworkTables; -/** NetworkTables FloatArray subscriber. */ +/// +/// NetworkTables FloatArray subscriver. +/// public interface IFloatArraySubscriber : ISubscriber { - /** - * Get the corresponding topic. - * - * @return Topic - */ - + /// + /// Gets the corresponding topic. + /// new FloatArrayTopic Topic { get; } - /** - * Get the last published value. - * If no value has been published, returns the stored default value. - * - * @return value - */ + /// + /// Get the last published value. + /// If no value has been published, returns the stored default value. + /// + /// value float[] Get(); - /** - * Get the last published value. - * If no value has been published, returns the passed defaultValue. - * - * @param defaultValue default value to return if no value has been published - * @return value - */ + /// + /// Get the last published value. + /// If no value has been published, returns the passed default value. + /// + /// default value to return if no value has been published + /// value float[] Get(float[] defaultValue); - /** - * Get the last published value along with its timestamp - * If no value has been published, returns the stored default value and a - * timestamp of 0. - * - * @return timestamped value - */ + /// + /// Get the last published value along with its timestamp. + /// If no value has been published, returns the stored default value and a timestamp of 0. + /// + /// timestamped value TimestampedObject GetAtomic(); - /** - * Get the last published value along with its timestamp - * If no value has been published, returns the passed defaultValue and a - * timestamp of 0. - * - * @param defaultValue default value to return if no value has been published - * @return timestamped value - */ + /// + /// Get the last published value along with its timestamp. + /// If no value has been published, returns the passed default value and a timestamp of 0. + /// + /// default value to return if no value has been published + /// timestamped value TimestampedObject GetAtomic(float[] defaultValue); - /** - * Get an array of all value changes since the last call to readQueue. - * Also provides a timestamp for each value. - * - *

The "poll storage" subscribe option can be used to set the queue - * depth. - * - * @return Array of timestamped values; empty array if no new changes have - * been published since the previous call. - */ + ///

+ /// Get an array of all value changes since the last call to ReadQueue. + /// Also provides a timestamp for each value. + /// + /// + /// The "poll storage" subscribe option can be used to set the queue depth. + /// Array of timestamped values; emptry if no new changes TimestampedObject[] ReadQueue(); - /** - * Get an array of all value changes since the last call to readQueue. - * - *

The "poll storage" subscribe option can be used to set the queue - * depth. - * - * @return Array of values; empty array if no new changes have been - * published since the previous call. - */ + ///

+ /// Get an array of all value changes since the last call to ReadQueue. + /// + /// + /// The "poll storage" subscribe option can be used to set the queue depth. + /// Array of values; emptry if no new changes float[][] ReadQueueValues(); } diff --git a/src/ntcore/Generated/FloatArrayTopic.cs b/src/ntcore/Generated/FloatArrayTopic.cs index 868062d4..96ca6b42 100644 --- a/src/ntcore/Generated/FloatArrayTopic.cs +++ b/src/ntcore/Generated/FloatArrayTopic.cs @@ -10,48 +10,49 @@ namespace NetworkTables; -/** NetworkTables FloatArray topic. */ +/// +/// NetworkTables FloatArray topic. +/// public class FloatArrayTopic : Topic { - /** The default type string for this topic type. */ + /// + /// The default type string for this topic type + /// public static string kTypeString => "float[]"; + /// + /// The default type string for this topic type in a UTF8 Span + /// public static ReadOnlySpan kTypeStringUtf8 => "float[]"u8; - /** - * Construct from a generic topic. - * - * @param topic Topic - */ - public FloatArrayTopic(Topic topic) : base(topic.Instance, topic.Handle) - { - } + /// + /// Constructs a typed topic from a generic topic. + /// + /// typed topic + public FloatArrayTopic(Topic topic) : base(topic.Instance, topic.Handle) { } - /** - * Constructor; use NetworkTableInstance.getFloatArrayTopic() instead. - * - * @param inst Instance - * @param handle Native handle - */ - public FloatArrayTopic(NetworkTableInstance inst, NtTopic handle) : base(inst, handle) - { - } + /// + /// Constructor; use NetworkTableInstance.GetFloatArrayTopic() instead. + /// + /// Instance + /// Native handle + public FloatArrayTopic(NetworkTableInstance inst, NtTopic handle) : base(inst, handle) { } - /** - * Create a new subscriber to the topic. - * - *

The subscriber is only active as long as the returned object - * is not closed. - * - *

Subscribers that do not match the published data type do not return - * any values. To determine if the data type matches, use the appropriate - * Topic functions. - * - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options subscribe options - * @return subscriber - */ + ///

+ /// Create a new subscriver to the topic. + /// + /// + /// The subscriber is only active as long as the returned object is not closed. + /// + /// Subscribers that do not match the published data type do not return any + /// values. To determine if the data type matches, use the appropriate Topic + /// functions. + /// + /// + /// default value used when a default is not provided to a getter function + /// + /// subscribe options + /// subscriber public IFloatArraySubscriber Subscribe( float[] defaultValue, PubSubOptions options) @@ -64,22 +65,22 @@ public IFloatArraySubscriber Subscribe( defaultValue); } - /** - * Create a new subscriber to the topic, with specified type string. - * - *

The subscriber is only active as long as the returned object - * is not closed. - * - *

Subscribers that do not match the published data type do not return - * any values. To determine if the data type matches, use the appropriate - * Topic functions. - * - * @param typeString type string - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options subscribe options - * @return subscriber - */ + ///

+ /// Create a new subscriber to the topic, with the specified type string. + /// + /// + /// The subscriber is only active as long as the returned object is not closed. + /// + /// Subscribers that do not match the published data type do not return any + /// values. To determine if the data type matches, use the appropriate Topic + /// functions. + /// + /// type string + /// + /// default value used when a default is not provided to a getter function + /// + /// subscribe options + /// subscriber public IFloatArraySubscriber SubscribeEx( string typeString, float[] defaultValue, @@ -93,22 +94,22 @@ public IFloatArraySubscriber SubscribeEx( defaultValue); } - /** - * Create a new subscriber to the topic, with specified type string. - * - *

The subscriber is only active as long as the returned object - * is not closed. - * - *

Subscribers that do not match the published data type do not return - * any values. To determine if the data type matches, use the appropriate - * Topic functions. - * - * @param typeString type string - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options subscribe options - * @return subscriber - */ + ///

+ /// Create a new subscriber to the topic, with the specified type string. + /// + /// + /// The subscriber is only active as long as the returned object is not closed. + /// + /// Subscribers that do not match the published data type do not return any + /// values. To determine if the data type matches, use the appropriate Topic + /// functions. + /// + /// type string + /// + /// default value used when a default is not provided to a getter function + /// + /// subscribe options + /// subscriber public IFloatArraySubscriber SubscribeEx( ReadOnlySpan typeString, float[] defaultValue, @@ -122,21 +123,20 @@ public IFloatArraySubscriber SubscribeEx( defaultValue); } - /** - * Create a new publisher to the topic. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param options publish options - * @return publisher - */ + ///

+ /// Create a new publisher to the topic. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// publish options + /// publisher public IFloatArrayPublisher Publish( PubSubOptions options) { @@ -148,22 +148,22 @@ public IFloatArrayPublisher Publish( []); } - /** - * Create a new publisher to the topic. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param options publish options - * @return publisher - */ + ///

+ /// Create a new publisher to the topic, with type string and initial properties. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// JSON properties + /// publish options + /// publisher public IFloatArrayPublisher PublishEx( string typeString, string properties, PubSubOptions options) @@ -176,24 +176,22 @@ public IFloatArrayPublisher PublishEx( []); } - /** - * Create a new publisher to the topic, with type string and initial properties. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param properties JSON properties - * @param options publish options - * @return publisher - * @throws IllegalArgumentException if properties is not a JSON object - */ + ///

+ /// Create a new publisher to the topic, with type string and initial properties. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// JSON properties + /// publish options + /// publisher public IFloatArrayPublisher PublishEx( ReadOnlySpan typeString, string properties, @@ -207,24 +205,22 @@ public IFloatArrayPublisher PublishEx( []); } - /** - * Create a new publisher to the topic, with type string and initial properties. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param properties JSON properties - * @param options publish options - * @return publisher - * @throws IllegalArgumentException if properties is not a JSON object - */ + ///

+ /// Create a new publisher to the topic, with type string and initial properties. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// JSON properties + /// publish options + /// publisher public IFloatArrayPublisher PublishEx( string typeString, ReadOnlySpan properties, @@ -238,24 +234,22 @@ public IFloatArrayPublisher PublishEx( []); } - /** - * Create a new publisher to the topic, with type string and initial properties. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param properties JSON properties - * @param options publish options - * @return publisher - * @throws IllegalArgumentException if properties is not a JSON object - */ + ///

+ /// Create a new publisher to the topic, with type string and initial properties. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// JSON properties + /// publish options + /// publisher public IFloatArrayPublisher PublishEx( ReadOnlySpan typeString, ReadOnlySpan properties, @@ -269,26 +263,26 @@ public IFloatArrayPublisher PublishEx( []); } - /** - * Create a new entry for the topic. - * - *

Entries act as a combination of a subscriber and a weak publisher. The - * subscriber is active as long as the entry is not closed. The publisher is - * created when the entry is first written to, and remains active until either - * unpublish() is called or the entry is closed. - * - *

It is not possible to use two different data types with the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored), and the entry will show no new - * values if the data type does not match. To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options publish and/or subscribe options - * @return entry - */ + ///

+ /// Create a new entry for the topic. + /// + /// + /// Entries act as a combination of a subscriber and a weak publisher. The + /// subscriber is active as long as the entry is not closed. The publisher is + /// created when the entry is first written to, and remains active until either + /// Unpublish() is called or the entry is closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// + /// default value used when a default is not provided to a getter function + /// + /// publish and/or subscribe options + /// entry public IFloatArrayEntry GetEntry( float[] defaultValue, PubSubOptions options) @@ -301,27 +295,27 @@ public IFloatArrayEntry GetEntry( defaultValue); } - /** - * Create a new entry for the topic, with specified type string. - * - *

Entries act as a combination of a subscriber and a weak publisher. The - * subscriber is active as long as the entry is not closed. The publisher is - * created when the entry is first written to, and remains active until either - * unpublish() is called or the entry is closed. - * - *

It is not possible to use two different data types with the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored), and the entry will show no new - * values if the data type does not match. To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options publish and/or subscribe options - * @return entry - */ + ///

+ /// Create a new entry for the topic, with the specified type string. + /// + /// + /// Entries act as a combination of a subscriber and a weak publisher. The + /// subscriber is active as long as the entry is not closed. The publisher is + /// created when the entry is first written to, and remains active until either + /// Unpublish() is called or the entry is closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// + /// default value used when a default is not provided to a getter function + /// + /// publish and/or subscribe options + /// entry public IFloatArrayEntry GetEntryEx( string typeString, float[] defaultValue, @@ -335,27 +329,27 @@ public IFloatArrayEntry GetEntryEx( defaultValue); } - /** - * Create a new entry for the topic, with specified type string. - * - *

Entries act as a combination of a subscriber and a weak publisher. The - * subscriber is active as long as the entry is not closed. The publisher is - * created when the entry is first written to, and remains active until either - * unpublish() is called or the entry is closed. - * - *

It is not possible to use two different data types with the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored), and the entry will show no new - * values if the data type does not match. To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options publish and/or subscribe options - * @return entry - */ + ///

+ /// Create a new entry for the topic, with the specified type string. + /// + /// + /// Entries act as a combination of a subscriber and a weak publisher. The + /// subscriber is active as long as the entry is not closed. The publisher is + /// created when the entry is first written to, and remains active until either + /// Unpublish() is called or the entry is closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// + /// default value used when a default is not provided to a getter function + /// + /// publish and/or subscribe options + /// entry public IFloatArrayEntry GetEntryEx( ReadOnlySpan typeString, float[] defaultValue, @@ -369,6 +363,4 @@ public IFloatArrayEntry GetEntryEx( defaultValue); } - - } diff --git a/src/ntcore/Generated/FloatEntry.cs b/src/ntcore/Generated/FloatEntry.cs index b64cb1a1..e1ce30c2 100644 --- a/src/ntcore/Generated/FloatEntry.cs +++ b/src/ntcore/Generated/FloatEntry.cs @@ -6,13 +6,13 @@ namespace NetworkTables; -/** - * NetworkTables Float entry. - * - *

Unlike NetworkTableEntry, the entry goes away when close() is called. - */ +///

+/// NetworkTables Float entry. +/// public interface IFloatEntry : IFloatSubscriber, IFloatPublisher { - /** Stops publishing the entry if it's published. */ + /// + /// Stops publishing the entry if its published. + /// void Unpublish(); } diff --git a/src/ntcore/Generated/FloatEntryImpl.cs b/src/ntcore/Generated/FloatEntryImpl.cs index b4003363..13f1771b 100644 --- a/src/ntcore/Generated/FloatEntryImpl.cs +++ b/src/ntcore/Generated/FloatEntryImpl.cs @@ -10,16 +10,8 @@ namespace NetworkTables; -/** NetworkTables Float implementation. */ internal sealed class FloatEntryImpl : EntryBase, IFloatEntry where T : struct, INtEntryHandle { - /** - * Constructor. - * - * @param topic Topic - * @param handle Native handle - * @param defaultValue Default value for Get() - */ internal FloatEntryImpl(FloatTopic topic, T handle, float defaultValue) : base(handle) { Topic = topic; @@ -28,7 +20,6 @@ internal FloatEntryImpl(FloatTopic topic, T handle, float defaultValue) : base(h public override FloatTopic Topic { get; } - public float Get() { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -39,7 +30,6 @@ public float Get() return m_defaultValue; } - public float Get(float defaultValue) { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -50,7 +40,6 @@ public float Get(float defaultValue) return defaultValue; } - public TimestampedObject GetAtomic() { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -58,7 +47,6 @@ public TimestampedObject GetAtomic() return new TimestampedObject(value.Time, value.ServerTime, baseValue); } - public TimestampedObject GetAtomic(float defaultValue) { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -66,7 +54,6 @@ public TimestampedObject GetAtomic(float defaultValue) return new TimestampedObject(value.Time, value.ServerTime, baseValue); } - public TimestampedObject[] ReadQueue() { NetworkTableValue[] values = NtCore.ReadQueueValue(Handle); @@ -78,7 +65,6 @@ public TimestampedObject[] ReadQueue() return timestamped; } - public float[] ReadQueueValues() { NetworkTableValue[] values = NtCore.ReadQueueValue(Handle); @@ -108,6 +94,7 @@ public void SetDefault(float value) RefNetworkTableValue ntValue = RefNetworkTableValue.MakeFloat(value); NtCore.SetDefaultEntryValue(Handle, ntValue); } + public void Unpublish() { NtCore.Unpublish(Handle); diff --git a/src/ntcore/Generated/FloatPublisher.cs b/src/ntcore/Generated/FloatPublisher.cs index ae71a62e..4009b78f 100644 --- a/src/ntcore/Generated/FloatPublisher.cs +++ b/src/ntcore/Generated/FloatPublisher.cs @@ -8,39 +8,34 @@ namespace NetworkTables; -/** NetworkTables Float publisher. */ +/// +/// NetworkTables Float publisher. +/// public interface IFloatPublisher : IPublisher { - /** - * Get the corresponding topic. - * - * @return Topic - */ - + /// + /// Gets the corresponding topic. + /// new FloatTopic Topic { get; } - /** - * Publish a new value using current NT time. - * - * @param value value to publish - */ + /// + /// Publish a new value using the current NT time. + /// + /// value to publish void Set(float value); - /** - * Publish a new value. - * - * @param value value to publish - * @param time timestamp; 0 indicates current NT time should be used - */ + /// + /// Publish a new value. + /// + /// value to publish + /// timestamp; 0 indicates current NT time should be used void Set(float value, long time); - /** - * Publish a default value. - * On reconnect, a default value will never be used in preference to a - * published value. - * - * @param value value - */ + /// + /// Publish a default value. On reconnect, a default value will never be used + /// in prference to a published value + /// + /// value void SetDefault(float value); } diff --git a/src/ntcore/Generated/FloatSubscriber.cs b/src/ntcore/Generated/FloatSubscriber.cs index d9a1eb2d..bc7d2ffe 100644 --- a/src/ntcore/Generated/FloatSubscriber.cs +++ b/src/ntcore/Generated/FloatSubscriber.cs @@ -6,73 +6,62 @@ namespace NetworkTables; -/** NetworkTables Float subscriber. */ +/// +/// NetworkTables Float subscriver. +/// public interface IFloatSubscriber : ISubscriber { - /** - * Get the corresponding topic. - * - * @return Topic - */ - + /// + /// Gets the corresponding topic. + /// new FloatTopic Topic { get; } - /** - * Get the last published value. - * If no value has been published, returns the stored default value. - * - * @return value - */ + /// + /// Get the last published value. + /// If no value has been published, returns the stored default value. + /// + /// value float Get(); - /** - * Get the last published value. - * If no value has been published, returns the passed defaultValue. - * - * @param defaultValue default value to return if no value has been published - * @return value - */ + /// + /// Get the last published value. + /// If no value has been published, returns the passed default value. + /// + /// default value to return if no value has been published + /// value float Get(float defaultValue); - /** - * Get the last published value along with its timestamp - * If no value has been published, returns the stored default value and a - * timestamp of 0. - * - * @return timestamped value - */ + /// + /// Get the last published value along with its timestamp. + /// If no value has been published, returns the stored default value and a timestamp of 0. + /// + /// timestamped value TimestampedObject GetAtomic(); - /** - * Get the last published value along with its timestamp - * If no value has been published, returns the passed defaultValue and a - * timestamp of 0. - * - * @param defaultValue default value to return if no value has been published - * @return timestamped value - */ + /// + /// Get the last published value along with its timestamp. + /// If no value has been published, returns the passed default value and a timestamp of 0. + /// + /// default value to return if no value has been published + /// timestamped value TimestampedObject GetAtomic(float defaultValue); - /** - * Get an array of all value changes since the last call to readQueue. - * Also provides a timestamp for each value. - * - *

The "poll storage" subscribe option can be used to set the queue - * depth. - * - * @return Array of timestamped values; empty array if no new changes have - * been published since the previous call. - */ + ///

+ /// Get an array of all value changes since the last call to ReadQueue. + /// Also provides a timestamp for each value. + /// + /// + /// The "poll storage" subscribe option can be used to set the queue depth. + /// Array of timestamped values; emptry if no new changes TimestampedObject[] ReadQueue(); - /** - * Get an array of all value changes since the last call to readQueue. - * - *

The "poll storage" subscribe option can be used to set the queue - * depth. - * - * @return Array of values; empty array if no new changes have been - * published since the previous call. - */ + ///

+ /// Get an array of all value changes since the last call to ReadQueue. + /// + /// + /// The "poll storage" subscribe option can be used to set the queue depth. + /// Array of values; emptry if no new changes float[] ReadQueueValues(); } diff --git a/src/ntcore/Generated/FloatTopic.cs b/src/ntcore/Generated/FloatTopic.cs index 579daee1..b513555e 100644 --- a/src/ntcore/Generated/FloatTopic.cs +++ b/src/ntcore/Generated/FloatTopic.cs @@ -10,48 +10,49 @@ namespace NetworkTables; -/** NetworkTables Float topic. */ +/// +/// NetworkTables Float topic. +/// public class FloatTopic : Topic { - /** The default type string for this topic type. */ + /// + /// The default type string for this topic type + /// public static string kTypeString => "float"; + /// + /// The default type string for this topic type in a UTF8 Span + /// public static ReadOnlySpan kTypeStringUtf8 => "float"u8; - /** - * Construct from a generic topic. - * - * @param topic Topic - */ - public FloatTopic(Topic topic) : base(topic.Instance, topic.Handle) - { - } + /// + /// Constructs a typed topic from a generic topic. + /// + /// typed topic + public FloatTopic(Topic topic) : base(topic.Instance, topic.Handle) { } - /** - * Constructor; use NetworkTableInstance.getFloatTopic() instead. - * - * @param inst Instance - * @param handle Native handle - */ - public FloatTopic(NetworkTableInstance inst, NtTopic handle) : base(inst, handle) - { - } + /// + /// Constructor; use NetworkTableInstance.GetFloatTopic() instead. + /// + /// Instance + /// Native handle + public FloatTopic(NetworkTableInstance inst, NtTopic handle) : base(inst, handle) { } - /** - * Create a new subscriber to the topic. - * - *

The subscriber is only active as long as the returned object - * is not closed. - * - *

Subscribers that do not match the published data type do not return - * any values. To determine if the data type matches, use the appropriate - * Topic functions. - * - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options subscribe options - * @return subscriber - */ + ///

+ /// Create a new subscriver to the topic. + /// + /// + /// The subscriber is only active as long as the returned object is not closed. + /// + /// Subscribers that do not match the published data type do not return any + /// values. To determine if the data type matches, use the appropriate Topic + /// functions. + /// + /// + /// default value used when a default is not provided to a getter function + /// + /// subscribe options + /// subscriber public IFloatSubscriber Subscribe( float defaultValue, PubSubOptions options) @@ -64,22 +65,22 @@ public IFloatSubscriber Subscribe( defaultValue); } - /** - * Create a new subscriber to the topic, with specified type string. - * - *

The subscriber is only active as long as the returned object - * is not closed. - * - *

Subscribers that do not match the published data type do not return - * any values. To determine if the data type matches, use the appropriate - * Topic functions. - * - * @param typeString type string - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options subscribe options - * @return subscriber - */ + ///

+ /// Create a new subscriber to the topic, with the specified type string. + /// + /// + /// The subscriber is only active as long as the returned object is not closed. + /// + /// Subscribers that do not match the published data type do not return any + /// values. To determine if the data type matches, use the appropriate Topic + /// functions. + /// + /// type string + /// + /// default value used when a default is not provided to a getter function + /// + /// subscribe options + /// subscriber public IFloatSubscriber SubscribeEx( string typeString, float defaultValue, @@ -93,22 +94,22 @@ public IFloatSubscriber SubscribeEx( defaultValue); } - /** - * Create a new subscriber to the topic, with specified type string. - * - *

The subscriber is only active as long as the returned object - * is not closed. - * - *

Subscribers that do not match the published data type do not return - * any values. To determine if the data type matches, use the appropriate - * Topic functions. - * - * @param typeString type string - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options subscribe options - * @return subscriber - */ + ///

+ /// Create a new subscriber to the topic, with the specified type string. + /// + /// + /// The subscriber is only active as long as the returned object is not closed. + /// + /// Subscribers that do not match the published data type do not return any + /// values. To determine if the data type matches, use the appropriate Topic + /// functions. + /// + /// type string + /// + /// default value used when a default is not provided to a getter function + /// + /// subscribe options + /// subscriber public IFloatSubscriber SubscribeEx( ReadOnlySpan typeString, float defaultValue, @@ -122,21 +123,20 @@ public IFloatSubscriber SubscribeEx( defaultValue); } - /** - * Create a new publisher to the topic. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param options publish options - * @return publisher - */ + ///

+ /// Create a new publisher to the topic. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// publish options + /// publisher public IFloatPublisher Publish( PubSubOptions options) { @@ -148,22 +148,22 @@ public IFloatPublisher Publish( 0); } - /** - * Create a new publisher to the topic. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param options publish options - * @return publisher - */ + ///

+ /// Create a new publisher to the topic, with type string and initial properties. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// JSON properties + /// publish options + /// publisher public IFloatPublisher PublishEx( string typeString, string properties, PubSubOptions options) @@ -176,24 +176,22 @@ public IFloatPublisher PublishEx( 0); } - /** - * Create a new publisher to the topic, with type string and initial properties. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param properties JSON properties - * @param options publish options - * @return publisher - * @throws IllegalArgumentException if properties is not a JSON object - */ + ///

+ /// Create a new publisher to the topic, with type string and initial properties. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// JSON properties + /// publish options + /// publisher public IFloatPublisher PublishEx( ReadOnlySpan typeString, string properties, @@ -207,24 +205,22 @@ public IFloatPublisher PublishEx( 0); } - /** - * Create a new publisher to the topic, with type string and initial properties. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param properties JSON properties - * @param options publish options - * @return publisher - * @throws IllegalArgumentException if properties is not a JSON object - */ + ///

+ /// Create a new publisher to the topic, with type string and initial properties. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// JSON properties + /// publish options + /// publisher public IFloatPublisher PublishEx( string typeString, ReadOnlySpan properties, @@ -238,24 +234,22 @@ public IFloatPublisher PublishEx( 0); } - /** - * Create a new publisher to the topic, with type string and initial properties. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param properties JSON properties - * @param options publish options - * @return publisher - * @throws IllegalArgumentException if properties is not a JSON object - */ + ///

+ /// Create a new publisher to the topic, with type string and initial properties. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// JSON properties + /// publish options + /// publisher public IFloatPublisher PublishEx( ReadOnlySpan typeString, ReadOnlySpan properties, @@ -269,26 +263,26 @@ public IFloatPublisher PublishEx( 0); } - /** - * Create a new entry for the topic. - * - *

Entries act as a combination of a subscriber and a weak publisher. The - * subscriber is active as long as the entry is not closed. The publisher is - * created when the entry is first written to, and remains active until either - * unpublish() is called or the entry is closed. - * - *

It is not possible to use two different data types with the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored), and the entry will show no new - * values if the data type does not match. To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options publish and/or subscribe options - * @return entry - */ + ///

+ /// Create a new entry for the topic. + /// + /// + /// Entries act as a combination of a subscriber and a weak publisher. The + /// subscriber is active as long as the entry is not closed. The publisher is + /// created when the entry is first written to, and remains active until either + /// Unpublish() is called or the entry is closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// + /// default value used when a default is not provided to a getter function + /// + /// publish and/or subscribe options + /// entry public IFloatEntry GetEntry( float defaultValue, PubSubOptions options) @@ -301,27 +295,27 @@ public IFloatEntry GetEntry( defaultValue); } - /** - * Create a new entry for the topic, with specified type string. - * - *

Entries act as a combination of a subscriber and a weak publisher. The - * subscriber is active as long as the entry is not closed. The publisher is - * created when the entry is first written to, and remains active until either - * unpublish() is called or the entry is closed. - * - *

It is not possible to use two different data types with the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored), and the entry will show no new - * values if the data type does not match. To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options publish and/or subscribe options - * @return entry - */ + ///

+ /// Create a new entry for the topic, with the specified type string. + /// + /// + /// Entries act as a combination of a subscriber and a weak publisher. The + /// subscriber is active as long as the entry is not closed. The publisher is + /// created when the entry is first written to, and remains active until either + /// Unpublish() is called or the entry is closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// + /// default value used when a default is not provided to a getter function + /// + /// publish and/or subscribe options + /// entry public IFloatEntry GetEntryEx( string typeString, float defaultValue, @@ -335,27 +329,27 @@ public IFloatEntry GetEntryEx( defaultValue); } - /** - * Create a new entry for the topic, with specified type string. - * - *

Entries act as a combination of a subscriber and a weak publisher. The - * subscriber is active as long as the entry is not closed. The publisher is - * created when the entry is first written to, and remains active until either - * unpublish() is called or the entry is closed. - * - *

It is not possible to use two different data types with the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored), and the entry will show no new - * values if the data type does not match. To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options publish and/or subscribe options - * @return entry - */ + ///

+ /// Create a new entry for the topic, with the specified type string. + /// + /// + /// Entries act as a combination of a subscriber and a weak publisher. The + /// subscriber is active as long as the entry is not closed. The publisher is + /// created when the entry is first written to, and remains active until either + /// Unpublish() is called or the entry is closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// + /// default value used when a default is not provided to a getter function + /// + /// publish and/or subscribe options + /// entry public IFloatEntry GetEntryEx( ReadOnlySpan typeString, float defaultValue, @@ -369,6 +363,4 @@ public IFloatEntry GetEntryEx( defaultValue); } - - } diff --git a/src/ntcore/Generated/GenericEntryImpl.cs b/src/ntcore/Generated/GenericEntryImpl.cs index 742608ae..7be8087b 100644 --- a/src/ntcore/Generated/GenericEntryImpl.cs +++ b/src/ntcore/Generated/GenericEntryImpl.cs @@ -9,18 +9,9 @@ namespace NetworkTables; -/** NetworkTables generic implementation. */ internal sealed partial class GenericEntryImpl { - /** - * Gets the entry's value as a bool. If the entry does not exist or is of different type, it - * will return the default value. - * - * @param defaultValue the value to be returned if no value is found - * @return the entry's value or the given default value - */ - public bool GetBoolean(bool defaultValue) { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -31,13 +22,6 @@ public bool GetBoolean(bool defaultValue) return defaultValue; } - /** - * Sets the entry's value. - * - * @param value the value to set - * @return False if the entry exists with a different type - */ - public bool SetBoolean(bool value) { return SetBoolean(value, 0); @@ -48,26 +32,11 @@ public bool SetBoolean(bool value, long time) return NtCore.SetEntryValue(Handle, RefNetworkTableValue.MakeBoolean(value, time)); } - /** - * Sets the entry's value if it does not exist. - * - * @param defaultValue the default value to set - * @return False if the entry exists with a different type - */ - public bool SetDefaultBoolean(bool value) { return NtCore.SetDefaultEntryValue(Handle, RefNetworkTableValue.MakeBoolean(value)); } - /** - * Gets the entry's value as a long. If the entry does not exist or is of different type, it - * will return the default value. - * - * @param defaultValue the value to be returned if no value is found - * @return the entry's value or the given default value - */ - public long GetInteger(long defaultValue) { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -78,13 +47,6 @@ public long GetInteger(long defaultValue) return defaultValue; } - /** - * Sets the entry's value. - * - * @param value the value to set - * @return False if the entry exists with a different type - */ - public bool SetInteger(long value) { return SetInteger(value, 0); @@ -95,26 +57,11 @@ public bool SetInteger(long value, long time) return NtCore.SetEntryValue(Handle, RefNetworkTableValue.MakeInteger(value, time)); } - /** - * Sets the entry's value if it does not exist. - * - * @param defaultValue the default value to set - * @return False if the entry exists with a different type - */ - public bool SetDefaultInteger(long value) { return NtCore.SetDefaultEntryValue(Handle, RefNetworkTableValue.MakeInteger(value)); } - /** - * Gets the entry's value as a float. If the entry does not exist or is of different type, it - * will return the default value. - * - * @param defaultValue the value to be returned if no value is found - * @return the entry's value or the given default value - */ - public float GetFloat(float defaultValue) { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -125,13 +72,6 @@ public float GetFloat(float defaultValue) return defaultValue; } - /** - * Sets the entry's value. - * - * @param value the value to set - * @return False if the entry exists with a different type - */ - public bool SetFloat(float value) { return SetFloat(value, 0); @@ -142,26 +82,11 @@ public bool SetFloat(float value, long time) return NtCore.SetEntryValue(Handle, RefNetworkTableValue.MakeFloat(value, time)); } - /** - * Sets the entry's value if it does not exist. - * - * @param defaultValue the default value to set - * @return False if the entry exists with a different type - */ - public bool SetDefaultFloat(float value) { return NtCore.SetDefaultEntryValue(Handle, RefNetworkTableValue.MakeFloat(value)); } - /** - * Gets the entry's value as a double. If the entry does not exist or is of different type, it - * will return the default value. - * - * @param defaultValue the value to be returned if no value is found - * @return the entry's value or the given default value - */ - public double GetDouble(double defaultValue) { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -172,13 +97,6 @@ public double GetDouble(double defaultValue) return defaultValue; } - /** - * Sets the entry's value. - * - * @param value the value to set - * @return False if the entry exists with a different type - */ - public bool SetDouble(double value) { return SetDouble(value, 0); @@ -189,26 +107,11 @@ public bool SetDouble(double value, long time) return NtCore.SetEntryValue(Handle, RefNetworkTableValue.MakeDouble(value, time)); } - /** - * Sets the entry's value if it does not exist. - * - * @param defaultValue the default value to set - * @return False if the entry exists with a different type - */ - public bool SetDefaultDouble(double value) { return NtCore.SetDefaultEntryValue(Handle, RefNetworkTableValue.MakeDouble(value)); } - /** - * Gets the entry's value as a string. If the entry does not exist or is of different type, it - * will return the default value. - * - * @param defaultValue the value to be returned if no value is found - * @return the entry's value or the given default value - */ - public string GetString(string defaultValue) { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -219,13 +122,6 @@ public string GetString(string defaultValue) return defaultValue; } - /** - * Sets the entry's value. - * - * @param value the value to set - * @return False if the entry exists with a different type - */ - public bool SetString(string value) { return SetString(value, 0); @@ -236,26 +132,11 @@ public bool SetString(string value, long time) return NtCore.SetEntryValue(Handle, RefNetworkTableValue.MakeString(value, time)); } - /** - * Sets the entry's value if it does not exist. - * - * @param defaultValue the default value to set - * @return False if the entry exists with a different type - */ - public bool SetDefaultString(string value) { return NtCore.SetDefaultEntryValue(Handle, RefNetworkTableValue.MakeString(value)); } - /** - * Gets the entry's value as a byte[]. If the entry does not exist or is of different type, it - * will return the default value. - * - * @param defaultValue the value to be returned if no value is found - * @return the entry's value or the given default value - */ - public byte[] GetRaw(byte[] defaultValue) { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -266,13 +147,6 @@ public byte[] GetRaw(byte[] defaultValue) return defaultValue; } - /** - * Sets the entry's value. - * - * @param value the value to set - * @return False if the entry exists with a different type - */ - public bool SetRaw(byte[] value) { return SetRaw(value, 0); @@ -283,26 +157,11 @@ public bool SetRaw(byte[] value, long time) return NtCore.SetEntryValue(Handle, RefNetworkTableValue.MakeRaw(value, time)); } - /** - * Sets the entry's value if it does not exist. - * - * @param defaultValue the default value to set - * @return False if the entry exists with a different type - */ - public bool SetDefaultRaw(byte[] value) { return NtCore.SetDefaultEntryValue(Handle, RefNetworkTableValue.MakeRaw(value)); } - /** - * Gets the entry's value as a bool[]. If the entry does not exist or is of different type, it - * will return the default value. - * - * @param defaultValue the value to be returned if no value is found - * @return the entry's value or the given default value - */ - public bool[] GetBooleanArray(bool[] defaultValue) { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -313,13 +172,6 @@ public bool[] GetBooleanArray(bool[] defaultValue) return defaultValue; } - /** - * Sets the entry's value. - * - * @param value the value to set - * @return False if the entry exists with a different type - */ - public bool SetBooleanArray(bool[] value) { return SetBooleanArray(value, 0); @@ -330,26 +182,11 @@ public bool SetBooleanArray(bool[] value, long time) return NtCore.SetEntryValue(Handle, RefNetworkTableValue.MakeBooleanArray(value, time)); } - /** - * Sets the entry's value if it does not exist. - * - * @param defaultValue the default value to set - * @return False if the entry exists with a different type - */ - public bool SetDefaultBooleanArray(bool[] value) { return NtCore.SetDefaultEntryValue(Handle, RefNetworkTableValue.MakeBooleanArray(value)); } - /** - * Gets the entry's value as a long[]. If the entry does not exist or is of different type, it - * will return the default value. - * - * @param defaultValue the value to be returned if no value is found - * @return the entry's value or the given default value - */ - public long[] GetIntegerArray(long[] defaultValue) { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -360,13 +197,6 @@ public long[] GetIntegerArray(long[] defaultValue) return defaultValue; } - /** - * Sets the entry's value. - * - * @param value the value to set - * @return False if the entry exists with a different type - */ - public bool SetIntegerArray(long[] value) { return SetIntegerArray(value, 0); @@ -377,26 +207,11 @@ public bool SetIntegerArray(long[] value, long time) return NtCore.SetEntryValue(Handle, RefNetworkTableValue.MakeIntegerArray(value, time)); } - /** - * Sets the entry's value if it does not exist. - * - * @param defaultValue the default value to set - * @return False if the entry exists with a different type - */ - public bool SetDefaultIntegerArray(long[] value) { return NtCore.SetDefaultEntryValue(Handle, RefNetworkTableValue.MakeIntegerArray(value)); } - /** - * Gets the entry's value as a float[]. If the entry does not exist or is of different type, it - * will return the default value. - * - * @param defaultValue the value to be returned if no value is found - * @return the entry's value or the given default value - */ - public float[] GetFloatArray(float[] defaultValue) { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -407,13 +222,6 @@ public float[] GetFloatArray(float[] defaultValue) return defaultValue; } - /** - * Sets the entry's value. - * - * @param value the value to set - * @return False if the entry exists with a different type - */ - public bool SetFloatArray(float[] value) { return SetFloatArray(value, 0); @@ -424,26 +232,11 @@ public bool SetFloatArray(float[] value, long time) return NtCore.SetEntryValue(Handle, RefNetworkTableValue.MakeFloatArray(value, time)); } - /** - * Sets the entry's value if it does not exist. - * - * @param defaultValue the default value to set - * @return False if the entry exists with a different type - */ - public bool SetDefaultFloatArray(float[] value) { return NtCore.SetDefaultEntryValue(Handle, RefNetworkTableValue.MakeFloatArray(value)); } - /** - * Gets the entry's value as a double[]. If the entry does not exist or is of different type, it - * will return the default value. - * - * @param defaultValue the value to be returned if no value is found - * @return the entry's value or the given default value - */ - public double[] GetDoubleArray(double[] defaultValue) { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -454,13 +247,6 @@ public double[] GetDoubleArray(double[] defaultValue) return defaultValue; } - /** - * Sets the entry's value. - * - * @param value the value to set - * @return False if the entry exists with a different type - */ - public bool SetDoubleArray(double[] value) { return SetDoubleArray(value, 0); @@ -471,26 +257,11 @@ public bool SetDoubleArray(double[] value, long time) return NtCore.SetEntryValue(Handle, RefNetworkTableValue.MakeDoubleArray(value, time)); } - /** - * Sets the entry's value if it does not exist. - * - * @param defaultValue the default value to set - * @return False if the entry exists with a different type - */ - public bool SetDefaultDoubleArray(double[] value) { return NtCore.SetDefaultEntryValue(Handle, RefNetworkTableValue.MakeDoubleArray(value)); } - /** - * Gets the entry's value as a string[]. If the entry does not exist or is of different type, it - * will return the default value. - * - * @param defaultValue the value to be returned if no value is found - * @return the entry's value or the given default value - */ - public string[] GetStringArray(string[] defaultValue) { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -501,13 +272,6 @@ public string[] GetStringArray(string[] defaultValue) return defaultValue; } - /** - * Sets the entry's value. - * - * @param value the value to set - * @return False if the entry exists with a different type - */ - public bool SetStringArray(string[] value) { return SetStringArray(value, 0); @@ -518,20 +282,12 @@ public bool SetStringArray(string[] value, long time) return NtCore.SetEntryValue(Handle, RefNetworkTableValue.MakeStringArray(value, time)); } - /** - * Sets the entry's value if it does not exist. - * - * @param defaultValue the default value to set - * @return False if the entry exists with a different type - */ - public bool SetDefaultStringArray(string[] value) { return NtCore.SetDefaultEntryValue(Handle, RefNetworkTableValue.MakeStringArray(value)); } - public void Unpublish() { NtCore.Unpublish(Handle); diff --git a/src/ntcore/Generated/GenericPublisher.cs b/src/ntcore/Generated/GenericPublisher.cs index ad5813e5..e118c760 100644 --- a/src/ntcore/Generated/GenericPublisher.cs +++ b/src/ntcore/Generated/GenericPublisher.cs @@ -6,217 +6,249 @@ namespace NetworkTables; -/** NetworkTables generic publisher. */ public partial interface IGenericPublisher { - /** - * Publish a new value. - * - * @param value value to publish - * @param time timestamp; 0 indicates current NT time should be used - * @return False if the topic already exists with a different type - */ + /// + /// Publish a new value. + /// + /// value to publish + /// timestamp; 0 indicates current NT time should be used + /// False if the topic already exists with a different type bool SetBoolean(bool value, long time); + /// + /// Publish a new value. + /// + /// value to publish + /// False if the topic already exists with a different type bool SetBoolean(bool value); - /** - * Sets the entry's value if it does not exist. - * - * @param defaultValue the default value to set - * @return False if the entry exists with a different type - */ + /// + /// Sets the entry's value if it does not exist. + /// + /// the default value to set + /// False if the entry already exists with a different type bool SetDefaultBoolean(bool defaultValue); - /** - * Publish a new value. - * - * @param value value to publish - * @param time timestamp; 0 indicates current NT time should be used - * @return False if the topic already exists with a different type - */ + /// + /// Publish a new value. + /// + /// value to publish + /// timestamp; 0 indicates current NT time should be used + /// False if the topic already exists with a different type bool SetInteger(long value, long time); + /// + /// Publish a new value. + /// + /// value to publish + /// False if the topic already exists with a different type bool SetInteger(long value); - /** - * Sets the entry's value if it does not exist. - * - * @param defaultValue the default value to set - * @return False if the entry exists with a different type - */ + /// + /// Sets the entry's value if it does not exist. + /// + /// the default value to set + /// False if the entry already exists with a different type bool SetDefaultInteger(long defaultValue); - /** - * Publish a new value. - * - * @param value value to publish - * @param time timestamp; 0 indicates current NT time should be used - * @return False if the topic already exists with a different type - */ + /// + /// Publish a new value. + /// + /// value to publish + /// timestamp; 0 indicates current NT time should be used + /// False if the topic already exists with a different type bool SetFloat(float value, long time); + /// + /// Publish a new value. + /// + /// value to publish + /// False if the topic already exists with a different type bool SetFloat(float value); - /** - * Sets the entry's value if it does not exist. - * - * @param defaultValue the default value to set - * @return False if the entry exists with a different type - */ + /// + /// Sets the entry's value if it does not exist. + /// + /// the default value to set + /// False if the entry already exists with a different type bool SetDefaultFloat(float defaultValue); - /** - * Publish a new value. - * - * @param value value to publish - * @param time timestamp; 0 indicates current NT time should be used - * @return False if the topic already exists with a different type - */ + /// + /// Publish a new value. + /// + /// value to publish + /// timestamp; 0 indicates current NT time should be used + /// False if the topic already exists with a different type bool SetDouble(double value, long time); + /// + /// Publish a new value. + /// + /// value to publish + /// False if the topic already exists with a different type bool SetDouble(double value); - /** - * Sets the entry's value if it does not exist. - * - * @param defaultValue the default value to set - * @return False if the entry exists with a different type - */ + /// + /// Sets the entry's value if it does not exist. + /// + /// the default value to set + /// False if the entry already exists with a different type bool SetDefaultDouble(double defaultValue); - /** - * Publish a new value. - * - * @param value value to publish - * @param time timestamp; 0 indicates current NT time should be used - * @return False if the topic already exists with a different type - */ + /// + /// Publish a new value. + /// + /// value to publish + /// timestamp; 0 indicates current NT time should be used + /// False if the topic already exists with a different type bool SetString(string value, long time); + /// + /// Publish a new value. + /// + /// value to publish + /// False if the topic already exists with a different type bool SetString(string value); - /** - * Sets the entry's value if it does not exist. - * - * @param defaultValue the default value to set - * @return False if the entry exists with a different type - */ + /// + /// Sets the entry's value if it does not exist. + /// + /// the default value to set + /// False if the entry already exists with a different type bool SetDefaultString(string defaultValue); - /** - * Publish a new value. - * - * @param value value to publish - * @param time timestamp; 0 indicates current NT time should be used - * @return False if the topic already exists with a different type - */ + /// + /// Publish a new value. + /// + /// value to publish + /// timestamp; 0 indicates current NT time should be used + /// False if the topic already exists with a different type bool SetRaw(byte[] value, long time); + /// + /// Publish a new value. + /// + /// value to publish + /// False if the topic already exists with a different type bool SetRaw(byte[] value); - /** - * Sets the entry's value if it does not exist. - * - * @param defaultValue the default value to set - * @return False if the entry exists with a different type - */ + /// + /// Sets the entry's value if it does not exist. + /// + /// the default value to set + /// False if the entry already exists with a different type bool SetDefaultRaw(byte[] defaultValue); - /** - * Publish a new value. - * - * @param value value to publish - * @param time timestamp; 0 indicates current NT time should be used - * @return False if the topic already exists with a different type - */ + /// + /// Publish a new value. + /// + /// value to publish + /// timestamp; 0 indicates current NT time should be used + /// False if the topic already exists with a different type bool SetBooleanArray(bool[] value, long time); + /// + /// Publish a new value. + /// + /// value to publish + /// False if the topic already exists with a different type bool SetBooleanArray(bool[] value); - /** - * Sets the entry's value if it does not exist. - * - * @param defaultValue the default value to set - * @return False if the entry exists with a different type - */ + /// + /// Sets the entry's value if it does not exist. + /// + /// the default value to set + /// False if the entry already exists with a different type bool SetDefaultBooleanArray(bool[] defaultValue); - /** - * Publish a new value. - * - * @param value value to publish - * @param time timestamp; 0 indicates current NT time should be used - * @return False if the topic already exists with a different type - */ + /// + /// Publish a new value. + /// + /// value to publish + /// timestamp; 0 indicates current NT time should be used + /// False if the topic already exists with a different type bool SetIntegerArray(long[] value, long time); + /// + /// Publish a new value. + /// + /// value to publish + /// False if the topic already exists with a different type bool SetIntegerArray(long[] value); - /** - * Sets the entry's value if it does not exist. - * - * @param defaultValue the default value to set - * @return False if the entry exists with a different type - */ + /// + /// Sets the entry's value if it does not exist. + /// + /// the default value to set + /// False if the entry already exists with a different type bool SetDefaultIntegerArray(long[] defaultValue); - /** - * Publish a new value. - * - * @param value value to publish - * @param time timestamp; 0 indicates current NT time should be used - * @return False if the topic already exists with a different type - */ + /// + /// Publish a new value. + /// + /// value to publish + /// timestamp; 0 indicates current NT time should be used + /// False if the topic already exists with a different type bool SetFloatArray(float[] value, long time); + /// + /// Publish a new value. + /// + /// value to publish + /// False if the topic already exists with a different type bool SetFloatArray(float[] value); - /** - * Sets the entry's value if it does not exist. - * - * @param defaultValue the default value to set - * @return False if the entry exists with a different type - */ + /// + /// Sets the entry's value if it does not exist. + /// + /// the default value to set + /// False if the entry already exists with a different type bool SetDefaultFloatArray(float[] defaultValue); - /** - * Publish a new value. - * - * @param value value to publish - * @param time timestamp; 0 indicates current NT time should be used - * @return False if the topic already exists with a different type - */ + /// + /// Publish a new value. + /// + /// value to publish + /// timestamp; 0 indicates current NT time should be used + /// False if the topic already exists with a different type bool SetDoubleArray(double[] value, long time); + /// + /// Publish a new value. + /// + /// value to publish + /// False if the topic already exists with a different type bool SetDoubleArray(double[] value); - /** - * Sets the entry's value if it does not exist. - * - * @param defaultValue the default value to set - * @return False if the entry exists with a different type - */ + /// + /// Sets the entry's value if it does not exist. + /// + /// the default value to set + /// False if the entry already exists with a different type bool SetDefaultDoubleArray(double[] defaultValue); - /** - * Publish a new value. - * - * @param value value to publish - * @param time timestamp; 0 indicates current NT time should be used - * @return False if the topic already exists with a different type - */ + /// + /// Publish a new value. + /// + /// value to publish + /// timestamp; 0 indicates current NT time should be used + /// False if the topic already exists with a different type bool SetStringArray(string[] value, long time); + /// + /// Publish a new value. + /// + /// value to publish + /// False if the topic already exists with a different type bool SetStringArray(string[] value); - /** - * Sets the entry's value if it does not exist. - * - * @param defaultValue the default value to set - * @return False if the entry exists with a different type - */ + /// + /// Sets the entry's value if it does not exist. + /// + /// the default value to set + /// False if the entry already exists with a different type bool SetDefaultStringArray(string[] defaultValue); } diff --git a/src/ntcore/Generated/GenericSubscriber.cs b/src/ntcore/Generated/GenericSubscriber.cs index fab559ca..722647eb 100644 --- a/src/ntcore/Generated/GenericSubscriber.cs +++ b/src/ntcore/Generated/GenericSubscriber.cs @@ -6,107 +6,95 @@ namespace NetworkTables; -/** NetworkTables generic subscriber. */ public partial interface IGenericSubscriber { - /** - * Gets the entry's value as a bool. If the entry does not exist or is of different type, it - * will return the default value. - * - * @param defaultValue the value to be returned if no value is found - * @return the entry's value or the given default value - */ + /// + /// Gets the entry's value as a bool. If the entry does not exist + /// or is of a different type, it will return the default value. + /// + /// the value to be returned if no value is found + /// the entry's value or the given default value bool GetBoolean(bool defaultValue); - /** - * Gets the entry's value as a long. If the entry does not exist or is of different type, it - * will return the default value. - * - * @param defaultValue the value to be returned if no value is found - * @return the entry's value or the given default value - */ + /// + /// Gets the entry's value as a long. If the entry does not exist + /// or is of a different type, it will return the default value. + /// + /// the value to be returned if no value is found + /// the entry's value or the given default value long GetInteger(long defaultValue); - /** - * Gets the entry's value as a float. If the entry does not exist or is of different type, it - * will return the default value. - * - * @param defaultValue the value to be returned if no value is found - * @return the entry's value or the given default value - */ + /// + /// Gets the entry's value as a float. If the entry does not exist + /// or is of a different type, it will return the default value. + /// + /// the value to be returned if no value is found + /// the entry's value or the given default value float GetFloat(float defaultValue); - /** - * Gets the entry's value as a double. If the entry does not exist or is of different type, it - * will return the default value. - * - * @param defaultValue the value to be returned if no value is found - * @return the entry's value or the given default value - */ + /// + /// Gets the entry's value as a double. If the entry does not exist + /// or is of a different type, it will return the default value. + /// + /// the value to be returned if no value is found + /// the entry's value or the given default value double GetDouble(double defaultValue); - /** - * Gets the entry's value as a string. If the entry does not exist or is of different type, it - * will return the default value. - * - * @param defaultValue the value to be returned if no value is found - * @return the entry's value or the given default value - */ + /// + /// Gets the entry's value as a string. If the entry does not exist + /// or is of a different type, it will return the default value. + /// + /// the value to be returned if no value is found + /// the entry's value or the given default value string GetString(string defaultValue); - /** - * Gets the entry's value as a byte[]. If the entry does not exist or is of different type, it - * will return the default value. - * - * @param defaultValue the value to be returned if no value is found - * @return the entry's value or the given default value - */ + /// + /// Gets the entry's value as a byte[]. If the entry does not exist + /// or is of a different type, it will return the default value. + /// + /// the value to be returned if no value is found + /// the entry's value or the given default value byte[] GetRaw(byte[] defaultValue); - /** - * Gets the entry's value as a bool[]. If the entry does not exist or is of different type, it - * will return the default value. - * - * @param defaultValue the value to be returned if no value is found - * @return the entry's value or the given default value - */ + /// + /// Gets the entry's value as a bool[]. If the entry does not exist + /// or is of a different type, it will return the default value. + /// + /// the value to be returned if no value is found + /// the entry's value or the given default value bool[] GetBooleanArray(bool[] defaultValue); - /** - * Gets the entry's value as a long[]. If the entry does not exist or is of different type, it - * will return the default value. - * - * @param defaultValue the value to be returned if no value is found - * @return the entry's value or the given default value - */ + /// + /// Gets the entry's value as a long[]. If the entry does not exist + /// or is of a different type, it will return the default value. + /// + /// the value to be returned if no value is found + /// the entry's value or the given default value long[] GetIntegerArray(long[] defaultValue); - /** - * Gets the entry's value as a float[]. If the entry does not exist or is of different type, it - * will return the default value. - * - * @param defaultValue the value to be returned if no value is found - * @return the entry's value or the given default value - */ + /// + /// Gets the entry's value as a float[]. If the entry does not exist + /// or is of a different type, it will return the default value. + /// + /// the value to be returned if no value is found + /// the entry's value or the given default value float[] GetFloatArray(float[] defaultValue); - /** - * Gets the entry's value as a double[]. If the entry does not exist or is of different type, it - * will return the default value. - * - * @param defaultValue the value to be returned if no value is found - * @return the entry's value or the given default value - */ + /// + /// Gets the entry's value as a double[]. If the entry does not exist + /// or is of a different type, it will return the default value. + /// + /// the value to be returned if no value is found + /// the entry's value or the given default value double[] GetDoubleArray(double[] defaultValue); - /** - * Gets the entry's value as a string[]. If the entry does not exist or is of different type, it - * will return the default value. - * - * @param defaultValue the value to be returned if no value is found - * @return the entry's value or the given default value - */ + /// + /// Gets the entry's value as a string[]. If the entry does not exist + /// or is of a different type, it will return the default value. + /// + /// the value to be returned if no value is found + /// the entry's value or the given default value string[] GetStringArray(string[] defaultValue); } diff --git a/src/ntcore/Generated/IntegerArrayEntry.cs b/src/ntcore/Generated/IntegerArrayEntry.cs index 0874cc72..3d9557e1 100644 --- a/src/ntcore/Generated/IntegerArrayEntry.cs +++ b/src/ntcore/Generated/IntegerArrayEntry.cs @@ -6,13 +6,13 @@ namespace NetworkTables; -/** - * NetworkTables IntegerArray entry. - * - *

Unlike NetworkTableEntry, the entry goes away when close() is called. - */ +///

+/// NetworkTables IntegerArray entry. +/// public interface IIntegerArrayEntry : IIntegerArraySubscriber, IIntegerArrayPublisher { - /** Stops publishing the entry if it's published. */ + /// + /// Stops publishing the entry if its published. + /// void Unpublish(); } diff --git a/src/ntcore/Generated/IntegerArrayEntryImpl.cs b/src/ntcore/Generated/IntegerArrayEntryImpl.cs index b193b8d4..a91f0020 100644 --- a/src/ntcore/Generated/IntegerArrayEntryImpl.cs +++ b/src/ntcore/Generated/IntegerArrayEntryImpl.cs @@ -10,16 +10,8 @@ namespace NetworkTables; -/** NetworkTables IntegerArray implementation. */ internal sealed class IntegerArrayEntryImpl : EntryBase, IIntegerArrayEntry where T : struct, INtEntryHandle { - /** - * Constructor. - * - * @param topic Topic - * @param handle Native handle - * @param defaultValue Default value for Get() - */ internal IntegerArrayEntryImpl(IntegerArrayTopic topic, T handle, long[] defaultValue) : base(handle) { Topic = topic; @@ -28,7 +20,6 @@ internal IntegerArrayEntryImpl(IntegerArrayTopic topic, T handle, long[] default public override IntegerArrayTopic Topic { get; } - public long[] Get() { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -39,7 +30,6 @@ public long[] Get() return m_defaultValue; } - public long[] Get(long[] defaultValue) { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -50,7 +40,6 @@ public long[] Get(long[] defaultValue) return defaultValue; } - public TimestampedObject GetAtomic() { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -58,7 +47,6 @@ public TimestampedObject GetAtomic() return new TimestampedObject(value.Time, value.ServerTime, baseValue); } - public TimestampedObject GetAtomic(long[] defaultValue) { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -66,7 +54,6 @@ public TimestampedObject GetAtomic(long[] defaultValue) return new TimestampedObject(value.Time, value.ServerTime, baseValue); } - public TimestampedObject[] ReadQueue() { NetworkTableValue[] values = NtCore.ReadQueueValue(Handle); @@ -78,7 +65,6 @@ public TimestampedObject[] ReadQueue() return timestamped; } - public long[][] ReadQueueValues() { NetworkTableValue[] values = NtCore.ReadQueueValue(Handle); @@ -108,6 +94,7 @@ public void SetDefault(ReadOnlySpan value) RefNetworkTableValue ntValue = RefNetworkTableValue.MakeIntegerArray(value); NtCore.SetDefaultEntryValue(Handle, ntValue); } + public void Unpublish() { NtCore.Unpublish(Handle); diff --git a/src/ntcore/Generated/IntegerArrayPublisher.cs b/src/ntcore/Generated/IntegerArrayPublisher.cs index f30c5501..3b8eadf6 100644 --- a/src/ntcore/Generated/IntegerArrayPublisher.cs +++ b/src/ntcore/Generated/IntegerArrayPublisher.cs @@ -8,39 +8,34 @@ namespace NetworkTables; -/** NetworkTables IntegerArray publisher. */ +/// +/// NetworkTables IntegerArray publisher. +/// public interface IIntegerArrayPublisher : IPublisher { - /** - * Get the corresponding topic. - * - * @return Topic - */ - + /// + /// Gets the corresponding topic. + /// new IntegerArrayTopic Topic { get; } - /** - * Publish a new value using current NT time. - * - * @param value value to publish - */ + /// + /// Publish a new value using the current NT time. + /// + /// value to publish void Set(ReadOnlySpan value); - /** - * Publish a new value. - * - * @param value value to publish - * @param time timestamp; 0 indicates current NT time should be used - */ + /// + /// Publish a new value. + /// + /// value to publish + /// timestamp; 0 indicates current NT time should be used void Set(ReadOnlySpan value, long time); - /** - * Publish a default value. - * On reconnect, a default value will never be used in preference to a - * published value. - * - * @param value value - */ + /// + /// Publish a default value. On reconnect, a default value will never be used + /// in prference to a published value + /// + /// value void SetDefault(ReadOnlySpan value); } diff --git a/src/ntcore/Generated/IntegerArraySubscriber.cs b/src/ntcore/Generated/IntegerArraySubscriber.cs index 8454f219..805dd29b 100644 --- a/src/ntcore/Generated/IntegerArraySubscriber.cs +++ b/src/ntcore/Generated/IntegerArraySubscriber.cs @@ -6,73 +6,62 @@ namespace NetworkTables; -/** NetworkTables IntegerArray subscriber. */ +/// +/// NetworkTables IntegerArray subscriver. +/// public interface IIntegerArraySubscriber : ISubscriber { - /** - * Get the corresponding topic. - * - * @return Topic - */ - + /// + /// Gets the corresponding topic. + /// new IntegerArrayTopic Topic { get; } - /** - * Get the last published value. - * If no value has been published, returns the stored default value. - * - * @return value - */ + /// + /// Get the last published value. + /// If no value has been published, returns the stored default value. + /// + /// value long[] Get(); - /** - * Get the last published value. - * If no value has been published, returns the passed defaultValue. - * - * @param defaultValue default value to return if no value has been published - * @return value - */ + /// + /// Get the last published value. + /// If no value has been published, returns the passed default value. + /// + /// default value to return if no value has been published + /// value long[] Get(long[] defaultValue); - /** - * Get the last published value along with its timestamp - * If no value has been published, returns the stored default value and a - * timestamp of 0. - * - * @return timestamped value - */ + /// + /// Get the last published value along with its timestamp. + /// If no value has been published, returns the stored default value and a timestamp of 0. + /// + /// timestamped value TimestampedObject GetAtomic(); - /** - * Get the last published value along with its timestamp - * If no value has been published, returns the passed defaultValue and a - * timestamp of 0. - * - * @param defaultValue default value to return if no value has been published - * @return timestamped value - */ + /// + /// Get the last published value along with its timestamp. + /// If no value has been published, returns the passed default value and a timestamp of 0. + /// + /// default value to return if no value has been published + /// timestamped value TimestampedObject GetAtomic(long[] defaultValue); - /** - * Get an array of all value changes since the last call to readQueue. - * Also provides a timestamp for each value. - * - *

The "poll storage" subscribe option can be used to set the queue - * depth. - * - * @return Array of timestamped values; empty array if no new changes have - * been published since the previous call. - */ + ///

+ /// Get an array of all value changes since the last call to ReadQueue. + /// Also provides a timestamp for each value. + /// + /// + /// The "poll storage" subscribe option can be used to set the queue depth. + /// Array of timestamped values; emptry if no new changes TimestampedObject[] ReadQueue(); - /** - * Get an array of all value changes since the last call to readQueue. - * - *

The "poll storage" subscribe option can be used to set the queue - * depth. - * - * @return Array of values; empty array if no new changes have been - * published since the previous call. - */ + ///

+ /// Get an array of all value changes since the last call to ReadQueue. + /// + /// + /// The "poll storage" subscribe option can be used to set the queue depth. + /// Array of values; emptry if no new changes long[][] ReadQueueValues(); } diff --git a/src/ntcore/Generated/IntegerArrayTopic.cs b/src/ntcore/Generated/IntegerArrayTopic.cs index dd4d1fc9..c183e4dc 100644 --- a/src/ntcore/Generated/IntegerArrayTopic.cs +++ b/src/ntcore/Generated/IntegerArrayTopic.cs @@ -10,48 +10,49 @@ namespace NetworkTables; -/** NetworkTables IntegerArray topic. */ +/// +/// NetworkTables IntegerArray topic. +/// public class IntegerArrayTopic : Topic { - /** The default type string for this topic type. */ + /// + /// The default type string for this topic type + /// public static string kTypeString => "int[]"; + /// + /// The default type string for this topic type in a UTF8 Span + /// public static ReadOnlySpan kTypeStringUtf8 => "int[]"u8; - /** - * Construct from a generic topic. - * - * @param topic Topic - */ - public IntegerArrayTopic(Topic topic) : base(topic.Instance, topic.Handle) - { - } + /// + /// Constructs a typed topic from a generic topic. + /// + /// typed topic + public IntegerArrayTopic(Topic topic) : base(topic.Instance, topic.Handle) { } - /** - * Constructor; use NetworkTableInstance.getIntegerArrayTopic() instead. - * - * @param inst Instance - * @param handle Native handle - */ - public IntegerArrayTopic(NetworkTableInstance inst, NtTopic handle) : base(inst, handle) - { - } + /// + /// Constructor; use NetworkTableInstance.GetIntegerArrayTopic() instead. + /// + /// Instance + /// Native handle + public IntegerArrayTopic(NetworkTableInstance inst, NtTopic handle) : base(inst, handle) { } - /** - * Create a new subscriber to the topic. - * - *

The subscriber is only active as long as the returned object - * is not closed. - * - *

Subscribers that do not match the published data type do not return - * any values. To determine if the data type matches, use the appropriate - * Topic functions. - * - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options subscribe options - * @return subscriber - */ + ///

+ /// Create a new subscriver to the topic. + /// + /// + /// The subscriber is only active as long as the returned object is not closed. + /// + /// Subscribers that do not match the published data type do not return any + /// values. To determine if the data type matches, use the appropriate Topic + /// functions. + /// + /// + /// default value used when a default is not provided to a getter function + /// + /// subscribe options + /// subscriber public IIntegerArraySubscriber Subscribe( long[] defaultValue, PubSubOptions options) @@ -64,22 +65,22 @@ public IIntegerArraySubscriber Subscribe( defaultValue); } - /** - * Create a new subscriber to the topic, with specified type string. - * - *

The subscriber is only active as long as the returned object - * is not closed. - * - *

Subscribers that do not match the published data type do not return - * any values. To determine if the data type matches, use the appropriate - * Topic functions. - * - * @param typeString type string - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options subscribe options - * @return subscriber - */ + ///

+ /// Create a new subscriber to the topic, with the specified type string. + /// + /// + /// The subscriber is only active as long as the returned object is not closed. + /// + /// Subscribers that do not match the published data type do not return any + /// values. To determine if the data type matches, use the appropriate Topic + /// functions. + /// + /// type string + /// + /// default value used when a default is not provided to a getter function + /// + /// subscribe options + /// subscriber public IIntegerArraySubscriber SubscribeEx( string typeString, long[] defaultValue, @@ -93,22 +94,22 @@ public IIntegerArraySubscriber SubscribeEx( defaultValue); } - /** - * Create a new subscriber to the topic, with specified type string. - * - *

The subscriber is only active as long as the returned object - * is not closed. - * - *

Subscribers that do not match the published data type do not return - * any values. To determine if the data type matches, use the appropriate - * Topic functions. - * - * @param typeString type string - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options subscribe options - * @return subscriber - */ + ///

+ /// Create a new subscriber to the topic, with the specified type string. + /// + /// + /// The subscriber is only active as long as the returned object is not closed. + /// + /// Subscribers that do not match the published data type do not return any + /// values. To determine if the data type matches, use the appropriate Topic + /// functions. + /// + /// type string + /// + /// default value used when a default is not provided to a getter function + /// + /// subscribe options + /// subscriber public IIntegerArraySubscriber SubscribeEx( ReadOnlySpan typeString, long[] defaultValue, @@ -122,21 +123,20 @@ public IIntegerArraySubscriber SubscribeEx( defaultValue); } - /** - * Create a new publisher to the topic. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param options publish options - * @return publisher - */ + ///

+ /// Create a new publisher to the topic. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// publish options + /// publisher public IIntegerArrayPublisher Publish( PubSubOptions options) { @@ -148,22 +148,22 @@ public IIntegerArrayPublisher Publish( []); } - /** - * Create a new publisher to the topic. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param options publish options - * @return publisher - */ + ///

+ /// Create a new publisher to the topic, with type string and initial properties. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// JSON properties + /// publish options + /// publisher public IIntegerArrayPublisher PublishEx( string typeString, string properties, PubSubOptions options) @@ -176,24 +176,22 @@ public IIntegerArrayPublisher PublishEx( []); } - /** - * Create a new publisher to the topic, with type string and initial properties. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param properties JSON properties - * @param options publish options - * @return publisher - * @throws IllegalArgumentException if properties is not a JSON object - */ + ///

+ /// Create a new publisher to the topic, with type string and initial properties. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// JSON properties + /// publish options + /// publisher public IIntegerArrayPublisher PublishEx( ReadOnlySpan typeString, string properties, @@ -207,24 +205,22 @@ public IIntegerArrayPublisher PublishEx( []); } - /** - * Create a new publisher to the topic, with type string and initial properties. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param properties JSON properties - * @param options publish options - * @return publisher - * @throws IllegalArgumentException if properties is not a JSON object - */ + ///

+ /// Create a new publisher to the topic, with type string and initial properties. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// JSON properties + /// publish options + /// publisher public IIntegerArrayPublisher PublishEx( string typeString, ReadOnlySpan properties, @@ -238,24 +234,22 @@ public IIntegerArrayPublisher PublishEx( []); } - /** - * Create a new publisher to the topic, with type string and initial properties. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param properties JSON properties - * @param options publish options - * @return publisher - * @throws IllegalArgumentException if properties is not a JSON object - */ + ///

+ /// Create a new publisher to the topic, with type string and initial properties. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// JSON properties + /// publish options + /// publisher public IIntegerArrayPublisher PublishEx( ReadOnlySpan typeString, ReadOnlySpan properties, @@ -269,26 +263,26 @@ public IIntegerArrayPublisher PublishEx( []); } - /** - * Create a new entry for the topic. - * - *

Entries act as a combination of a subscriber and a weak publisher. The - * subscriber is active as long as the entry is not closed. The publisher is - * created when the entry is first written to, and remains active until either - * unpublish() is called or the entry is closed. - * - *

It is not possible to use two different data types with the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored), and the entry will show no new - * values if the data type does not match. To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options publish and/or subscribe options - * @return entry - */ + ///

+ /// Create a new entry for the topic. + /// + /// + /// Entries act as a combination of a subscriber and a weak publisher. The + /// subscriber is active as long as the entry is not closed. The publisher is + /// created when the entry is first written to, and remains active until either + /// Unpublish() is called or the entry is closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// + /// default value used when a default is not provided to a getter function + /// + /// publish and/or subscribe options + /// entry public IIntegerArrayEntry GetEntry( long[] defaultValue, PubSubOptions options) @@ -301,27 +295,27 @@ public IIntegerArrayEntry GetEntry( defaultValue); } - /** - * Create a new entry for the topic, with specified type string. - * - *

Entries act as a combination of a subscriber and a weak publisher. The - * subscriber is active as long as the entry is not closed. The publisher is - * created when the entry is first written to, and remains active until either - * unpublish() is called or the entry is closed. - * - *

It is not possible to use two different data types with the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored), and the entry will show no new - * values if the data type does not match. To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options publish and/or subscribe options - * @return entry - */ + ///

+ /// Create a new entry for the topic, with the specified type string. + /// + /// + /// Entries act as a combination of a subscriber and a weak publisher. The + /// subscriber is active as long as the entry is not closed. The publisher is + /// created when the entry is first written to, and remains active until either + /// Unpublish() is called or the entry is closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// + /// default value used when a default is not provided to a getter function + /// + /// publish and/or subscribe options + /// entry public IIntegerArrayEntry GetEntryEx( string typeString, long[] defaultValue, @@ -335,27 +329,27 @@ public IIntegerArrayEntry GetEntryEx( defaultValue); } - /** - * Create a new entry for the topic, with specified type string. - * - *

Entries act as a combination of a subscriber and a weak publisher. The - * subscriber is active as long as the entry is not closed. The publisher is - * created when the entry is first written to, and remains active until either - * unpublish() is called or the entry is closed. - * - *

It is not possible to use two different data types with the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored), and the entry will show no new - * values if the data type does not match. To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options publish and/or subscribe options - * @return entry - */ + ///

+ /// Create a new entry for the topic, with the specified type string. + /// + /// + /// Entries act as a combination of a subscriber and a weak publisher. The + /// subscriber is active as long as the entry is not closed. The publisher is + /// created when the entry is first written to, and remains active until either + /// Unpublish() is called or the entry is closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// + /// default value used when a default is not provided to a getter function + /// + /// publish and/or subscribe options + /// entry public IIntegerArrayEntry GetEntryEx( ReadOnlySpan typeString, long[] defaultValue, @@ -369,6 +363,4 @@ public IIntegerArrayEntry GetEntryEx( defaultValue); } - - } diff --git a/src/ntcore/Generated/IntegerEntry.cs b/src/ntcore/Generated/IntegerEntry.cs index 20549084..b2cf1c56 100644 --- a/src/ntcore/Generated/IntegerEntry.cs +++ b/src/ntcore/Generated/IntegerEntry.cs @@ -6,13 +6,13 @@ namespace NetworkTables; -/** - * NetworkTables Integer entry. - * - *

Unlike NetworkTableEntry, the entry goes away when close() is called. - */ +///

+/// NetworkTables Integer entry. +/// public interface IIntegerEntry : IIntegerSubscriber, IIntegerPublisher { - /** Stops publishing the entry if it's published. */ + /// + /// Stops publishing the entry if its published. + /// void Unpublish(); } diff --git a/src/ntcore/Generated/IntegerEntryImpl.cs b/src/ntcore/Generated/IntegerEntryImpl.cs index 70a22524..f885ee63 100644 --- a/src/ntcore/Generated/IntegerEntryImpl.cs +++ b/src/ntcore/Generated/IntegerEntryImpl.cs @@ -10,16 +10,8 @@ namespace NetworkTables; -/** NetworkTables Integer implementation. */ internal sealed class IntegerEntryImpl : EntryBase, IIntegerEntry where T : struct, INtEntryHandle { - /** - * Constructor. - * - * @param topic Topic - * @param handle Native handle - * @param defaultValue Default value for Get() - */ internal IntegerEntryImpl(IntegerTopic topic, T handle, long defaultValue) : base(handle) { Topic = topic; @@ -28,7 +20,6 @@ internal IntegerEntryImpl(IntegerTopic topic, T handle, long defaultValue) : bas public override IntegerTopic Topic { get; } - public long Get() { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -39,7 +30,6 @@ public long Get() return m_defaultValue; } - public long Get(long defaultValue) { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -50,7 +40,6 @@ public long Get(long defaultValue) return defaultValue; } - public TimestampedObject GetAtomic() { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -58,7 +47,6 @@ public TimestampedObject GetAtomic() return new TimestampedObject(value.Time, value.ServerTime, baseValue); } - public TimestampedObject GetAtomic(long defaultValue) { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -66,7 +54,6 @@ public TimestampedObject GetAtomic(long defaultValue) return new TimestampedObject(value.Time, value.ServerTime, baseValue); } - public TimestampedObject[] ReadQueue() { NetworkTableValue[] values = NtCore.ReadQueueValue(Handle); @@ -78,7 +65,6 @@ public TimestampedObject[] ReadQueue() return timestamped; } - public long[] ReadQueueValues() { NetworkTableValue[] values = NtCore.ReadQueueValue(Handle); @@ -108,6 +94,7 @@ public void SetDefault(long value) RefNetworkTableValue ntValue = RefNetworkTableValue.MakeInteger(value); NtCore.SetDefaultEntryValue(Handle, ntValue); } + public void Unpublish() { NtCore.Unpublish(Handle); diff --git a/src/ntcore/Generated/IntegerPublisher.cs b/src/ntcore/Generated/IntegerPublisher.cs index c9124b5f..d4ff6c00 100644 --- a/src/ntcore/Generated/IntegerPublisher.cs +++ b/src/ntcore/Generated/IntegerPublisher.cs @@ -8,39 +8,34 @@ namespace NetworkTables; -/** NetworkTables Integer publisher. */ +/// +/// NetworkTables Integer publisher. +/// public interface IIntegerPublisher : IPublisher { - /** - * Get the corresponding topic. - * - * @return Topic - */ - + /// + /// Gets the corresponding topic. + /// new IntegerTopic Topic { get; } - /** - * Publish a new value using current NT time. - * - * @param value value to publish - */ + /// + /// Publish a new value using the current NT time. + /// + /// value to publish void Set(long value); - /** - * Publish a new value. - * - * @param value value to publish - * @param time timestamp; 0 indicates current NT time should be used - */ + /// + /// Publish a new value. + /// + /// value to publish + /// timestamp; 0 indicates current NT time should be used void Set(long value, long time); - /** - * Publish a default value. - * On reconnect, a default value will never be used in preference to a - * published value. - * - * @param value value - */ + /// + /// Publish a default value. On reconnect, a default value will never be used + /// in prference to a published value + /// + /// value void SetDefault(long value); } diff --git a/src/ntcore/Generated/IntegerSubscriber.cs b/src/ntcore/Generated/IntegerSubscriber.cs index 91d6f870..0b81a84e 100644 --- a/src/ntcore/Generated/IntegerSubscriber.cs +++ b/src/ntcore/Generated/IntegerSubscriber.cs @@ -6,73 +6,62 @@ namespace NetworkTables; -/** NetworkTables Integer subscriber. */ +/// +/// NetworkTables Integer subscriver. +/// public interface IIntegerSubscriber : ISubscriber { - /** - * Get the corresponding topic. - * - * @return Topic - */ - + /// + /// Gets the corresponding topic. + /// new IntegerTopic Topic { get; } - /** - * Get the last published value. - * If no value has been published, returns the stored default value. - * - * @return value - */ + /// + /// Get the last published value. + /// If no value has been published, returns the stored default value. + /// + /// value long Get(); - /** - * Get the last published value. - * If no value has been published, returns the passed defaultValue. - * - * @param defaultValue default value to return if no value has been published - * @return value - */ + /// + /// Get the last published value. + /// If no value has been published, returns the passed default value. + /// + /// default value to return if no value has been published + /// value long Get(long defaultValue); - /** - * Get the last published value along with its timestamp - * If no value has been published, returns the stored default value and a - * timestamp of 0. - * - * @return timestamped value - */ + /// + /// Get the last published value along with its timestamp. + /// If no value has been published, returns the stored default value and a timestamp of 0. + /// + /// timestamped value TimestampedObject GetAtomic(); - /** - * Get the last published value along with its timestamp - * If no value has been published, returns the passed defaultValue and a - * timestamp of 0. - * - * @param defaultValue default value to return if no value has been published - * @return timestamped value - */ + /// + /// Get the last published value along with its timestamp. + /// If no value has been published, returns the passed default value and a timestamp of 0. + /// + /// default value to return if no value has been published + /// timestamped value TimestampedObject GetAtomic(long defaultValue); - /** - * Get an array of all value changes since the last call to readQueue. - * Also provides a timestamp for each value. - * - *

The "poll storage" subscribe option can be used to set the queue - * depth. - * - * @return Array of timestamped values; empty array if no new changes have - * been published since the previous call. - */ + ///

+ /// Get an array of all value changes since the last call to ReadQueue. + /// Also provides a timestamp for each value. + /// + /// + /// The "poll storage" subscribe option can be used to set the queue depth. + /// Array of timestamped values; emptry if no new changes TimestampedObject[] ReadQueue(); - /** - * Get an array of all value changes since the last call to readQueue. - * - *

The "poll storage" subscribe option can be used to set the queue - * depth. - * - * @return Array of values; empty array if no new changes have been - * published since the previous call. - */ + ///

+ /// Get an array of all value changes since the last call to ReadQueue. + /// + /// + /// The "poll storage" subscribe option can be used to set the queue depth. + /// Array of values; emptry if no new changes long[] ReadQueueValues(); } diff --git a/src/ntcore/Generated/IntegerTopic.cs b/src/ntcore/Generated/IntegerTopic.cs index 78772070..976ed897 100644 --- a/src/ntcore/Generated/IntegerTopic.cs +++ b/src/ntcore/Generated/IntegerTopic.cs @@ -10,48 +10,49 @@ namespace NetworkTables; -/** NetworkTables Integer topic. */ +/// +/// NetworkTables Integer topic. +/// public class IntegerTopic : Topic { - /** The default type string for this topic type. */ + /// + /// The default type string for this topic type + /// public static string kTypeString => "int"; + /// + /// The default type string for this topic type in a UTF8 Span + /// public static ReadOnlySpan kTypeStringUtf8 => "int"u8; - /** - * Construct from a generic topic. - * - * @param topic Topic - */ - public IntegerTopic(Topic topic) : base(topic.Instance, topic.Handle) - { - } + /// + /// Constructs a typed topic from a generic topic. + /// + /// typed topic + public IntegerTopic(Topic topic) : base(topic.Instance, topic.Handle) { } - /** - * Constructor; use NetworkTableInstance.getIntegerTopic() instead. - * - * @param inst Instance - * @param handle Native handle - */ - public IntegerTopic(NetworkTableInstance inst, NtTopic handle) : base(inst, handle) - { - } + /// + /// Constructor; use NetworkTableInstance.GetIntegerTopic() instead. + /// + /// Instance + /// Native handle + public IntegerTopic(NetworkTableInstance inst, NtTopic handle) : base(inst, handle) { } - /** - * Create a new subscriber to the topic. - * - *

The subscriber is only active as long as the returned object - * is not closed. - * - *

Subscribers that do not match the published data type do not return - * any values. To determine if the data type matches, use the appropriate - * Topic functions. - * - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options subscribe options - * @return subscriber - */ + ///

+ /// Create a new subscriver to the topic. + /// + /// + /// The subscriber is only active as long as the returned object is not closed. + /// + /// Subscribers that do not match the published data type do not return any + /// values. To determine if the data type matches, use the appropriate Topic + /// functions. + /// + /// + /// default value used when a default is not provided to a getter function + /// + /// subscribe options + /// subscriber public IIntegerSubscriber Subscribe( long defaultValue, PubSubOptions options) @@ -64,22 +65,22 @@ public IIntegerSubscriber Subscribe( defaultValue); } - /** - * Create a new subscriber to the topic, with specified type string. - * - *

The subscriber is only active as long as the returned object - * is not closed. - * - *

Subscribers that do not match the published data type do not return - * any values. To determine if the data type matches, use the appropriate - * Topic functions. - * - * @param typeString type string - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options subscribe options - * @return subscriber - */ + ///

+ /// Create a new subscriber to the topic, with the specified type string. + /// + /// + /// The subscriber is only active as long as the returned object is not closed. + /// + /// Subscribers that do not match the published data type do not return any + /// values. To determine if the data type matches, use the appropriate Topic + /// functions. + /// + /// type string + /// + /// default value used when a default is not provided to a getter function + /// + /// subscribe options + /// subscriber public IIntegerSubscriber SubscribeEx( string typeString, long defaultValue, @@ -93,22 +94,22 @@ public IIntegerSubscriber SubscribeEx( defaultValue); } - /** - * Create a new subscriber to the topic, with specified type string. - * - *

The subscriber is only active as long as the returned object - * is not closed. - * - *

Subscribers that do not match the published data type do not return - * any values. To determine if the data type matches, use the appropriate - * Topic functions. - * - * @param typeString type string - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options subscribe options - * @return subscriber - */ + ///

+ /// Create a new subscriber to the topic, with the specified type string. + /// + /// + /// The subscriber is only active as long as the returned object is not closed. + /// + /// Subscribers that do not match the published data type do not return any + /// values. To determine if the data type matches, use the appropriate Topic + /// functions. + /// + /// type string + /// + /// default value used when a default is not provided to a getter function + /// + /// subscribe options + /// subscriber public IIntegerSubscriber SubscribeEx( ReadOnlySpan typeString, long defaultValue, @@ -122,21 +123,20 @@ public IIntegerSubscriber SubscribeEx( defaultValue); } - /** - * Create a new publisher to the topic. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param options publish options - * @return publisher - */ + ///

+ /// Create a new publisher to the topic. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// publish options + /// publisher public IIntegerPublisher Publish( PubSubOptions options) { @@ -148,22 +148,22 @@ public IIntegerPublisher Publish( 0); } - /** - * Create a new publisher to the topic. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param options publish options - * @return publisher - */ + ///

+ /// Create a new publisher to the topic, with type string and initial properties. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// JSON properties + /// publish options + /// publisher public IIntegerPublisher PublishEx( string typeString, string properties, PubSubOptions options) @@ -176,24 +176,22 @@ public IIntegerPublisher PublishEx( 0); } - /** - * Create a new publisher to the topic, with type string and initial properties. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param properties JSON properties - * @param options publish options - * @return publisher - * @throws IllegalArgumentException if properties is not a JSON object - */ + ///

+ /// Create a new publisher to the topic, with type string and initial properties. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// JSON properties + /// publish options + /// publisher public IIntegerPublisher PublishEx( ReadOnlySpan typeString, string properties, @@ -207,24 +205,22 @@ public IIntegerPublisher PublishEx( 0); } - /** - * Create a new publisher to the topic, with type string and initial properties. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param properties JSON properties - * @param options publish options - * @return publisher - * @throws IllegalArgumentException if properties is not a JSON object - */ + ///

+ /// Create a new publisher to the topic, with type string and initial properties. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// JSON properties + /// publish options + /// publisher public IIntegerPublisher PublishEx( string typeString, ReadOnlySpan properties, @@ -238,24 +234,22 @@ public IIntegerPublisher PublishEx( 0); } - /** - * Create a new publisher to the topic, with type string and initial properties. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param properties JSON properties - * @param options publish options - * @return publisher - * @throws IllegalArgumentException if properties is not a JSON object - */ + ///

+ /// Create a new publisher to the topic, with type string and initial properties. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// JSON properties + /// publish options + /// publisher public IIntegerPublisher PublishEx( ReadOnlySpan typeString, ReadOnlySpan properties, @@ -269,26 +263,26 @@ public IIntegerPublisher PublishEx( 0); } - /** - * Create a new entry for the topic. - * - *

Entries act as a combination of a subscriber and a weak publisher. The - * subscriber is active as long as the entry is not closed. The publisher is - * created when the entry is first written to, and remains active until either - * unpublish() is called or the entry is closed. - * - *

It is not possible to use two different data types with the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored), and the entry will show no new - * values if the data type does not match. To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options publish and/or subscribe options - * @return entry - */ + ///

+ /// Create a new entry for the topic. + /// + /// + /// Entries act as a combination of a subscriber and a weak publisher. The + /// subscriber is active as long as the entry is not closed. The publisher is + /// created when the entry is first written to, and remains active until either + /// Unpublish() is called or the entry is closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// + /// default value used when a default is not provided to a getter function + /// + /// publish and/or subscribe options + /// entry public IIntegerEntry GetEntry( long defaultValue, PubSubOptions options) @@ -301,27 +295,27 @@ public IIntegerEntry GetEntry( defaultValue); } - /** - * Create a new entry for the topic, with specified type string. - * - *

Entries act as a combination of a subscriber and a weak publisher. The - * subscriber is active as long as the entry is not closed. The publisher is - * created when the entry is first written to, and remains active until either - * unpublish() is called or the entry is closed. - * - *

It is not possible to use two different data types with the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored), and the entry will show no new - * values if the data type does not match. To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options publish and/or subscribe options - * @return entry - */ + ///

+ /// Create a new entry for the topic, with the specified type string. + /// + /// + /// Entries act as a combination of a subscriber and a weak publisher. The + /// subscriber is active as long as the entry is not closed. The publisher is + /// created when the entry is first written to, and remains active until either + /// Unpublish() is called or the entry is closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// + /// default value used when a default is not provided to a getter function + /// + /// publish and/or subscribe options + /// entry public IIntegerEntry GetEntryEx( string typeString, long defaultValue, @@ -335,27 +329,27 @@ public IIntegerEntry GetEntryEx( defaultValue); } - /** - * Create a new entry for the topic, with specified type string. - * - *

Entries act as a combination of a subscriber and a weak publisher. The - * subscriber is active as long as the entry is not closed. The publisher is - * created when the entry is first written to, and remains active until either - * unpublish() is called or the entry is closed. - * - *

It is not possible to use two different data types with the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored), and the entry will show no new - * values if the data type does not match. To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options publish and/or subscribe options - * @return entry - */ + ///

+ /// Create a new entry for the topic, with the specified type string. + /// + /// + /// Entries act as a combination of a subscriber and a weak publisher. The + /// subscriber is active as long as the entry is not closed. The publisher is + /// created when the entry is first written to, and remains active until either + /// Unpublish() is called or the entry is closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// + /// default value used when a default is not provided to a getter function + /// + /// publish and/or subscribe options + /// entry public IIntegerEntry GetEntryEx( ReadOnlySpan typeString, long defaultValue, @@ -369,6 +363,4 @@ public IIntegerEntry GetEntryEx( defaultValue); } - - } diff --git a/src/ntcore/Generated/NetworkTable.cs b/src/ntcore/Generated/NetworkTable.cs index bda9e4f1..d2028224 100644 --- a/src/ntcore/Generated/NetworkTable.cs +++ b/src/ntcore/Generated/NetworkTable.cs @@ -8,56 +8,111 @@ namespace NetworkTables; public sealed partial class NetworkTable { + /// + /// Gets a bool topic. + /// + /// topic name + /// BooleanTopic public BooleanTopic GetBooleanTopic(string name) { return Instance.GetBooleanTopic($"{m_pathWithSep}{name}"); } + /// + /// Gets a long topic. + /// + /// topic name + /// IntegerTopic public IntegerTopic GetIntegerTopic(string name) { return Instance.GetIntegerTopic($"{m_pathWithSep}{name}"); } + /// + /// Gets a float topic. + /// + /// topic name + /// FloatTopic public FloatTopic GetFloatTopic(string name) { return Instance.GetFloatTopic($"{m_pathWithSep}{name}"); } + /// + /// Gets a double topic. + /// + /// topic name + /// DoubleTopic public DoubleTopic GetDoubleTopic(string name) { return Instance.GetDoubleTopic($"{m_pathWithSep}{name}"); } + /// + /// Gets a string topic. + /// + /// topic name + /// StringTopic public StringTopic GetStringTopic(string name) { return Instance.GetStringTopic($"{m_pathWithSep}{name}"); } + /// + /// Gets a byte[] topic. + /// + /// topic name + /// RawTopic public RawTopic GetRawTopic(string name) { return Instance.GetRawTopic($"{m_pathWithSep}{name}"); } + /// + /// Gets a bool[] topic. + /// + /// topic name + /// BooleanArrayTopic public BooleanArrayTopic GetBooleanArrayTopic(string name) { return Instance.GetBooleanArrayTopic($"{m_pathWithSep}{name}"); } + /// + /// Gets a long[] topic. + /// + /// topic name + /// IntegerArrayTopic public IntegerArrayTopic GetIntegerArrayTopic(string name) { return Instance.GetIntegerArrayTopic($"{m_pathWithSep}{name}"); } + /// + /// Gets a float[] topic. + /// + /// topic name + /// FloatArrayTopic public FloatArrayTopic GetFloatArrayTopic(string name) { return Instance.GetFloatArrayTopic($"{m_pathWithSep}{name}"); } + /// + /// Gets a double[] topic. + /// + /// topic name + /// DoubleArrayTopic public DoubleArrayTopic GetDoubleArrayTopic(string name) { return Instance.GetDoubleArrayTopic($"{m_pathWithSep}{name}"); } + /// + /// Gets a string[] topic. + /// + /// topic name + /// StringArrayTopic public StringArrayTopic GetStringArrayTopic(string name) { return Instance.GetStringArrayTopic($"{m_pathWithSep}{name}"); diff --git a/src/ntcore/Generated/NetworkTableInstance.cs b/src/ntcore/Generated/NetworkTableInstance.cs index 1714d0d4..7c2f1de8 100644 --- a/src/ntcore/Generated/NetworkTableInstance.cs +++ b/src/ntcore/Generated/NetworkTableInstance.cs @@ -27,6 +27,11 @@ private static BooleanTopic BooleanTopicUpdator(string name, Topic existingTopic instance.m_topicsByHandle.AddOrUpdate(topic.Handle, TopicByHandleAdder, TopicByHandleUpdater, topic); return topic; } + /// + /// Gets a bool topic. + /// + /// topic name + /// BooleanTopic public BooleanTopic GetBooleanTopic(string name) { return (BooleanTopic)m_topics.AddOrUpdate(name, BooleanTopicCreator, BooleanTopicUpdator, this); @@ -49,6 +54,11 @@ private static IntegerTopic IntegerTopicUpdator(string name, Topic existingTopic instance.m_topicsByHandle.AddOrUpdate(topic.Handle, TopicByHandleAdder, TopicByHandleUpdater, topic); return topic; } + /// + /// Gets a long topic. + /// + /// topic name + /// IntegerTopic public IntegerTopic GetIntegerTopic(string name) { return (IntegerTopic)m_topics.AddOrUpdate(name, IntegerTopicCreator, IntegerTopicUpdator, this); @@ -71,6 +81,11 @@ private static FloatTopic FloatTopicUpdator(string name, Topic existingTopic, Ne instance.m_topicsByHandle.AddOrUpdate(topic.Handle, TopicByHandleAdder, TopicByHandleUpdater, topic); return topic; } + /// + /// Gets a float topic. + /// + /// topic name + /// FloatTopic public FloatTopic GetFloatTopic(string name) { return (FloatTopic)m_topics.AddOrUpdate(name, FloatTopicCreator, FloatTopicUpdator, this); @@ -93,6 +108,11 @@ private static DoubleTopic DoubleTopicUpdator(string name, Topic existingTopic, instance.m_topicsByHandle.AddOrUpdate(topic.Handle, TopicByHandleAdder, TopicByHandleUpdater, topic); return topic; } + /// + /// Gets a double topic. + /// + /// topic name + /// DoubleTopic public DoubleTopic GetDoubleTopic(string name) { return (DoubleTopic)m_topics.AddOrUpdate(name, DoubleTopicCreator, DoubleTopicUpdator, this); @@ -115,6 +135,11 @@ private static StringTopic StringTopicUpdator(string name, Topic existingTopic, instance.m_topicsByHandle.AddOrUpdate(topic.Handle, TopicByHandleAdder, TopicByHandleUpdater, topic); return topic; } + /// + /// Gets a string topic. + /// + /// topic name + /// StringTopic public StringTopic GetStringTopic(string name) { return (StringTopic)m_topics.AddOrUpdate(name, StringTopicCreator, StringTopicUpdator, this); @@ -137,6 +162,11 @@ private static RawTopic RawTopicUpdator(string name, Topic existingTopic, Networ instance.m_topicsByHandle.AddOrUpdate(topic.Handle, TopicByHandleAdder, TopicByHandleUpdater, topic); return topic; } + /// + /// Gets a byte[] topic. + /// + /// topic name + /// RawTopic public RawTopic GetRawTopic(string name) { return (RawTopic)m_topics.AddOrUpdate(name, RawTopicCreator, RawTopicUpdator, this); @@ -159,6 +189,11 @@ private static BooleanArrayTopic BooleanArrayTopicUpdator(string name, Topic exi instance.m_topicsByHandle.AddOrUpdate(topic.Handle, TopicByHandleAdder, TopicByHandleUpdater, topic); return topic; } + /// + /// Gets a bool[] topic. + /// + /// topic name + /// BooleanArrayTopic public BooleanArrayTopic GetBooleanArrayTopic(string name) { return (BooleanArrayTopic)m_topics.AddOrUpdate(name, BooleanArrayTopicCreator, BooleanArrayTopicUpdator, this); @@ -181,6 +216,11 @@ private static IntegerArrayTopic IntegerArrayTopicUpdator(string name, Topic exi instance.m_topicsByHandle.AddOrUpdate(topic.Handle, TopicByHandleAdder, TopicByHandleUpdater, topic); return topic; } + /// + /// Gets a long[] topic. + /// + /// topic name + /// IntegerArrayTopic public IntegerArrayTopic GetIntegerArrayTopic(string name) { return (IntegerArrayTopic)m_topics.AddOrUpdate(name, IntegerArrayTopicCreator, IntegerArrayTopicUpdator, this); @@ -203,6 +243,11 @@ private static FloatArrayTopic FloatArrayTopicUpdator(string name, Topic existin instance.m_topicsByHandle.AddOrUpdate(topic.Handle, TopicByHandleAdder, TopicByHandleUpdater, topic); return topic; } + /// + /// Gets a float[] topic. + /// + /// topic name + /// FloatArrayTopic public FloatArrayTopic GetFloatArrayTopic(string name) { return (FloatArrayTopic)m_topics.AddOrUpdate(name, FloatArrayTopicCreator, FloatArrayTopicUpdator, this); @@ -225,6 +270,11 @@ private static DoubleArrayTopic DoubleArrayTopicUpdator(string name, Topic exist instance.m_topicsByHandle.AddOrUpdate(topic.Handle, TopicByHandleAdder, TopicByHandleUpdater, topic); return topic; } + /// + /// Gets a double[] topic. + /// + /// topic name + /// DoubleArrayTopic public DoubleArrayTopic GetDoubleArrayTopic(string name) { return (DoubleArrayTopic)m_topics.AddOrUpdate(name, DoubleArrayTopicCreator, DoubleArrayTopicUpdator, this); @@ -247,6 +297,11 @@ private static StringArrayTopic StringArrayTopicUpdator(string name, Topic exist instance.m_topicsByHandle.AddOrUpdate(topic.Handle, TopicByHandleAdder, TopicByHandleUpdater, topic); return topic; } + /// + /// Gets a string[] topic. + /// + /// topic name + /// StringArrayTopic public StringArrayTopic GetStringArrayTopic(string name) { return (StringArrayTopic)m_topics.AddOrUpdate(name, StringArrayTopicCreator, StringArrayTopicUpdator, this); diff --git a/src/ntcore/Generated/NetworkTableValue.cs b/src/ntcore/Generated/NetworkTableValue.cs index b12aaf87..fbbf90b3 100644 --- a/src/ntcore/Generated/NetworkTableValue.cs +++ b/src/ntcore/Generated/NetworkTableValue.cs @@ -11,93 +11,67 @@ namespace NetworkTables; public readonly partial struct NetworkTableValue { - /** - * Determine if entry value contains a bool. - * - * @return True if the entry value is of bool type. - */ + /// + /// Gets if entry value contains a bool. + /// public bool IsBoolean => Type == NetworkTableType.Boolean; - /** - * Determine if entry value contains a long. - * - * @return True if the entry value is of long type. - */ + /// + /// Gets if entry value contains a long. + /// public bool IsInteger => Type == NetworkTableType.Integer; - /** - * Determine if entry value contains a float. - * - * @return True if the entry value is of float type. - */ + /// + /// Gets if entry value contains a float. + /// public bool IsFloat => Type == NetworkTableType.Float; - /** - * Determine if entry value contains a double. - * - * @return True if the entry value is of double type. - */ + /// + /// Gets if entry value contains a double. + /// public bool IsDouble => Type == NetworkTableType.Double; - /** - * Determine if entry value contains a string. - * - * @return True if the entry value is of string type. - */ + /// + /// Gets if entry value contains a string. + /// public bool IsString => Type == NetworkTableType.String; - /** - * Determine if entry value contains a byte[]. - * - * @return True if the entry value is of byte[] type. - */ + /// + /// Gets if entry value contains a byte[]. + /// public bool IsRaw => Type == NetworkTableType.Raw; - /** - * Determine if entry value contains a bool[]. - * - * @return True if the entry value is of bool[] type. - */ + /// + /// Gets if entry value contains a bool[]. + /// public bool IsBooleanArray => Type == NetworkTableType.BooleanArray; - /** - * Determine if entry value contains a long[]. - * - * @return True if the entry value is of long[] type. - */ + /// + /// Gets if entry value contains a long[]. + /// public bool IsIntegerArray => Type == NetworkTableType.IntegerArray; - /** - * Determine if entry value contains a float[]. - * - * @return True if the entry value is of float[] type. - */ + /// + /// Gets if entry value contains a float[]. + /// public bool IsFloatArray => Type == NetworkTableType.FloatArray; - /** - * Determine if entry value contains a double[]. - * - * @return True if the entry value is of double[] type. - */ + /// + /// Gets if entry value contains a double[]. + /// public bool IsDoubleArray => Type == NetworkTableType.DoubleArray; - /** - * Determine if entry value contains a string[]. - * - * @return True if the entry value is of string[] type. - */ + /// + /// Gets if entry value contains a string[]. + /// public bool IsStringArray => Type == NetworkTableType.StringArray; - /* - * Type-Safe Getters - */ - /** - * Get the bool value. - * - * @return The bool value. - * @throws ClassCastException if the entry value is not of bool type. - */ + /// + /// Get the bool value. + /// + /// The bool value. + /// Thrown if the entry value is not of bool type. public bool GetBoolean() { if (Type != NetworkTableType.Boolean) @@ -107,12 +81,11 @@ public bool GetBoolean() return m_structValue.boolValue; } - /** - * Get the long value. - * - * @return The long value. - * @throws ClassCastException if the entry value is not of long type. - */ + /// + /// Get the long value. + /// + /// The long value. + /// Thrown if the entry value is not of long type. public long GetInteger() { if (Type != NetworkTableType.Integer) @@ -122,12 +95,11 @@ public long GetInteger() return m_structValue.longValue; } - /** - * Get the float value. - * - * @return The float value. - * @throws ClassCastException if the entry value is not of float type. - */ + /// + /// Get the float value. + /// + /// The float value. + /// Thrown if the entry value is not of float type. public float GetFloat() { if (Type != NetworkTableType.Float) @@ -137,12 +109,11 @@ public float GetFloat() return m_structValue.floatValue; } - /** - * Get the double value. - * - * @return The double value. - * @throws ClassCastException if the entry value is not of double type. - */ + /// + /// Get the double value. + /// + /// The double value. + /// Thrown if the entry value is not of double type. public double GetDouble() { if (Type != NetworkTableType.Double) @@ -152,12 +123,11 @@ public double GetDouble() return m_structValue.doubleValue; } - /** - * Get the string value. - * - * @return The string value. - * @throws ClassCastException if the entry value is not of string type. - */ + /// + /// Get the string value. + /// + /// The string value. + /// Thrown if the entry value is not of string type. public string GetString() { if (Type != NetworkTableType.String) @@ -167,12 +137,11 @@ public string GetString() return (string)m_objectValue!; } - /** - * Get the byte[] value. - * - * @return The byte[] value. - * @throws ClassCastException if the entry value is not of byte[] type. - */ + /// + /// Get the byte[] value. + /// + /// The byte[] value. + /// Thrown if the entry value is not of byte[] type. public byte[] GetRaw() { if (Type != NetworkTableType.Raw) @@ -182,12 +151,11 @@ public byte[] GetRaw() return (byte[])m_objectValue!; } - /** - * Get the bool[] value. - * - * @return The bool[] value. - * @throws ClassCastException if the entry value is not of bool[] type. - */ + /// + /// Get the bool[] value. + /// + /// The bool[] value. + /// Thrown if the entry value is not of bool[] type. public bool[] GetBooleanArray() { if (Type != NetworkTableType.BooleanArray) @@ -197,12 +165,11 @@ public bool[] GetBooleanArray() return (bool[])m_objectValue!; } - /** - * Get the long[] value. - * - * @return The long[] value. - * @throws ClassCastException if the entry value is not of long[] type. - */ + /// + /// Get the long[] value. + /// + /// The long[] value. + /// Thrown if the entry value is not of long[] type. public long[] GetIntegerArray() { if (Type != NetworkTableType.IntegerArray) @@ -212,12 +179,11 @@ public long[] GetIntegerArray() return (long[])m_objectValue!; } - /** - * Get the float[] value. - * - * @return The float[] value. - * @throws ClassCastException if the entry value is not of float[] type. - */ + /// + /// Get the float[] value. + /// + /// The float[] value. + /// Thrown if the entry value is not of float[] type. public float[] GetFloatArray() { if (Type != NetworkTableType.FloatArray) @@ -227,12 +193,11 @@ public float[] GetFloatArray() return (float[])m_objectValue!; } - /** - * Get the double[] value. - * - * @return The double[] value. - * @throws ClassCastException if the entry value is not of double[] type. - */ + /// + /// Get the double[] value. + /// + /// The double[] value. + /// Thrown if the entry value is not of double[] type. public double[] GetDoubleArray() { if (Type != NetworkTableType.DoubleArray) @@ -242,12 +207,11 @@ public double[] GetDoubleArray() return (double[])m_objectValue!; } - /** - * Get the string[] value. - * - * @return The string[] value. - * @throws ClassCastException if the entry value is not of string[] type. - */ + /// + /// Get the string[] value. + /// + /// The string[] value. + /// Thrown if the entry value is not of string[] type. public string[] GetStringArray() { if (Type != NetworkTableType.StringArray) @@ -257,269 +221,244 @@ public string[] GetStringArray() return (string[])m_objectValue!; } - /* - * Factory functions. - */ - /** - * Creates a bool value. - * - * @param value the value - * @return The entry value - */ + /// + /// Creates a bool value. + /// + /// the value + /// The entry value public static NetworkTableValue MakeBoolean(bool value) { return new NetworkTableValue(NetworkTableType.Boolean, value); } - /** - * Creates a bool value. - * - * @param value the value - * @param time the creation time to use (instead of the current time) - * @return The entry value - */ + /// + /// Creates a bool value. + /// + /// the value + /// the creation time to use (instead of the current time) + /// The entry value public static NetworkTableValue MakeBoolean(bool value, long time) { return new NetworkTableValue(NetworkTableType.Boolean, value, time); } - /** - * Creates a long value. - * - * @param value the value - * @return The entry value - */ + /// + /// Creates a long value. + /// + /// the value + /// The entry value public static NetworkTableValue MakeInteger(long value) { return new NetworkTableValue(NetworkTableType.Integer, value); } - /** - * Creates a long value. - * - * @param value the value - * @param time the creation time to use (instead of the current time) - * @return The entry value - */ + /// + /// Creates a long value. + /// + /// the value + /// the creation time to use (instead of the current time) + /// The entry value public static NetworkTableValue MakeInteger(long value, long time) { return new NetworkTableValue(NetworkTableType.Integer, value, time); } - /** - * Creates a float value. - * - * @param value the value - * @return The entry value - */ + /// + /// Creates a float value. + /// + /// the value + /// The entry value public static NetworkTableValue MakeFloat(float value) { return new NetworkTableValue(NetworkTableType.Float, value); } - /** - * Creates a float value. - * - * @param value the value - * @param time the creation time to use (instead of the current time) - * @return The entry value - */ + /// + /// Creates a float value. + /// + /// the value + /// the creation time to use (instead of the current time) + /// The entry value public static NetworkTableValue MakeFloat(float value, long time) { return new NetworkTableValue(NetworkTableType.Float, value, time); } - /** - * Creates a double value. - * - * @param value the value - * @return The entry value - */ + /// + /// Creates a double value. + /// + /// the value + /// The entry value public static NetworkTableValue MakeDouble(double value) { return new NetworkTableValue(NetworkTableType.Double, value); } - /** - * Creates a double value. - * - * @param value the value - * @param time the creation time to use (instead of the current time) - * @return The entry value - */ + /// + /// Creates a double value. + /// + /// the value + /// the creation time to use (instead of the current time) + /// The entry value public static NetworkTableValue MakeDouble(double value, long time) { return new NetworkTableValue(NetworkTableType.Double, value, time); } - /** - * Creates a string value. - * - * @param value the value - * @return The entry value - */ + /// + /// Creates a string value. + /// + /// the value + /// The entry value public static NetworkTableValue MakeString(string value) { return new NetworkTableValue(NetworkTableType.String, value); } - /** - * Creates a string value. - * - * @param value the value - * @param time the creation time to use (instead of the current time) - * @return The entry value - */ + /// + /// Creates a string value. + /// + /// the value + /// the creation time to use (instead of the current time) + /// The entry value public static NetworkTableValue MakeString(string value, long time) { return new NetworkTableValue(NetworkTableType.String, value, time); } - /** - * Creates a byte[] value. - * - * @param value the value - * @return The entry value - */ + /// + /// Creates a byte[] value. + /// + /// the value + /// The entry value public static NetworkTableValue MakeRaw(byte[] value) { return new NetworkTableValue(NetworkTableType.Raw, value); } - /** - * Creates a byte[] value. - * - * @param value the value - * @param time the creation time to use (instead of the current time) - * @return The entry value - */ + /// + /// Creates a byte[] value. + /// + /// the value + /// the creation time to use (instead of the current time) + /// The entry value public static NetworkTableValue MakeRaw(byte[] value, long time) { return new NetworkTableValue(NetworkTableType.Raw, value, time); } - /** - * Creates a bool[] value. - * - * @param value the value - * @return The entry value - */ + /// + /// Creates a bool[] value. + /// + /// the value + /// The entry value public static NetworkTableValue MakeBooleanArray(bool[] value) { return new NetworkTableValue(NetworkTableType.BooleanArray, value); } - /** - * Creates a bool[] value. - * - * @param value the value - * @param time the creation time to use (instead of the current time) - * @return The entry value - */ + /// + /// Creates a bool[] value. + /// + /// the value + /// the creation time to use (instead of the current time) + /// The entry value public static NetworkTableValue MakeBooleanArray(bool[] value, long time) { return new NetworkTableValue(NetworkTableType.BooleanArray, value, time); } - /** - * Creates a long[] value. - * - * @param value the value - * @return The entry value - */ + /// + /// Creates a long[] value. + /// + /// the value + /// The entry value public static NetworkTableValue MakeIntegerArray(long[] value) { return new NetworkTableValue(NetworkTableType.IntegerArray, value); } - /** - * Creates a long[] value. - * - * @param value the value - * @param time the creation time to use (instead of the current time) - * @return The entry value - */ + /// + /// Creates a long[] value. + /// + /// the value + /// the creation time to use (instead of the current time) + /// The entry value public static NetworkTableValue MakeIntegerArray(long[] value, long time) { return new NetworkTableValue(NetworkTableType.IntegerArray, value, time); } - /** - * Creates a float[] value. - * - * @param value the value - * @return The entry value - */ + /// + /// Creates a float[] value. + /// + /// the value + /// The entry value public static NetworkTableValue MakeFloatArray(float[] value) { return new NetworkTableValue(NetworkTableType.FloatArray, value); } - /** - * Creates a float[] value. - * - * @param value the value - * @param time the creation time to use (instead of the current time) - * @return The entry value - */ + /// + /// Creates a float[] value. + /// + /// the value + /// the creation time to use (instead of the current time) + /// The entry value public static NetworkTableValue MakeFloatArray(float[] value, long time) { return new NetworkTableValue(NetworkTableType.FloatArray, value, time); } - /** - * Creates a double[] value. - * - * @param value the value - * @return The entry value - */ + /// + /// Creates a double[] value. + /// + /// the value + /// The entry value public static NetworkTableValue MakeDoubleArray(double[] value) { return new NetworkTableValue(NetworkTableType.DoubleArray, value); } - /** - * Creates a double[] value. - * - * @param value the value - * @param time the creation time to use (instead of the current time) - * @return The entry value - */ + /// + /// Creates a double[] value. + /// + /// the value + /// the creation time to use (instead of the current time) + /// The entry value public static NetworkTableValue MakeDoubleArray(double[] value, long time) { return new NetworkTableValue(NetworkTableType.DoubleArray, value, time); } - /** - * Creates a string[] value. - * - * @param value the value - * @return The entry value - */ + /// + /// Creates a string[] value. + /// + /// the value + /// The entry value public static NetworkTableValue MakeStringArray(string[] value) { return new NetworkTableValue(NetworkTableType.StringArray, value); } - /** - * Creates a string[] value. - * - * @param value the value - * @param time the creation time to use (instead of the current time) - * @return The entry value - */ + /// + /// Creates a string[] value. + /// + /// the value + /// the creation time to use (instead of the current time) + /// The entry value public static NetworkTableValue MakeStringArray(string[] value, long time) { return new NetworkTableValue(NetworkTableType.StringArray, value, time); diff --git a/src/ntcore/Generated/RawEntry.cs b/src/ntcore/Generated/RawEntry.cs index 425b5012..840544ea 100644 --- a/src/ntcore/Generated/RawEntry.cs +++ b/src/ntcore/Generated/RawEntry.cs @@ -6,13 +6,13 @@ namespace NetworkTables; -/** - * NetworkTables Raw entry. - * - *

Unlike NetworkTableEntry, the entry goes away when close() is called. - */ +///

+/// NetworkTables Raw entry. +/// public interface IRawEntry : IRawSubscriber, IRawPublisher { - /** Stops publishing the entry if it's published. */ + /// + /// Stops publishing the entry if its published. + /// void Unpublish(); } diff --git a/src/ntcore/Generated/RawEntryImpl.cs b/src/ntcore/Generated/RawEntryImpl.cs index 4d7aedad..4f8a0c04 100644 --- a/src/ntcore/Generated/RawEntryImpl.cs +++ b/src/ntcore/Generated/RawEntryImpl.cs @@ -10,16 +10,8 @@ namespace NetworkTables; -/** NetworkTables Raw implementation. */ internal sealed class RawEntryImpl : EntryBase, IRawEntry where T : struct, INtEntryHandle { - /** - * Constructor. - * - * @param topic Topic - * @param handle Native handle - * @param defaultValue Default value for Get() - */ internal RawEntryImpl(RawTopic topic, T handle, byte[] defaultValue) : base(handle) { Topic = topic; @@ -28,7 +20,6 @@ internal RawEntryImpl(RawTopic topic, T handle, byte[] defaultValue) : base(hand public override RawTopic Topic { get; } - public byte[] Get() { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -39,7 +30,6 @@ public byte[] Get() return m_defaultValue; } - public byte[] Get(byte[] defaultValue) { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -50,7 +40,6 @@ public byte[] Get(byte[] defaultValue) return defaultValue; } - public TimestampedObject GetAtomic() { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -58,7 +47,6 @@ public TimestampedObject GetAtomic() return new TimestampedObject(value.Time, value.ServerTime, baseValue); } - public TimestampedObject GetAtomic(byte[] defaultValue) { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -66,7 +54,6 @@ public TimestampedObject GetAtomic(byte[] defaultValue) return new TimestampedObject(value.Time, value.ServerTime, baseValue); } - public TimestampedObject[] ReadQueue() { NetworkTableValue[] values = NtCore.ReadQueueValue(Handle); @@ -78,7 +65,6 @@ public TimestampedObject[] ReadQueue() return timestamped; } - public byte[][] ReadQueueValues() { NetworkTableValue[] values = NtCore.ReadQueueValue(Handle); @@ -108,6 +94,7 @@ public void SetDefault(ReadOnlySpan value) RefNetworkTableValue ntValue = RefNetworkTableValue.MakeRaw(value); NtCore.SetDefaultEntryValue(Handle, ntValue); } + public void Unpublish() { NtCore.Unpublish(Handle); diff --git a/src/ntcore/Generated/RawPublisher.cs b/src/ntcore/Generated/RawPublisher.cs index ba6efa29..7ad2585f 100644 --- a/src/ntcore/Generated/RawPublisher.cs +++ b/src/ntcore/Generated/RawPublisher.cs @@ -8,39 +8,34 @@ namespace NetworkTables; -/** NetworkTables Raw publisher. */ +/// +/// NetworkTables Raw publisher. +/// public interface IRawPublisher : IPublisher { - /** - * Get the corresponding topic. - * - * @return Topic - */ - + /// + /// Gets the corresponding topic. + /// new RawTopic Topic { get; } - /** - * Publish a new value using current NT time. - * - * @param value value to publish - */ + /// + /// Publish a new value using the current NT time. + /// + /// value to publish void Set(ReadOnlySpan value); - /** - * Publish a new value. - * - * @param value value to publish - * @param time timestamp; 0 indicates current NT time should be used - */ + /// + /// Publish a new value. + /// + /// value to publish + /// timestamp; 0 indicates current NT time should be used void Set(ReadOnlySpan value, long time); - /** - * Publish a default value. - * On reconnect, a default value will never be used in preference to a - * published value. - * - * @param value value - */ + /// + /// Publish a default value. On reconnect, a default value will never be used + /// in prference to a published value + /// + /// value void SetDefault(ReadOnlySpan value); } diff --git a/src/ntcore/Generated/RawSubscriber.cs b/src/ntcore/Generated/RawSubscriber.cs index b24312a3..85a362b2 100644 --- a/src/ntcore/Generated/RawSubscriber.cs +++ b/src/ntcore/Generated/RawSubscriber.cs @@ -6,73 +6,62 @@ namespace NetworkTables; -/** NetworkTables Raw subscriber. */ +/// +/// NetworkTables Raw subscriver. +/// public interface IRawSubscriber : ISubscriber { - /** - * Get the corresponding topic. - * - * @return Topic - */ - + /// + /// Gets the corresponding topic. + /// new RawTopic Topic { get; } - /** - * Get the last published value. - * If no value has been published, returns the stored default value. - * - * @return value - */ + /// + /// Get the last published value. + /// If no value has been published, returns the stored default value. + /// + /// value byte[] Get(); - /** - * Get the last published value. - * If no value has been published, returns the passed defaultValue. - * - * @param defaultValue default value to return if no value has been published - * @return value - */ + /// + /// Get the last published value. + /// If no value has been published, returns the passed default value. + /// + /// default value to return if no value has been published + /// value byte[] Get(byte[] defaultValue); - /** - * Get the last published value along with its timestamp - * If no value has been published, returns the stored default value and a - * timestamp of 0. - * - * @return timestamped value - */ + /// + /// Get the last published value along with its timestamp. + /// If no value has been published, returns the stored default value and a timestamp of 0. + /// + /// timestamped value TimestampedObject GetAtomic(); - /** - * Get the last published value along with its timestamp - * If no value has been published, returns the passed defaultValue and a - * timestamp of 0. - * - * @param defaultValue default value to return if no value has been published - * @return timestamped value - */ + /// + /// Get the last published value along with its timestamp. + /// If no value has been published, returns the passed default value and a timestamp of 0. + /// + /// default value to return if no value has been published + /// timestamped value TimestampedObject GetAtomic(byte[] defaultValue); - /** - * Get an array of all value changes since the last call to readQueue. - * Also provides a timestamp for each value. - * - *

The "poll storage" subscribe option can be used to set the queue - * depth. - * - * @return Array of timestamped values; empty array if no new changes have - * been published since the previous call. - */ + ///

+ /// Get an array of all value changes since the last call to ReadQueue. + /// Also provides a timestamp for each value. + /// + /// + /// The "poll storage" subscribe option can be used to set the queue depth. + /// Array of timestamped values; emptry if no new changes TimestampedObject[] ReadQueue(); - /** - * Get an array of all value changes since the last call to readQueue. - * - *

The "poll storage" subscribe option can be used to set the queue - * depth. - * - * @return Array of values; empty array if no new changes have been - * published since the previous call. - */ + ///

+ /// Get an array of all value changes since the last call to ReadQueue. + /// + /// + /// The "poll storage" subscribe option can be used to set the queue depth. + /// Array of values; emptry if no new changes byte[][] ReadQueueValues(); } diff --git a/src/ntcore/Generated/RawTopic.cs b/src/ntcore/Generated/RawTopic.cs index 04f20936..129b166c 100644 --- a/src/ntcore/Generated/RawTopic.cs +++ b/src/ntcore/Generated/RawTopic.cs @@ -10,46 +10,41 @@ namespace NetworkTables; -/** NetworkTables Raw topic. */ +/// +/// NetworkTables Raw topic. +/// public class RawTopic : Topic { - /** - * Construct from a generic topic. - * - * @param topic Topic - */ - public RawTopic(Topic topic) : base(topic.Instance, topic.Handle) - { - } + /// + /// Constructs a typed topic from a generic topic. + /// + /// typed topic + public RawTopic(Topic topic) : base(topic.Instance, topic.Handle) { } - /** - * Constructor; use NetworkTableInstance.getRawTopic() instead. - * - * @param inst Instance - * @param handle Native handle - */ - public RawTopic(NetworkTableInstance inst, NtTopic handle) : base(inst, handle) - { - } + /// + /// Constructor; use NetworkTableInstance.GetRawTopic() instead. + /// + /// Instance + /// Native handle + public RawTopic(NetworkTableInstance inst, NtTopic handle) : base(inst, handle) { } - - /** - * Create a new subscriber to the topic, with specified type string. - * - *

The subscriber is only active as long as the returned object - * is not closed. - * - *

Subscribers that do not match the published data type do not return - * any values. To determine if the data type matches, use the appropriate - * Topic functions. - * - * @param typeString type string - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options subscribe options - * @return subscriber - */ + ///

+ /// Create a new subscriber to the topic, with the specified type string. + /// + /// + /// The subscriber is only active as long as the returned object is not closed. + /// + /// Subscribers that do not match the published data type do not return any + /// values. To determine if the data type matches, use the appropriate Topic + /// functions. + /// + /// type string + /// + /// default value used when a default is not provided to a getter function + /// + /// subscribe options + /// subscriber public IRawSubscriber Subscribe( string typeString, byte[] defaultValue, @@ -63,22 +58,22 @@ public IRawSubscriber Subscribe( defaultValue); } - /** - * Create a new subscriber to the topic, with specified type string. - * - *

The subscriber is only active as long as the returned object - * is not closed. - * - *

Subscribers that do not match the published data type do not return - * any values. To determine if the data type matches, use the appropriate - * Topic functions. - * - * @param typeString type string - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options subscribe options - * @return subscriber - */ + ///

+ /// Create a new subscriber to the topic. + /// + /// + /// The subscriber is only active as long as the returned object is not closed. + /// + /// Subscribers that do not match the published data type do not return any + /// values. To determine if the data type matches, use the appropriate Topic + /// functions. + /// + /// type string + /// + /// default value used when a default is not provided to a getter function + /// + /// subscribe options + /// subscriber public IRawSubscriber Subscribe( ReadOnlySpan typeString, byte[] defaultValue, @@ -92,22 +87,21 @@ public IRawSubscriber Subscribe( defaultValue); } - /** - * Create a new publisher to the topic. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param options publish options - * @return publisher - */ + ///

+ /// Create a new publisher to the topic. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// publish options + /// publisher public IRawPublisher Publish( string typeString, PubSubOptions options) @@ -120,22 +114,21 @@ public IRawPublisher Publish( []); } - /** - * Create a new publisher to the topic. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param options publish options - * @return publisher - */ + ///

+ /// Create a new publisher to the topic. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// publish options + /// publisher public IRawPublisher Publish( ReadOnlySpan typeString, PubSubOptions options) @@ -148,22 +141,22 @@ public IRawPublisher Publish( []); } - /** - * Create a new publisher to the topic. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param options publish options - * @return publisher - */ + ///

+ /// Create a new publisher to the topic, with type string and initial properties. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// JSON properties + /// publish options + /// publisher public IRawPublisher PublishEx( string typeString, string properties, PubSubOptions options) @@ -176,24 +169,22 @@ public IRawPublisher PublishEx( []); } - /** - * Create a new publisher to the topic, with type string and initial properties. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param properties JSON properties - * @param options publish options - * @return publisher - * @throws IllegalArgumentException if properties is not a JSON object - */ + ///

+ /// Create a new publisher to the topic, with type string and initial properties. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// JSON properties + /// publish options + /// publisher public IRawPublisher PublishEx( ReadOnlySpan typeString, string properties, @@ -207,24 +198,22 @@ public IRawPublisher PublishEx( []); } - /** - * Create a new publisher to the topic, with type string and initial properties. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param properties JSON properties - * @param options publish options - * @return publisher - * @throws IllegalArgumentException if properties is not a JSON object - */ + ///

+ /// Create a new publisher to the topic, with type string and initial properties. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// JSON properties + /// publish options + /// publisher public IRawPublisher PublishEx( string typeString, ReadOnlySpan properties, @@ -238,24 +227,22 @@ public IRawPublisher PublishEx( []); } - /** - * Create a new publisher to the topic, with type string and initial properties. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param properties JSON properties - * @param options publish options - * @return publisher - * @throws IllegalArgumentException if properties is not a JSON object - */ + ///

+ /// Create a new publisher to the topic, with type string and initial properties. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// JSON properties + /// publish options + /// publisher public IRawPublisher PublishEx( ReadOnlySpan typeString, ReadOnlySpan properties, @@ -269,27 +256,27 @@ public IRawPublisher PublishEx( []); } - /** - * Create a new entry for the topic, with specified type string. - * - *

Entries act as a combination of a subscriber and a weak publisher. The - * subscriber is active as long as the entry is not closed. The publisher is - * created when the entry is first written to, and remains active until either - * unpublish() is called or the entry is closed. - * - *

It is not possible to use two different data types with the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored), and the entry will show no new - * values if the data type does not match. To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options publish and/or subscribe options - * @return entry - */ + ///

+ /// Create a new entry for the topic, with the specified type string. + /// + /// + /// Entries act as a combination of a subscriber and a weak publisher. The + /// subscriber is active as long as the entry is not closed. The publisher is + /// created when the entry is first written to, and remains active until either + /// Unpublish() is called or the entry is closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// + /// default value used when a default is not provided to a getter function + /// + /// publish and/or subscribe options + /// entry public IRawEntry GetEntry( string typeString, byte[] defaultValue, @@ -303,27 +290,27 @@ public IRawEntry GetEntry( defaultValue); } - /** - * Create a new entry for the topic, with specified type string. - * - *

Entries act as a combination of a subscriber and a weak publisher. The - * subscriber is active as long as the entry is not closed. The publisher is - * created when the entry is first written to, and remains active until either - * unpublish() is called or the entry is closed. - * - *

It is not possible to use two different data types with the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored), and the entry will show no new - * values if the data type does not match. To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options publish and/or subscribe options - * @return entry - */ + ///

+ /// Create a new entry for the topic, with the specified type string. + /// + /// + /// Entries act as a combination of a subscriber and a weak publisher. The + /// subscriber is active as long as the entry is not closed. The publisher is + /// created when the entry is first written to, and remains active until either + /// Unpublish() is called or the entry is closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// + /// default value used when a default is not provided to a getter function + /// + /// publish and/or subscribe options + /// entry public IRawEntry GetEntry( ReadOnlySpan typeString, byte[] defaultValue, @@ -337,6 +324,4 @@ public IRawEntry GetEntry( defaultValue); } - - } diff --git a/src/ntcore/Generated/RefNetworkTableValue.cs b/src/ntcore/Generated/RefNetworkTableValue.cs index 8524a78e..7cd35b18 100644 --- a/src/ntcore/Generated/RefNetworkTableValue.cs +++ b/src/ntcore/Generated/RefNetworkTableValue.cs @@ -9,6 +9,9 @@ namespace NetworkTables; +/// +/// A NetworkTable entry value used for write purposes +/// public readonly ref partial struct RefNetworkTableValue { @@ -26,11 +29,22 @@ internal RefNetworkTableValue(bool value, long time) m_structValue = new(value); } + /// + /// Creates a bool value. + /// + /// the value + /// The entry value public static RefNetworkTableValue MakeBoolean(bool value) { return new RefNetworkTableValue(value); } + /// + /// Creates a bool value. + /// + /// the value + /// the creation time to use (instead of the current time) + /// The entry value public static RefNetworkTableValue MakeBoolean(bool value, long time) { return new RefNetworkTableValue(value, time); @@ -50,11 +64,22 @@ internal RefNetworkTableValue(long value, long time) m_structValue = new(value); } + /// + /// Creates a long value. + /// + /// the value + /// The entry value public static RefNetworkTableValue MakeInteger(long value) { return new RefNetworkTableValue(value); } + /// + /// Creates a long value. + /// + /// the value + /// the creation time to use (instead of the current time) + /// The entry value public static RefNetworkTableValue MakeInteger(long value, long time) { return new RefNetworkTableValue(value, time); @@ -74,11 +99,22 @@ internal RefNetworkTableValue(float value, long time) m_structValue = new(value); } + /// + /// Creates a float value. + /// + /// the value + /// The entry value public static RefNetworkTableValue MakeFloat(float value) { return new RefNetworkTableValue(value); } + /// + /// Creates a float value. + /// + /// the value + /// the creation time to use (instead of the current time) + /// The entry value public static RefNetworkTableValue MakeFloat(float value, long time) { return new RefNetworkTableValue(value, time); @@ -98,11 +134,22 @@ internal RefNetworkTableValue(double value, long time) m_structValue = new(value); } + /// + /// Creates a double value. + /// + /// the value + /// The entry value public static RefNetworkTableValue MakeDouble(double value) { return new RefNetworkTableValue(value); } + /// + /// Creates a double value. + /// + /// the value + /// the creation time to use (instead of the current time) + /// The entry value public static RefNetworkTableValue MakeDouble(double value, long time) { return new RefNetworkTableValue(value, time); @@ -124,43 +171,65 @@ internal RefNetworkTableValue(string value, long time) m_stringValue = value; } + internal RefNetworkTableValue(ReadOnlySpan value, bool isString) + { + Type = NetworkTableType.String; + Time = NtCore.Now(); + m_byteSpan = value; + } + + internal RefNetworkTableValue(ReadOnlySpan value, long time, bool isString) + { + Type = NetworkTableType.String; + Time = time; + m_byteSpan = value; + } + + /// + /// Creates a string value. + /// + /// the value + /// The entry value public static RefNetworkTableValue MakeString(string value) { return new RefNetworkTableValue(value); } + /// + /// Creates a string value. + /// + /// the value + /// the creation time to use (instead of the current time) + /// The entry value public static RefNetworkTableValue MakeString(string value, long time) { return new RefNetworkTableValue(value, time); } + /// + /// Creates a string value from a UFT8 string. + /// + /// the value + /// The entry value public static RefNetworkTableValue MakeString(ReadOnlySpan value) { - return new RefNetworkTableValue(value, true); + return new RefNetworkTableValue(value); } + /// + /// Creates a string value from a UFT8 string. + /// + /// the value + /// the creation time to use (instead of the current time) + /// The entry value public static RefNetworkTableValue MakeString(ReadOnlySpan value, long time) { - return new RefNetworkTableValue(value, time, true); + return new RefNetworkTableValue(value, time); } internal readonly ReadOnlySpan m_byteSpan; - internal RefNetworkTableValue(ReadOnlySpan value, bool isString) - { - Type = NetworkTableType.String; - Time = NtCore.Now(); - m_byteSpan = value; - } - - internal RefNetworkTableValue(ReadOnlySpan value, long time, bool isString) - { - Type = NetworkTableType.String; - Time = time; - m_byteSpan = value; - } - internal RefNetworkTableValue(ReadOnlySpan value) { Type = NetworkTableType.Raw; @@ -175,11 +244,22 @@ internal RefNetworkTableValue(ReadOnlySpan value, long time) m_byteSpan = value; } + /// + /// Creates a byte[] value. + /// + /// the value + /// The entry value public static RefNetworkTableValue MakeRaw(ReadOnlySpan value) { return new RefNetworkTableValue(value); } + /// + /// Creates a byte[] value. + /// + /// the value + /// the creation time to use (instead of the current time) + /// The entry value public static RefNetworkTableValue MakeRaw(ReadOnlySpan value, long time) { return new RefNetworkTableValue(value, time); @@ -202,11 +282,22 @@ internal RefNetworkTableValue(ReadOnlySpan value, long time) m_boolSpan = value; } + /// + /// Creates a bool[] value. + /// + /// the value + /// The entry value public static RefNetworkTableValue MakeBooleanArray(ReadOnlySpan value) { return new RefNetworkTableValue(value); } + /// + /// Creates a bool[] value. + /// + /// the value + /// the creation time to use (instead of the current time) + /// The entry value public static RefNetworkTableValue MakeBooleanArray(ReadOnlySpan value, long time) { return new RefNetworkTableValue(value, time); @@ -229,11 +320,22 @@ internal RefNetworkTableValue(ReadOnlySpan value, long time) m_longSpan = value; } + /// + /// Creates a long[] value. + /// + /// the value + /// The entry value public static RefNetworkTableValue MakeIntegerArray(ReadOnlySpan value) { return new RefNetworkTableValue(value); } + /// + /// Creates a long[] value. + /// + /// the value + /// the creation time to use (instead of the current time) + /// The entry value public static RefNetworkTableValue MakeIntegerArray(ReadOnlySpan value, long time) { return new RefNetworkTableValue(value, time); @@ -256,11 +358,22 @@ internal RefNetworkTableValue(ReadOnlySpan value, long time) m_floatSpan = value; } + /// + /// Creates a float[] value. + /// + /// the value + /// The entry value public static RefNetworkTableValue MakeFloatArray(ReadOnlySpan value) { return new RefNetworkTableValue(value); } + /// + /// Creates a float[] value. + /// + /// the value + /// the creation time to use (instead of the current time) + /// The entry value public static RefNetworkTableValue MakeFloatArray(ReadOnlySpan value, long time) { return new RefNetworkTableValue(value, time); @@ -283,11 +396,22 @@ internal RefNetworkTableValue(ReadOnlySpan value, long time) m_doubleSpan = value; } + /// + /// Creates a double[] value. + /// + /// the value + /// The entry value public static RefNetworkTableValue MakeDoubleArray(ReadOnlySpan value) { return new RefNetworkTableValue(value); } + /// + /// Creates a double[] value. + /// + /// the value + /// the creation time to use (instead of the current time) + /// The entry value public static RefNetworkTableValue MakeDoubleArray(ReadOnlySpan value, long time) { return new RefNetworkTableValue(value, time); @@ -310,11 +434,22 @@ internal RefNetworkTableValue(ReadOnlySpan value, long time) m_stringSpan = value; } + /// + /// Creates a string[] value. + /// + /// the value + /// The entry value public static RefNetworkTableValue MakeStringArray(ReadOnlySpan value) { return new RefNetworkTableValue(value); } + /// + /// Creates a string[] value. + /// + /// the value + /// the creation time to use (instead of the current time) + /// The entry value public static RefNetworkTableValue MakeStringArray(ReadOnlySpan value, long time) { return new RefNetworkTableValue(value, time); diff --git a/src/ntcore/Generated/StringArrayEntry.cs b/src/ntcore/Generated/StringArrayEntry.cs index a6033b4f..28a46b15 100644 --- a/src/ntcore/Generated/StringArrayEntry.cs +++ b/src/ntcore/Generated/StringArrayEntry.cs @@ -6,13 +6,13 @@ namespace NetworkTables; -/** - * NetworkTables StringArray entry. - * - *

Unlike NetworkTableEntry, the entry goes away when close() is called. - */ +///

+/// NetworkTables StringArray entry. +/// public interface IStringArrayEntry : IStringArraySubscriber, IStringArrayPublisher { - /** Stops publishing the entry if it's published. */ + /// + /// Stops publishing the entry if its published. + /// void Unpublish(); } diff --git a/src/ntcore/Generated/StringArrayEntryImpl.cs b/src/ntcore/Generated/StringArrayEntryImpl.cs index d2d7a450..85ac1959 100644 --- a/src/ntcore/Generated/StringArrayEntryImpl.cs +++ b/src/ntcore/Generated/StringArrayEntryImpl.cs @@ -10,16 +10,8 @@ namespace NetworkTables; -/** NetworkTables StringArray implementation. */ internal sealed class StringArrayEntryImpl : EntryBase, IStringArrayEntry where T : struct, INtEntryHandle { - /** - * Constructor. - * - * @param topic Topic - * @param handle Native handle - * @param defaultValue Default value for Get() - */ internal StringArrayEntryImpl(StringArrayTopic topic, T handle, string[] defaultValue) : base(handle) { Topic = topic; @@ -28,7 +20,6 @@ internal StringArrayEntryImpl(StringArrayTopic topic, T handle, string[] default public override StringArrayTopic Topic { get; } - public string[] Get() { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -39,7 +30,6 @@ public string[] Get() return m_defaultValue; } - public string[] Get(string[] defaultValue) { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -50,7 +40,6 @@ public string[] Get(string[] defaultValue) return defaultValue; } - public TimestampedObject GetAtomic() { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -58,7 +47,6 @@ public TimestampedObject GetAtomic() return new TimestampedObject(value.Time, value.ServerTime, baseValue); } - public TimestampedObject GetAtomic(string[] defaultValue) { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -66,7 +54,6 @@ public TimestampedObject GetAtomic(string[] defaultValue) return new TimestampedObject(value.Time, value.ServerTime, baseValue); } - public TimestampedObject[] ReadQueue() { NetworkTableValue[] values = NtCore.ReadQueueValue(Handle); @@ -78,7 +65,6 @@ public TimestampedObject[] ReadQueue() return timestamped; } - public string[][] ReadQueueValues() { NetworkTableValue[] values = NtCore.ReadQueueValue(Handle); @@ -108,6 +94,7 @@ public void SetDefault(ReadOnlySpan value) RefNetworkTableValue ntValue = RefNetworkTableValue.MakeStringArray(value); NtCore.SetDefaultEntryValue(Handle, ntValue); } + public void Unpublish() { NtCore.Unpublish(Handle); diff --git a/src/ntcore/Generated/StringArrayPublisher.cs b/src/ntcore/Generated/StringArrayPublisher.cs index 5b0b4d56..deedddac 100644 --- a/src/ntcore/Generated/StringArrayPublisher.cs +++ b/src/ntcore/Generated/StringArrayPublisher.cs @@ -8,39 +8,34 @@ namespace NetworkTables; -/** NetworkTables StringArray publisher. */ +/// +/// NetworkTables StringArray publisher. +/// public interface IStringArrayPublisher : IPublisher { - /** - * Get the corresponding topic. - * - * @return Topic - */ - + /// + /// Gets the corresponding topic. + /// new StringArrayTopic Topic { get; } - /** - * Publish a new value using current NT time. - * - * @param value value to publish - */ + /// + /// Publish a new value using the current NT time. + /// + /// value to publish void Set(ReadOnlySpan value); - /** - * Publish a new value. - * - * @param value value to publish - * @param time timestamp; 0 indicates current NT time should be used - */ + /// + /// Publish a new value. + /// + /// value to publish + /// timestamp; 0 indicates current NT time should be used void Set(ReadOnlySpan value, long time); - /** - * Publish a default value. - * On reconnect, a default value will never be used in preference to a - * published value. - * - * @param value value - */ + /// + /// Publish a default value. On reconnect, a default value will never be used + /// in prference to a published value + /// + /// value void SetDefault(ReadOnlySpan value); } diff --git a/src/ntcore/Generated/StringArraySubscriber.cs b/src/ntcore/Generated/StringArraySubscriber.cs index a8c5c9ee..e972d0ab 100644 --- a/src/ntcore/Generated/StringArraySubscriber.cs +++ b/src/ntcore/Generated/StringArraySubscriber.cs @@ -6,73 +6,62 @@ namespace NetworkTables; -/** NetworkTables StringArray subscriber. */ +/// +/// NetworkTables StringArray subscriver. +/// public interface IStringArraySubscriber : ISubscriber { - /** - * Get the corresponding topic. - * - * @return Topic - */ - + /// + /// Gets the corresponding topic. + /// new StringArrayTopic Topic { get; } - /** - * Get the last published value. - * If no value has been published, returns the stored default value. - * - * @return value - */ + /// + /// Get the last published value. + /// If no value has been published, returns the stored default value. + /// + /// value string[] Get(); - /** - * Get the last published value. - * If no value has been published, returns the passed defaultValue. - * - * @param defaultValue default value to return if no value has been published - * @return value - */ + /// + /// Get the last published value. + /// If no value has been published, returns the passed default value. + /// + /// default value to return if no value has been published + /// value string[] Get(string[] defaultValue); - /** - * Get the last published value along with its timestamp - * If no value has been published, returns the stored default value and a - * timestamp of 0. - * - * @return timestamped value - */ + /// + /// Get the last published value along with its timestamp. + /// If no value has been published, returns the stored default value and a timestamp of 0. + /// + /// timestamped value TimestampedObject GetAtomic(); - /** - * Get the last published value along with its timestamp - * If no value has been published, returns the passed defaultValue and a - * timestamp of 0. - * - * @param defaultValue default value to return if no value has been published - * @return timestamped value - */ + /// + /// Get the last published value along with its timestamp. + /// If no value has been published, returns the passed default value and a timestamp of 0. + /// + /// default value to return if no value has been published + /// timestamped value TimestampedObject GetAtomic(string[] defaultValue); - /** - * Get an array of all value changes since the last call to readQueue. - * Also provides a timestamp for each value. - * - *

The "poll storage" subscribe option can be used to set the queue - * depth. - * - * @return Array of timestamped values; empty array if no new changes have - * been published since the previous call. - */ + ///

+ /// Get an array of all value changes since the last call to ReadQueue. + /// Also provides a timestamp for each value. + /// + /// + /// The "poll storage" subscribe option can be used to set the queue depth. + /// Array of timestamped values; emptry if no new changes TimestampedObject[] ReadQueue(); - /** - * Get an array of all value changes since the last call to readQueue. - * - *

The "poll storage" subscribe option can be used to set the queue - * depth. - * - * @return Array of values; empty array if no new changes have been - * published since the previous call. - */ + ///

+ /// Get an array of all value changes since the last call to ReadQueue. + /// + /// + /// The "poll storage" subscribe option can be used to set the queue depth. + /// Array of values; emptry if no new changes string[][] ReadQueueValues(); } diff --git a/src/ntcore/Generated/StringArrayTopic.cs b/src/ntcore/Generated/StringArrayTopic.cs index 7631c116..eb6f9d24 100644 --- a/src/ntcore/Generated/StringArrayTopic.cs +++ b/src/ntcore/Generated/StringArrayTopic.cs @@ -10,48 +10,49 @@ namespace NetworkTables; -/** NetworkTables StringArray topic. */ +/// +/// NetworkTables StringArray topic. +/// public class StringArrayTopic : Topic { - /** The default type string for this topic type. */ + /// + /// The default type string for this topic type + /// public static string kTypeString => "string[]"; + /// + /// The default type string for this topic type in a UTF8 Span + /// public static ReadOnlySpan kTypeStringUtf8 => "string[]"u8; - /** - * Construct from a generic topic. - * - * @param topic Topic - */ - public StringArrayTopic(Topic topic) : base(topic.Instance, topic.Handle) - { - } + /// + /// Constructs a typed topic from a generic topic. + /// + /// typed topic + public StringArrayTopic(Topic topic) : base(topic.Instance, topic.Handle) { } - /** - * Constructor; use NetworkTableInstance.getStringArrayTopic() instead. - * - * @param inst Instance - * @param handle Native handle - */ - public StringArrayTopic(NetworkTableInstance inst, NtTopic handle) : base(inst, handle) - { - } + /// + /// Constructor; use NetworkTableInstance.GetStringArrayTopic() instead. + /// + /// Instance + /// Native handle + public StringArrayTopic(NetworkTableInstance inst, NtTopic handle) : base(inst, handle) { } - /** - * Create a new subscriber to the topic. - * - *

The subscriber is only active as long as the returned object - * is not closed. - * - *

Subscribers that do not match the published data type do not return - * any values. To determine if the data type matches, use the appropriate - * Topic functions. - * - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options subscribe options - * @return subscriber - */ + ///

+ /// Create a new subscriver to the topic. + /// + /// + /// The subscriber is only active as long as the returned object is not closed. + /// + /// Subscribers that do not match the published data type do not return any + /// values. To determine if the data type matches, use the appropriate Topic + /// functions. + /// + /// + /// default value used when a default is not provided to a getter function + /// + /// subscribe options + /// subscriber public IStringArraySubscriber Subscribe( string[] defaultValue, PubSubOptions options) @@ -64,22 +65,22 @@ public IStringArraySubscriber Subscribe( defaultValue); } - /** - * Create a new subscriber to the topic, with specified type string. - * - *

The subscriber is only active as long as the returned object - * is not closed. - * - *

Subscribers that do not match the published data type do not return - * any values. To determine if the data type matches, use the appropriate - * Topic functions. - * - * @param typeString type string - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options subscribe options - * @return subscriber - */ + ///

+ /// Create a new subscriber to the topic, with the specified type string. + /// + /// + /// The subscriber is only active as long as the returned object is not closed. + /// + /// Subscribers that do not match the published data type do not return any + /// values. To determine if the data type matches, use the appropriate Topic + /// functions. + /// + /// type string + /// + /// default value used when a default is not provided to a getter function + /// + /// subscribe options + /// subscriber public IStringArraySubscriber SubscribeEx( string typeString, string[] defaultValue, @@ -93,22 +94,22 @@ public IStringArraySubscriber SubscribeEx( defaultValue); } - /** - * Create a new subscriber to the topic, with specified type string. - * - *

The subscriber is only active as long as the returned object - * is not closed. - * - *

Subscribers that do not match the published data type do not return - * any values. To determine if the data type matches, use the appropriate - * Topic functions. - * - * @param typeString type string - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options subscribe options - * @return subscriber - */ + ///

+ /// Create a new subscriber to the topic, with the specified type string. + /// + /// + /// The subscriber is only active as long as the returned object is not closed. + /// + /// Subscribers that do not match the published data type do not return any + /// values. To determine if the data type matches, use the appropriate Topic + /// functions. + /// + /// type string + /// + /// default value used when a default is not provided to a getter function + /// + /// subscribe options + /// subscriber public IStringArraySubscriber SubscribeEx( ReadOnlySpan typeString, string[] defaultValue, @@ -122,21 +123,20 @@ public IStringArraySubscriber SubscribeEx( defaultValue); } - /** - * Create a new publisher to the topic. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param options publish options - * @return publisher - */ + ///

+ /// Create a new publisher to the topic. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// publish options + /// publisher public IStringArrayPublisher Publish( PubSubOptions options) { @@ -148,22 +148,22 @@ public IStringArrayPublisher Publish( []); } - /** - * Create a new publisher to the topic. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param options publish options - * @return publisher - */ + ///

+ /// Create a new publisher to the topic, with type string and initial properties. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// JSON properties + /// publish options + /// publisher public IStringArrayPublisher PublishEx( string typeString, string properties, PubSubOptions options) @@ -176,24 +176,22 @@ public IStringArrayPublisher PublishEx( []); } - /** - * Create a new publisher to the topic, with type string and initial properties. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param properties JSON properties - * @param options publish options - * @return publisher - * @throws IllegalArgumentException if properties is not a JSON object - */ + ///

+ /// Create a new publisher to the topic, with type string and initial properties. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// JSON properties + /// publish options + /// publisher public IStringArrayPublisher PublishEx( ReadOnlySpan typeString, string properties, @@ -207,24 +205,22 @@ public IStringArrayPublisher PublishEx( []); } - /** - * Create a new publisher to the topic, with type string and initial properties. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param properties JSON properties - * @param options publish options - * @return publisher - * @throws IllegalArgumentException if properties is not a JSON object - */ + ///

+ /// Create a new publisher to the topic, with type string and initial properties. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// JSON properties + /// publish options + /// publisher public IStringArrayPublisher PublishEx( string typeString, ReadOnlySpan properties, @@ -238,24 +234,22 @@ public IStringArrayPublisher PublishEx( []); } - /** - * Create a new publisher to the topic, with type string and initial properties. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param properties JSON properties - * @param options publish options - * @return publisher - * @throws IllegalArgumentException if properties is not a JSON object - */ + ///

+ /// Create a new publisher to the topic, with type string and initial properties. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// JSON properties + /// publish options + /// publisher public IStringArrayPublisher PublishEx( ReadOnlySpan typeString, ReadOnlySpan properties, @@ -269,26 +263,26 @@ public IStringArrayPublisher PublishEx( []); } - /** - * Create a new entry for the topic. - * - *

Entries act as a combination of a subscriber and a weak publisher. The - * subscriber is active as long as the entry is not closed. The publisher is - * created when the entry is first written to, and remains active until either - * unpublish() is called or the entry is closed. - * - *

It is not possible to use two different data types with the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored), and the entry will show no new - * values if the data type does not match. To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options publish and/or subscribe options - * @return entry - */ + ///

+ /// Create a new entry for the topic. + /// + /// + /// Entries act as a combination of a subscriber and a weak publisher. The + /// subscriber is active as long as the entry is not closed. The publisher is + /// created when the entry is first written to, and remains active until either + /// Unpublish() is called or the entry is closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// + /// default value used when a default is not provided to a getter function + /// + /// publish and/or subscribe options + /// entry public IStringArrayEntry GetEntry( string[] defaultValue, PubSubOptions options) @@ -301,27 +295,27 @@ public IStringArrayEntry GetEntry( defaultValue); } - /** - * Create a new entry for the topic, with specified type string. - * - *

Entries act as a combination of a subscriber and a weak publisher. The - * subscriber is active as long as the entry is not closed. The publisher is - * created when the entry is first written to, and remains active until either - * unpublish() is called or the entry is closed. - * - *

It is not possible to use two different data types with the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored), and the entry will show no new - * values if the data type does not match. To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options publish and/or subscribe options - * @return entry - */ + ///

+ /// Create a new entry for the topic, with the specified type string. + /// + /// + /// Entries act as a combination of a subscriber and a weak publisher. The + /// subscriber is active as long as the entry is not closed. The publisher is + /// created when the entry is first written to, and remains active until either + /// Unpublish() is called or the entry is closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// + /// default value used when a default is not provided to a getter function + /// + /// publish and/or subscribe options + /// entry public IStringArrayEntry GetEntryEx( string typeString, string[] defaultValue, @@ -335,27 +329,27 @@ public IStringArrayEntry GetEntryEx( defaultValue); } - /** - * Create a new entry for the topic, with specified type string. - * - *

Entries act as a combination of a subscriber and a weak publisher. The - * subscriber is active as long as the entry is not closed. The publisher is - * created when the entry is first written to, and remains active until either - * unpublish() is called or the entry is closed. - * - *

It is not possible to use two different data types with the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored), and the entry will show no new - * values if the data type does not match. To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options publish and/or subscribe options - * @return entry - */ + ///

+ /// Create a new entry for the topic, with the specified type string. + /// + /// + /// Entries act as a combination of a subscriber and a weak publisher. The + /// subscriber is active as long as the entry is not closed. The publisher is + /// created when the entry is first written to, and remains active until either + /// Unpublish() is called or the entry is closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// + /// default value used when a default is not provided to a getter function + /// + /// publish and/or subscribe options + /// entry public IStringArrayEntry GetEntryEx( ReadOnlySpan typeString, string[] defaultValue, @@ -369,6 +363,4 @@ public IStringArrayEntry GetEntryEx( defaultValue); } - - } diff --git a/src/ntcore/Generated/StringEntry.cs b/src/ntcore/Generated/StringEntry.cs index 6e4c6450..8242c981 100644 --- a/src/ntcore/Generated/StringEntry.cs +++ b/src/ntcore/Generated/StringEntry.cs @@ -6,13 +6,13 @@ namespace NetworkTables; -/** - * NetworkTables String entry. - * - *

Unlike NetworkTableEntry, the entry goes away when close() is called. - */ +///

+/// NetworkTables String entry. +/// public interface IStringEntry : IStringSubscriber, IStringPublisher { - /** Stops publishing the entry if it's published. */ + /// + /// Stops publishing the entry if its published. + /// void Unpublish(); } diff --git a/src/ntcore/Generated/StringEntryImpl.cs b/src/ntcore/Generated/StringEntryImpl.cs index 8b2a8a5b..4ed7483d 100644 --- a/src/ntcore/Generated/StringEntryImpl.cs +++ b/src/ntcore/Generated/StringEntryImpl.cs @@ -10,16 +10,8 @@ namespace NetworkTables; -/** NetworkTables String implementation. */ internal sealed class StringEntryImpl : EntryBase, IStringEntry where T : struct, INtEntryHandle { - /** - * Constructor. - * - * @param topic Topic - * @param handle Native handle - * @param defaultValue Default value for Get() - */ internal StringEntryImpl(StringTopic topic, T handle, string defaultValue) : base(handle) { Topic = topic; @@ -28,7 +20,6 @@ internal StringEntryImpl(StringTopic topic, T handle, string defaultValue) : bas public override StringTopic Topic { get; } - public string Get() { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -39,7 +30,6 @@ public string Get() return m_defaultValue; } - public string Get(string defaultValue) { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -50,7 +40,6 @@ public string Get(string defaultValue) return defaultValue; } - public TimestampedObject GetAtomic() { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -58,7 +47,6 @@ public TimestampedObject GetAtomic() return new TimestampedObject(value.Time, value.ServerTime, baseValue); } - public TimestampedObject GetAtomic(string defaultValue) { NetworkTableValue value = NtCore.GetEntryValue(Handle); @@ -66,7 +54,6 @@ public TimestampedObject GetAtomic(string defaultValue) return new TimestampedObject(value.Time, value.ServerTime, baseValue); } - public TimestampedObject[] ReadQueue() { NetworkTableValue[] values = NtCore.ReadQueueValue(Handle); @@ -78,7 +65,6 @@ public TimestampedObject[] ReadQueue() return timestamped; } - public string[] ReadQueueValues() { NetworkTableValue[] values = NtCore.ReadQueueValue(Handle); @@ -108,16 +94,11 @@ public void SetDefault(string value) RefNetworkTableValue ntValue = RefNetworkTableValue.MakeString(value); NtCore.SetDefaultEntryValue(Handle, ntValue); } + public void Unpublish() { NtCore.Unpublish(Handle); } - public void Set(ReadOnlySpan value) - { - RefNetworkTableValue ntValue = RefNetworkTableValue.MakeString(value, 0); - NtCore.SetEntryValue(Handle, ntValue); - } - private readonly string m_defaultValue; } diff --git a/src/ntcore/Generated/StringPublisher.cs b/src/ntcore/Generated/StringPublisher.cs index e84918d7..7b44157b 100644 --- a/src/ntcore/Generated/StringPublisher.cs +++ b/src/ntcore/Generated/StringPublisher.cs @@ -8,41 +8,34 @@ namespace NetworkTables; -/** NetworkTables String publisher. */ +/// +/// NetworkTables String publisher. +/// public interface IStringPublisher : IPublisher { - /** - * Get the corresponding topic. - * - * @return Topic - */ - + /// + /// Gets the corresponding topic. + /// new StringTopic Topic { get; } - /** - * Publish a new value using current NT time. - * - * @param value value to publish - */ + /// + /// Publish a new value using the current NT time. + /// + /// value to publish void Set(string value); - void Set(ReadOnlySpan value); - - /** - * Publish a new value. - * - * @param value value to publish - * @param time timestamp; 0 indicates current NT time should be used - */ + /// + /// Publish a new value. + /// + /// value to publish + /// timestamp; 0 indicates current NT time should be used void Set(string value, long time); - /** - * Publish a default value. - * On reconnect, a default value will never be used in preference to a - * published value. - * - * @param value value - */ + /// + /// Publish a default value. On reconnect, a default value will never be used + /// in prference to a published value + /// + /// value void SetDefault(string value); } diff --git a/src/ntcore/Generated/StringSubscriber.cs b/src/ntcore/Generated/StringSubscriber.cs index ca22b2b3..783d6a5b 100644 --- a/src/ntcore/Generated/StringSubscriber.cs +++ b/src/ntcore/Generated/StringSubscriber.cs @@ -6,73 +6,62 @@ namespace NetworkTables; -/** NetworkTables String subscriber. */ +/// +/// NetworkTables String subscriver. +/// public interface IStringSubscriber : ISubscriber { - /** - * Get the corresponding topic. - * - * @return Topic - */ - + /// + /// Gets the corresponding topic. + /// new StringTopic Topic { get; } - /** - * Get the last published value. - * If no value has been published, returns the stored default value. - * - * @return value - */ + /// + /// Get the last published value. + /// If no value has been published, returns the stored default value. + /// + /// value string Get(); - /** - * Get the last published value. - * If no value has been published, returns the passed defaultValue. - * - * @param defaultValue default value to return if no value has been published - * @return value - */ + /// + /// Get the last published value. + /// If no value has been published, returns the passed default value. + /// + /// default value to return if no value has been published + /// value string Get(string defaultValue); - /** - * Get the last published value along with its timestamp - * If no value has been published, returns the stored default value and a - * timestamp of 0. - * - * @return timestamped value - */ + /// + /// Get the last published value along with its timestamp. + /// If no value has been published, returns the stored default value and a timestamp of 0. + /// + /// timestamped value TimestampedObject GetAtomic(); - /** - * Get the last published value along with its timestamp - * If no value has been published, returns the passed defaultValue and a - * timestamp of 0. - * - * @param defaultValue default value to return if no value has been published - * @return timestamped value - */ + /// + /// Get the last published value along with its timestamp. + /// If no value has been published, returns the passed default value and a timestamp of 0. + /// + /// default value to return if no value has been published + /// timestamped value TimestampedObject GetAtomic(string defaultValue); - /** - * Get an array of all value changes since the last call to readQueue. - * Also provides a timestamp for each value. - * - *

The "poll storage" subscribe option can be used to set the queue - * depth. - * - * @return Array of timestamped values; empty array if no new changes have - * been published since the previous call. - */ + ///

+ /// Get an array of all value changes since the last call to ReadQueue. + /// Also provides a timestamp for each value. + /// + /// + /// The "poll storage" subscribe option can be used to set the queue depth. + /// Array of timestamped values; emptry if no new changes TimestampedObject[] ReadQueue(); - /** - * Get an array of all value changes since the last call to readQueue. - * - *

The "poll storage" subscribe option can be used to set the queue - * depth. - * - * @return Array of values; empty array if no new changes have been - * published since the previous call. - */ + ///

+ /// Get an array of all value changes since the last call to ReadQueue. + /// + /// + /// The "poll storage" subscribe option can be used to set the queue depth. + /// Array of values; emptry if no new changes string[] ReadQueueValues(); } diff --git a/src/ntcore/Generated/StringTopic.cs b/src/ntcore/Generated/StringTopic.cs index c65e5aad..e50f4c6f 100644 --- a/src/ntcore/Generated/StringTopic.cs +++ b/src/ntcore/Generated/StringTopic.cs @@ -10,48 +10,49 @@ namespace NetworkTables; -/** NetworkTables String topic. */ +/// +/// NetworkTables String topic. +/// public class StringTopic : Topic { - /** The default type string for this topic type. */ + /// + /// The default type string for this topic type + /// public static string kTypeString => "string"; + /// + /// The default type string for this topic type in a UTF8 Span + /// public static ReadOnlySpan kTypeStringUtf8 => "string"u8; - /** - * Construct from a generic topic. - * - * @param topic Topic - */ - public StringTopic(Topic topic) : base(topic.Instance, topic.Handle) - { - } + /// + /// Constructs a typed topic from a generic topic. + /// + /// typed topic + public StringTopic(Topic topic) : base(topic.Instance, topic.Handle) { } - /** - * Constructor; use NetworkTableInstance.getStringTopic() instead. - * - * @param inst Instance - * @param handle Native handle - */ - public StringTopic(NetworkTableInstance inst, NtTopic handle) : base(inst, handle) - { - } + /// + /// Constructor; use NetworkTableInstance.GetStringTopic() instead. + /// + /// Instance + /// Native handle + public StringTopic(NetworkTableInstance inst, NtTopic handle) : base(inst, handle) { } - /** - * Create a new subscriber to the topic. - * - *

The subscriber is only active as long as the returned object - * is not closed. - * - *

Subscribers that do not match the published data type do not return - * any values. To determine if the data type matches, use the appropriate - * Topic functions. - * - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options subscribe options - * @return subscriber - */ + ///

+ /// Create a new subscriver to the topic. + /// + /// + /// The subscriber is only active as long as the returned object is not closed. + /// + /// Subscribers that do not match the published data type do not return any + /// values. To determine if the data type matches, use the appropriate Topic + /// functions. + /// + /// + /// default value used when a default is not provided to a getter function + /// + /// subscribe options + /// subscriber public IStringSubscriber Subscribe( string defaultValue, PubSubOptions options) @@ -64,22 +65,22 @@ public IStringSubscriber Subscribe( defaultValue); } - /** - * Create a new subscriber to the topic, with specified type string. - * - *

The subscriber is only active as long as the returned object - * is not closed. - * - *

Subscribers that do not match the published data type do not return - * any values. To determine if the data type matches, use the appropriate - * Topic functions. - * - * @param typeString type string - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options subscribe options - * @return subscriber - */ + ///

+ /// Create a new subscriber to the topic, with the specified type string. + /// + /// + /// The subscriber is only active as long as the returned object is not closed. + /// + /// Subscribers that do not match the published data type do not return any + /// values. To determine if the data type matches, use the appropriate Topic + /// functions. + /// + /// type string + /// + /// default value used when a default is not provided to a getter function + /// + /// subscribe options + /// subscriber public IStringSubscriber SubscribeEx( string typeString, string defaultValue, @@ -93,22 +94,22 @@ public IStringSubscriber SubscribeEx( defaultValue); } - /** - * Create a new subscriber to the topic, with specified type string. - * - *

The subscriber is only active as long as the returned object - * is not closed. - * - *

Subscribers that do not match the published data type do not return - * any values. To determine if the data type matches, use the appropriate - * Topic functions. - * - * @param typeString type string - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options subscribe options - * @return subscriber - */ + ///

+ /// Create a new subscriber to the topic, with the specified type string. + /// + /// + /// The subscriber is only active as long as the returned object is not closed. + /// + /// Subscribers that do not match the published data type do not return any + /// values. To determine if the data type matches, use the appropriate Topic + /// functions. + /// + /// type string + /// + /// default value used when a default is not provided to a getter function + /// + /// subscribe options + /// subscriber public IStringSubscriber SubscribeEx( ReadOnlySpan typeString, string defaultValue, @@ -122,21 +123,20 @@ public IStringSubscriber SubscribeEx( defaultValue); } - /** - * Create a new publisher to the topic. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param options publish options - * @return publisher - */ + ///

+ /// Create a new publisher to the topic. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// publish options + /// publisher public IStringPublisher Publish( PubSubOptions options) { @@ -148,22 +148,22 @@ public IStringPublisher Publish( ""); } - /** - * Create a new publisher to the topic. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param options publish options - * @return publisher - */ + ///

+ /// Create a new publisher to the topic, with type string and initial properties. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// JSON properties + /// publish options + /// publisher public IStringPublisher PublishEx( string typeString, string properties, PubSubOptions options) @@ -176,24 +176,22 @@ public IStringPublisher PublishEx( ""); } - /** - * Create a new publisher to the topic, with type string and initial properties. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param properties JSON properties - * @param options publish options - * @return publisher - * @throws IllegalArgumentException if properties is not a JSON object - */ + ///

+ /// Create a new publisher to the topic, with type string and initial properties. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// JSON properties + /// publish options + /// publisher public IStringPublisher PublishEx( ReadOnlySpan typeString, string properties, @@ -207,24 +205,22 @@ public IStringPublisher PublishEx( ""); } - /** - * Create a new publisher to the topic, with type string and initial properties. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param properties JSON properties - * @param options publish options - * @return publisher - * @throws IllegalArgumentException if properties is not a JSON object - */ + ///

+ /// Create a new publisher to the topic, with type string and initial properties. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// JSON properties + /// publish options + /// publisher public IStringPublisher PublishEx( string typeString, ReadOnlySpan properties, @@ -238,24 +234,22 @@ public IStringPublisher PublishEx( ""); } - /** - * Create a new publisher to the topic, with type string and initial properties. - * - *

The publisher is only active as long as the returned object - * is not closed. - * - *

It is not possible to publish two different data types to the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored). To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param properties JSON properties - * @param options publish options - * @return publisher - * @throws IllegalArgumentException if properties is not a JSON object - */ + ///

+ /// Create a new publisher to the topic, with type string and initial properties. + /// + /// + /// The publisher is only active as long as the returned object is not closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// JSON properties + /// publish options + /// publisher public IStringPublisher PublishEx( ReadOnlySpan typeString, ReadOnlySpan properties, @@ -269,26 +263,26 @@ public IStringPublisher PublishEx( ""); } - /** - * Create a new entry for the topic. - * - *

Entries act as a combination of a subscriber and a weak publisher. The - * subscriber is active as long as the entry is not closed. The publisher is - * created when the entry is first written to, and remains active until either - * unpublish() is called or the entry is closed. - * - *

It is not possible to use two different data types with the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored), and the entry will show no new - * values if the data type does not match. To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options publish and/or subscribe options - * @return entry - */ + ///

+ /// Create a new entry for the topic. + /// + /// + /// Entries act as a combination of a subscriber and a weak publisher. The + /// subscriber is active as long as the entry is not closed. The publisher is + /// created when the entry is first written to, and remains active until either + /// Unpublish() is called or the entry is closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// + /// default value used when a default is not provided to a getter function + /// + /// publish and/or subscribe options + /// entry public IStringEntry GetEntry( string defaultValue, PubSubOptions options) @@ -301,27 +295,27 @@ public IStringEntry GetEntry( defaultValue); } - /** - * Create a new entry for the topic, with specified type string. - * - *

Entries act as a combination of a subscriber and a weak publisher. The - * subscriber is active as long as the entry is not closed. The publisher is - * created when the entry is first written to, and remains active until either - * unpublish() is called or the entry is closed. - * - *

It is not possible to use two different data types with the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored), and the entry will show no new - * values if the data type does not match. To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options publish and/or subscribe options - * @return entry - */ + ///

+ /// Create a new entry for the topic, with the specified type string. + /// + /// + /// Entries act as a combination of a subscriber and a weak publisher. The + /// subscriber is active as long as the entry is not closed. The publisher is + /// created when the entry is first written to, and remains active until either + /// Unpublish() is called or the entry is closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// + /// default value used when a default is not provided to a getter function + /// + /// publish and/or subscribe options + /// entry public IStringEntry GetEntryEx( string typeString, string defaultValue, @@ -335,27 +329,27 @@ public IStringEntry GetEntryEx( defaultValue); } - /** - * Create a new entry for the topic, with specified type string. - * - *

Entries act as a combination of a subscriber and a weak publisher. The - * subscriber is active as long as the entry is not closed. The publisher is - * created when the entry is first written to, and remains active until either - * unpublish() is called or the entry is closed. - * - *

It is not possible to use two different data types with the same - * topic. Conflicts between publishers are typically resolved by the server on - * a first-come, first-served basis. Any published values that do not match - * the topic's data type are dropped (ignored), and the entry will show no new - * values if the data type does not match. To determine if the data type - * matches, use the appropriate Topic functions. - * - * @param typeString type string - * @param defaultValue default value used when a default is not provided to a - * getter function - * @param options publish and/or subscribe options - * @return entry - */ + ///

+ /// Create a new entry for the topic, with the specified type string. + /// + /// + /// Entries act as a combination of a subscriber and a weak publisher. The + /// subscriber is active as long as the entry is not closed. The publisher is + /// created when the entry is first written to, and remains active until either + /// Unpublish() is called or the entry is closed. + /// + /// It is not possible to publish two different data types to the same topic. + /// Conflicts between publishers are typically resolved by the server on a + /// first-come, first-served basis. Any published values that do not match + /// the topic's data type are dropped (ignored). To determine if the data + /// type matches, use tha appropriate Topic functions. + /// + /// type string + /// + /// default value used when a default is not provided to a getter function + /// + /// publish and/or subscribe options + /// entry public IStringEntry GetEntryEx( ReadOnlySpan typeString, string defaultValue, @@ -369,6 +363,4 @@ public IStringEntry GetEntryEx( defaultValue); } - - }