Initial commit
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
using Sick.SafetyScanners.Cola2.Commands;
|
||||
using Sick.SafetyScanners.Types;
|
||||
|
||||
namespace Sick.SafetyScanners.Interfaces;
|
||||
|
||||
/// <summary>
|
||||
/// Interface cho COLA2 session management
|
||||
/// </summary>
|
||||
public interface ICola2Session : IDisposable
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the current session ID, if available
|
||||
/// </summary>
|
||||
uint? SessionId { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates whether a COLA2 session is currently opened
|
||||
/// </summary>
|
||||
bool IsOpen { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Opens a COLA2 session
|
||||
/// </summary>
|
||||
void Open();
|
||||
|
||||
/// <summary>
|
||||
/// Closes the current COLA2 session
|
||||
/// </summary>
|
||||
void Close();
|
||||
|
||||
/// <summary>
|
||||
/// Sends a COLA2 command to the sensor and waits for response
|
||||
/// </summary>
|
||||
/// <param name="command">The command to send</param>
|
||||
/// <param name="timeout">The timeout for the operation</param>
|
||||
void SendCommand(ICola2Command command, TimeDuration? timeout = null);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the next request ID (thread-safe, auto-increments)
|
||||
/// </summary>
|
||||
ushort GetNextRequestId();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user