- Extended CJMS11 camera handling with new functionalities, including image grabbing, resolution configuration, and improved ROI support. - Added new `ToString` method implementations for enhanced debugging and logging in key classes like `JmsMessage`, `JmsPacket`, and `RoiCfg`. - Introduced additional commands (`start_stream_images`, `stop_stream_images`) in `CommandM` and its enum. - Implemented new resolution handling in `RoiCfg` with support for configurable image frames. - Refactored resolution-related UI elements in `RoiCfgCtrl` to add a dropdown for selecting resolution. - Made minor UX improvements by replacing inconsistent string formats with verbatim strings in console messages. - Updated project dependencies with new resolution-related utilities (`Frame` and `ResolutionFrames`). - Resolved camera-specific symbolic issues by transitioning to `CJMS11.Camera` over prior naming inconsistencies.
151 lines
3.3 KiB
C#
151 lines
3.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Drawing;
|
|
using TBF.Rig.Network.Camera.CJMS11;
|
|
|
|
namespace TBF.Rig.Network.Telnet
|
|
{
|
|
/// <summary>
|
|
/// Type of argument of MeasuredDataEventHandler
|
|
/// </summary>
|
|
public class MeasuredDataEventArgs : EventArgs
|
|
{
|
|
public string MeasuredData; /// Fatal error description messages.
|
|
|
|
public MeasuredDataEventArgs(string measuredData)
|
|
{
|
|
MeasuredData = measuredData;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// Type of argument of FatalEventHandler
|
|
/// </summary>
|
|
public class FatalEventArgs : EventArgs
|
|
{
|
|
public string FatalErrorText; /// Fatal error description messages.
|
|
|
|
public FatalEventArgs(string text)
|
|
{
|
|
FatalErrorText = text;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// Type of argument of NotificationEventHandler
|
|
/// </summary>
|
|
public class NotificationEventArgs : EventArgs
|
|
{
|
|
public string NotificationText; /// String identifying this notification more closely.
|
|
|
|
public NotificationEventArgs(string text)
|
|
{
|
|
NotificationText = text;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// Type of argument of PromptReceviedEventHandler
|
|
/// </summary>
|
|
public class PromptReceivedEventArgs : EventArgs
|
|
{
|
|
public string Response; /// Response to a command from the telnet server ...
|
|
/// ... without the terminal prompt string.
|
|
|
|
public PromptReceivedEventArgs(string text)
|
|
{
|
|
Response = text;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Type of argument of PromptReceviedEventHandler
|
|
/// </summary>
|
|
public class PromptReceivedJMSEventArgs : EventArgs
|
|
{
|
|
public string Response; /// Response to a command from the telnet server ...
|
|
/// ... without the terminal prompt string.
|
|
public JmsMessage Message; /// Message received from the server.
|
|
|
|
public PromptReceivedJMSEventArgs(string text, JmsMessage message)
|
|
{
|
|
Response = text;
|
|
Message = message;
|
|
}
|
|
}
|
|
|
|
public class PromptReceivedImageEventArgs : EventArgs
|
|
{
|
|
public Image image; /// server image.
|
|
public int idxCamera; /// camera index.
|
|
|
|
public PromptReceivedImageEventArgs(int idxCamera, Image image)
|
|
{
|
|
this.image = image;
|
|
this.idxCamera = idxCamera;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// Type of argument of VtTextChangedEventHandler
|
|
/// </summary>
|
|
public class VtTextChangedEventArgs : EventArgs
|
|
{
|
|
public string VtText; // Virtual terminal text.
|
|
|
|
public VtTextChangedEventArgs(string text)
|
|
{
|
|
VtText = text;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// Used as a part of AuxBrdUpgItemMessage
|
|
/// </summary>
|
|
public enum Category
|
|
{
|
|
Error,
|
|
Warning,
|
|
Success,
|
|
}
|
|
/// <summary>
|
|
/// A pair containing Aux Board Upgrade item identification and a message
|
|
/// (fatal error, error, warning or success message).
|
|
/// </summary>
|
|
public class AuxBrdUpgItemMessage
|
|
{
|
|
public Category Category; /// Error, Warning or Success
|
|
public string Label; /// Identifies the aux.board upgrade item
|
|
public string Message; /// The message
|
|
|
|
public AuxBrdUpgItemMessage(Category category, string label, string message)
|
|
{
|
|
Category = category;
|
|
Label = label;
|
|
Message = message;
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Type of argument of SummaryEventArgs
|
|
/// </summary>
|
|
public class SummaryEventArgs : EventArgs
|
|
{
|
|
public IList<AuxBrdUpgItemMessage> SummaryMessages; /// Event description messages.
|
|
|
|
public SummaryEventArgs(IList<AuxBrdUpgItemMessage> summaryMessages)
|
|
{
|
|
this.SummaryMessages = summaryMessages;
|
|
}
|
|
}
|
|
}
|