using System;
namespace Wayne.ForecourtControl
{
///
/// Event argument for an Alarm event.
///
public sealed class AlarmEventArgs : EventArgs, Wayne.ForecourtControl.Com.IAlarmEventArgs
{
#region Fields
int deviceId;
int deviceType;
int alarmCode;
int alarmCategory;
string debugText;
#endregion
#region Construction
///
/// Initializes a new instance of the AlarmEventArgs class.
///
/// Device id for the device that the alarm is about
/// Type of device
/// Alarm code.
/// Category of the alarm.
/// Debug text.
public AlarmEventArgs(int deviceId, int deviceType, int alarmCode, int alarmCategory, string debugText)
{
this.deviceId = deviceId;
this.deviceType = deviceType;
this.alarmCode = alarmCode;
this.alarmCategory = alarmCategory;
this.debugText = debugText;
}
#endregion
#region Properties
///
/// Device id for the device that the alarm was about.
///
public int DeviceId
{
get { return deviceId; }
}
///
/// Type of device.
///
public int DeviceType
{
get { return deviceType; }
set { deviceType = value; }
}
///
/// Alarm code.
///
public int AlarmCode
{
get { return alarmCode; }
set { alarmCode = value; }
}
///
/// Category of the alarm
///
public int AlarmCategory
{
get { return alarmCategory; }
set { alarmCategory = value; }
}
///
/// Debug text for the alarm.
///
public string DebugText
{
get { return debugText; }
set { debugText = value; }
}
#endregion
#region Methods
///
/// ToString
///
///
public override string ToString()
{
return string.Format(System.Globalization.CultureInfo.InvariantCulture, "AlarmEventArgs(DeviceId={0},DeviceType={1},AlarmCode={2},AlarmCategory={3},DebugText={4})", deviceId, deviceType, alarmCode, alarmCategory, debugText);
}
#endregion
}
}