-
-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathShdrQueueAdapter.cs
27 lines (21 loc) · 1006 Bytes
/
ShdrQueueAdapter.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Copyright (c) 2024 TrakHound Inc., All Rights Reserved.
// TrakHound Inc. licenses this file to you under the MIT license.
using MTConnect.Configurations;
namespace MTConnect.Adapters
{
/// <summary>
/// An Adapter class for communicating with an MTConnect Agent using the SHDR protocol.
/// Supports multiple concurrent Agent connections.
/// Uses a queue to collect changes to Observations and sends all of the buffered items on demand
/// </summary>
public class ShdrQueueAdapter : ShdrAdapter
{
public ShdrQueueAdapter(int port = 7878, int heartbeat = 10000) : base(port, heartbeat, null, true) { }
public ShdrQueueAdapter(string deviceKey, int port = 7878, int heartbeat = 10000) : base(deviceKey, port, heartbeat, null, true) { }
public ShdrQueueAdapter(ShdrAdapterClientConfiguration configuration) : base(configuration, null, true) { }
public bool SendBuffer()
{
return Adapter.SendBuffer();
}
}
}