using Sick.SafetyScanners.Cola2.Commands;
using Sick.SafetyScanners.Types;
namespace Sick.SafetyScanners.Interfaces;
///
/// Interface cho COLA2 session management
///
public interface ICola2Session : IDisposable
{
///
/// Gets the current session ID, if available
///
uint? SessionId { get; }
///
/// Indicates whether a COLA2 session is currently opened
///
bool IsOpen { get; }
///
/// Opens a COLA2 session
///
void Open();
///
/// Closes the current COLA2 session
///
void Close();
///
/// Sends a COLA2 command to the sensor and waits for response
///
/// The command to send
/// The timeout for the operation
void SendCommand(ICola2Command command, TimeDuration? timeout = null);
///
/// Gets the next request ID (thread-safe, auto-increments)
///
ushort GetNextRequestId();
}