// Copyright (c) 2012-2021 fo-dicom contributors.
// Licensed under the Microsoft Public License (MS-PL).
using System;
namespace FellowOakDicom.Samples.Printing
{
public class Printer : DicomDataset
{
#region Properties and Attributes
public string PrinterAet { get; private set; }
///
/// Printer device status
///
///
/// Enumerated values:
///
/// - NORMAL
/// - WARNING
/// - FAILURE
///
///
public string PrinterStatus
{
get => GetSingleValueOrDefault(DicomTag.PrinterStatus, "NORMAL");
private set => Add(DicomTag.PrinterStatus, value);
}
///
/// Additional information about printer status (2110,0020)
///
///
/// Defined terms when the printer status is equal to NORMAL: NORMAL
/// See section C.13.9.1 for defined terms when the printer status is equal to WARNING or FAILURE
///
public string PrinterStatusInfo
{
get => GetSingleValueOrDefault(DicomTag.PrinterStatusInfo, "NORMAL");
private set => Add(DicomTag.PrinterStatusInfo, value);
}
///
/// User defined name identifying the printer
///
public string PrinterName
{
get => GetSingleValueOrDefault(DicomTag.PrinterName, string.Empty);
private set => Add(DicomTag.PrinterName, value);
}
///
/// Manufacturer of the printer
///
public string Manufacturer
{
get => GetSingleValueOrDefault(DicomTag.Manufacturer, "Nebras Technology");
private set => Add(DicomTag.Manufacturer, value);
}
///
/// Manufacturer's model number of the printer
///
public string ManufacturerModelName
{
get => GetSingleValueOrDefault(DicomTag.ManufacturerModelName, "PaXtreme Printer");
private set => Add(DicomTag.ManufacturerModelName, value);
}
///
/// Manufacturer's serial number of the printer
///
public string DeviceSerialNumber
{
get => GetSingleValueOrDefault(DicomTag.DeviceSerialNumber, string.Empty);
private set => Add(DicomTag.DeviceSerialNumber, value);
}
///
/// Manufacturer's designation of software version of the printer
///
public string SoftwareVersions
{
get => GetSingleValueOrDefault(DicomTag.SoftwareVersions, string.Empty);
private set => Add(DicomTag.SoftwareVersions, value);
}
///
/// Date and Time when the printer was last calibrated
///
public DateTime DateTimeOfLastCalibration
{
get => this.GetDateTime(DicomTag.DateOfLastCalibration, DicomTag.TimeOfLastCalibration);
private set
{
Add(DicomTag.DateOfLastCalibration, value);
Add(DicomTag.TimeOfLastCalibration, value);
}
}
#endregion
#region Constructors and Initialization
///
///
///
///
public Printer(string aet)
{
PrinterAet = aet;
DateTimeOfLastCalibration = DateTime.Now;
PrinterStatus = "NORMAL";
PrinterStatusInfo = "NORMAL";
}
#endregion
}
}