namespace Sick.SafetyScanners.Cola2.Commands; /// /// Base interface for all COLA2 commands /// public interface ICola2Command { /// /// Command type (e.g., 'R' for Read, 'W' for Write, 'O' for Method) /// byte CommandType { get; } /// /// Command mode (e.g., 'I' for Index, 'N' for Name) /// byte CommandMode { get; } /// /// Session ID (set by Cola2Session) /// uint SessionId { get; set; } /// /// Request ID (set by Cola2Session) /// ushort RequestId { get; set; } /// /// Indicates if the command was successfully executed /// bool WasSuccessful { get; } /// /// Gets the data vector for the command payload /// ReadOnlyMemory GetDataVector(); /// /// Processes the reply from the sensor /// /// The reply data from the sensor bool ProcessReply(ReadOnlyMemory replyData, byte replyCommandType, byte replyCommandMode); /// /// Indicates if the command can be executed without a session ID /// bool CanBeExecutedWithoutSessionId { get; } }