Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 17 additions & 13 deletions src/Gemstone.Timeseries/Adapters/AdapterProtocolAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,26 +121,30 @@ public class AdapterProtocolAttribute : Attribute
public string[] LockedPhasorFields { get; }

/// <summary>
/// Creates a new instance of the <see cref="AdapterProtocolAttribute"/> class.
/// </summary>
/// <param name="acronym">Acronym for the adapter protocol.</param>
/// <param name="name">Name of the adapter protocol.</param>
/// <param name="type">Type of the adapter protocol.</param>
/// <param name="visibility">UI Visibility of the protocol.</param>
/// <param name="supportsConnectionTest">Determines if the adapter protocol supports a connection test.</param>
/// <param name="loadOrder">Load order of the adapter protocol.</param>
/// <param name="applications">Applications that support this protocol in the UI.</param>
/// Initializes a new instance of the <see cref="AdapterProtocolAttribute"/> class with the specified parameters.
/// </summary>
/// <param name="acronym">The unique acronym representing the adapter protocol.</param>
/// <param name="name">The display name of the adapter protocol.</param>
/// <param name="type">The type of the adapter protocol, indicating its purpose (e.g., <see cref="ProtocolType.Frame"/> or <see cref="ProtocolType.Measurement"/>).</param>
/// <param name="visibility">The visibility of the protocol in the user interface, defined by <see cref="UIVisibility"/>.</param>
/// <param name="supportsConnectionTest">A value indicating whether the adapter protocol supports connection testing. Defaults to <c>true</c>.</param>
/// <param name="loadOrder">The load order of the adapter protocol, used to determine initialization sequence. Defaults to <c>0</c>.</param>
/// <param name="applications">An array of <see cref="Application"/> values specifying the applications that support this protocol in the user interface. Defaults to a predefined set of applications.</param>
/// <param name="lockedDeviceFields">An array of field names that are locked for device configuration. Defaults to an empty array if not specified.</param>
/// <param name="lockedMeasurementFields">An array of field names that are locked for measurement configuration. Defaults to an empty array if not specified.</param>
/// <param name="lockedPhasorFields">An array of field names that are locked for phasor configuration. Defaults to an empty array if not specified.</param>
/// <exception cref="ArgumentException">Thrown when <paramref name="acronym"/> or <paramref name="name"/> is <c>null</c>, empty, or consists only of white-space characters.</exception>
public AdapterProtocolAttribute(
string acronym,
string name,
ProtocolType type,
UIVisibility visibility,
bool supportsConnectionTest = true,
int loadOrder = 0,
Application[] applications = null,
string[] lockedDeviceFields = null,
string[] lockedMeasurementFields = null,
string[] lockedPhasorFields = null)
Application[]? applications = null,
string[]? lockedDeviceFields = null,
string[]? lockedMeasurementFields = null,
string[]? lockedPhasorFields = null)
{
ArgumentException.ThrowIfNullOrWhiteSpace(acronym);
ArgumentException.ThrowIfNullOrWhiteSpace(name);
Expand Down
31 changes: 31 additions & 0 deletions src/Gemstone.Timeseries/BufferBlockMeasurement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,36 @@ public BufferBlockMeasurement(byte[] buffer, int startIndex, int length)
/// </summary>
public int Length { get; }

/// <summary>
/// Gets or sets a value indicating whether reception of this buffer block must be acknowledged
/// by the subscriber with a <c>ConfirmBufferBlock</c> command.
/// </summary>
/// <remarks>
/// <para>
/// Maps to IEEE Std 2664-2024 Table 8 bit <c>0x01</c> (REQUIRE CONFIRMATION) on the wire.
/// Default value is <c>true</c>, preserving STTP's traditional retransmission semantics where
/// the publisher caches each buffer block until acknowledged and retransmits on timeout.
/// </para>
/// <para>
/// When set to <c>false</c>, the buffer block is fire-and-forget: no retransmission cache entry
/// is added, the retransmission timer is not (re)started, and the subscriber does not emit a
/// confirmation. Useful for high-rate buffer-block streams over reliable transports (TCP)
/// where the round-trip acknowledgement overhead is unnecessary.
/// </para>
/// </remarks>
public bool RequireConfirmation { get; set; } = true;

/// <summary>
/// Gets or sets the raw buffer-block flag byte as it appeared on the wire (IEEE Std 2664-2024
/// Table 8). On receive, this carries the publisher's full intent (REQUIRE CONFIRMATION,
/// COMPRESSED, CACHE INDEX, etc.); on send, this field is unused by the wire codec - the codec
/// constructs the byte from <see cref="RequireConfirmation"/> and other per-block state.
/// </summary>
/// <remarks>
/// Stored as a raw <see cref="byte"/> so this assembly need not take a dependency on the STTP
/// flag enum. Cast to <c>BufferBlockFlags</c> at the call site if structured inspection is needed.
/// </remarks>
public byte Flags { get; set; }

#endregion
}
Loading