54 lines
1.5 KiB
C#
54 lines
1.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace SafeMobileLib.Tetra
|
|
{
|
|
public sealed class DestinationType
|
|
{
|
|
private readonly String name;
|
|
private readonly String description;
|
|
private readonly int value;
|
|
|
|
public static readonly DestinationType SNA = new DestinationType(0, "SNA", "only valid in TMO");
|
|
public static readonly DestinationType SSI = new DestinationType(1, "SSI", "default for TMO and DMO");
|
|
public static readonly DestinationType TSI = new DestinationType(2, "TSI", "only valid in DMO for inter-MNI SDS");
|
|
|
|
private DestinationType(int value, String name, String description)
|
|
{
|
|
this.name = name;
|
|
this.description = description;
|
|
this.value = value;
|
|
}
|
|
|
|
public override String ToString()
|
|
{
|
|
return name;
|
|
}
|
|
|
|
public String GetDescription()
|
|
{
|
|
return description;
|
|
}
|
|
|
|
public static DestinationType GetDestinationType(string destinationType)
|
|
{
|
|
switch (destinationType)
|
|
{
|
|
case "SNA": return SNA;
|
|
case "SSI": return SSI;
|
|
case "TSI": return TSI;
|
|
default: return SNA;
|
|
}
|
|
|
|
}
|
|
|
|
public static implicit operator int(DestinationType d)
|
|
{
|
|
return d.value;
|
|
}
|
|
}
|
|
}
|