2020-05-17 18:27:55 -06:00
|
|
|
|
using System;
|
2019-07-29 15:24:10 -06:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace KFDtool.P25.TransferConstructs
|
|
|
|
|
{
|
|
|
|
|
public class Interact
|
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
public static string ReadAdapterProtocolVersion(BaseDevice device)
|
2019-07-29 15:24:10 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
if (device.DeviceType == BaseDevice.DeviceTypeOptions.TwiKfdtool)
|
2019-07-29 15:24:10 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
return InteractTwiKfdtool.ReadAdapterProtocolVersion(device);
|
2019-07-29 15:24:10 -06:00
|
|
|
|
}
|
2020-05-17 18:27:55 -06:00
|
|
|
|
else
|
2019-07-29 15:24:10 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
throw new Exception(string.Format("The device type {0} does not support ReadAdapterProtocolVersion", device.DeviceType.ToString()));
|
2019-07-29 15:24:10 -06:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-05-17 18:27:55 -06:00
|
|
|
|
public static string ReadFirmwareVersion(BaseDevice device)
|
2019-07-29 15:24:10 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
if (device.DeviceType == BaseDevice.DeviceTypeOptions.TwiKfdtool)
|
2019-07-29 15:24:10 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
return InteractTwiKfdtool.ReadFirmwareVersion(device);
|
2019-07-29 15:24:10 -06:00
|
|
|
|
}
|
2020-05-17 18:27:55 -06:00
|
|
|
|
else
|
2019-07-29 15:24:10 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
throw new Exception(string.Format("The device type {0} does not support ReadFirmwareVersion", device.DeviceType.ToString()));
|
2019-07-29 15:24:10 -06:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-05-17 18:27:55 -06:00
|
|
|
|
public static string ReadUniqueId(BaseDevice device)
|
2019-07-29 15:24:10 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
if (device.DeviceType == BaseDevice.DeviceTypeOptions.TwiKfdtool)
|
2019-07-29 15:24:10 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
return InteractTwiKfdtool.ReadUniqueId(device);
|
2019-07-29 15:24:10 -06:00
|
|
|
|
}
|
2020-05-17 18:27:55 -06:00
|
|
|
|
else
|
2019-07-29 15:24:10 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
throw new Exception(string.Format("The device type {0} does not support ReadUniqueId", device.DeviceType.ToString()));
|
2019-07-29 15:24:10 -06:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-05-17 18:27:55 -06:00
|
|
|
|
public static string ReadModel(BaseDevice device)
|
2019-07-29 15:24:10 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
if (device.DeviceType == BaseDevice.DeviceTypeOptions.TwiKfdtool)
|
2019-07-29 15:24:10 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
return InteractTwiKfdtool.ReadModel(device);
|
2019-07-29 15:24:10 -06:00
|
|
|
|
}
|
2020-05-17 18:27:55 -06:00
|
|
|
|
else
|
2019-07-29 15:24:10 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
throw new Exception(string.Format("The device type {0} does not support ReadModel", device.DeviceType.ToString()));
|
2019-07-29 15:24:10 -06:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-05-17 18:27:55 -06:00
|
|
|
|
public static string ReadHardwareRevision(BaseDevice device)
|
2019-07-29 15:24:10 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
if (device.DeviceType == BaseDevice.DeviceTypeOptions.TwiKfdtool)
|
2019-07-29 15:24:10 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
return InteractTwiKfdtool.ReadHardwareRevision(device);
|
2019-07-29 15:24:10 -06:00
|
|
|
|
}
|
2020-05-17 18:27:55 -06:00
|
|
|
|
else
|
2019-07-29 15:24:10 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
throw new Exception(string.Format("The device type {0} does not support ReadHardwareRevision", device.DeviceType.ToString()));
|
2019-07-29 15:24:10 -06:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-05-17 18:27:55 -06:00
|
|
|
|
public static string ReadSerialNumber(BaseDevice device)
|
2019-07-29 15:24:10 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
if (device.DeviceType == BaseDevice.DeviceTypeOptions.TwiKfdtool)
|
2019-07-29 15:24:10 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
return InteractTwiKfdtool.ReadSerialNumber(device);
|
2019-07-29 15:24:10 -06:00
|
|
|
|
}
|
2020-05-17 18:27:55 -06:00
|
|
|
|
else
|
2019-07-29 15:24:10 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
throw new Exception(string.Format("The device type {0} does not support ReadSerialNumber", device.DeviceType.ToString()));
|
2019-07-29 15:24:10 -06:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-05-17 18:27:55 -06:00
|
|
|
|
public static void EnterBslMode(BaseDevice device)
|
2019-07-29 15:24:10 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
if (device.DeviceType == BaseDevice.DeviceTypeOptions.TwiKfdtool)
|
2019-07-29 15:24:10 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
InteractTwiKfdtool.EnterBslMode(device);
|
2019-07-29 15:24:10 -06:00
|
|
|
|
}
|
2020-05-17 18:27:55 -06:00
|
|
|
|
else
|
2019-07-29 15:24:10 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
throw new Exception(string.Format("The device type {0} does not support EnterBslMode", device.DeviceType.ToString()));
|
2019-07-29 15:24:10 -06:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-05-17 18:27:55 -06:00
|
|
|
|
public static string SelfTest(BaseDevice device)
|
2019-07-29 15:24:10 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
if (device.DeviceType == BaseDevice.DeviceTypeOptions.TwiKfdtool)
|
2019-07-29 15:24:10 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
return InteractTwiKfdtool.SelfTest(device);
|
2019-07-29 15:24:10 -06:00
|
|
|
|
}
|
2020-05-17 18:27:55 -06:00
|
|
|
|
else
|
2019-07-29 15:24:10 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
throw new Exception(string.Format("The device type {0} does not support SelfTest", device.DeviceType.ToString()));
|
2019-07-29 15:24:10 -06:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-05-17 18:27:55 -06:00
|
|
|
|
public static void CheckTargetMrConnection(BaseDevice device)
|
2019-11-02 19:40:31 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
if (device.DeviceType == BaseDevice.DeviceTypeOptions.TwiKfdtool)
|
2019-11-02 19:40:31 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
InteractTwiKfdtool.CheckTargetMrConnection(device);
|
2019-11-02 19:40:31 -06:00
|
|
|
|
}
|
2020-05-17 18:27:55 -06:00
|
|
|
|
else if (device.DeviceType == BaseDevice.DeviceTypeOptions.DliIp)
|
2019-11-02 19:40:31 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
InteractDliIp.CheckTargetMrConnection(device);
|
2019-11-02 19:40:31 -06:00
|
|
|
|
}
|
2020-05-17 18:27:55 -06:00
|
|
|
|
else
|
2019-11-02 19:40:31 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
throw new Exception(string.Format("The device type {0} does not support CheckTargetMrConnection", device.DeviceType.ToString()));
|
2019-11-02 19:40:31 -06:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-05-17 18:27:55 -06:00
|
|
|
|
public static void Keyload(BaseDevice device, List<CmdKeyItem> keys)
|
2019-07-29 15:24:10 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
if (device.DeviceType == BaseDevice.DeviceTypeOptions.TwiKfdtool)
|
2019-07-29 15:24:10 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
InteractTwiKfdtool.Keyload(device, keys);
|
2019-07-29 15:24:10 -06:00
|
|
|
|
}
|
2020-05-17 18:27:55 -06:00
|
|
|
|
else if (device.DeviceType == BaseDevice.DeviceTypeOptions.DliIp)
|
2019-07-29 15:24:10 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
InteractDliIp.Keyload(device, keys);
|
2019-07-29 15:24:10 -06:00
|
|
|
|
}
|
2020-05-17 18:27:55 -06:00
|
|
|
|
else
|
2019-07-29 15:24:10 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
throw new Exception(string.Format("The device type {0} does not support Keyload", device.DeviceType.ToString()));
|
2019-07-29 15:24:10 -06:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-05-17 18:27:55 -06:00
|
|
|
|
public static void EraseKey(BaseDevice device, List<CmdKeyItem> keys)
|
2019-07-29 15:24:10 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
if (device.DeviceType == BaseDevice.DeviceTypeOptions.TwiKfdtool)
|
2019-07-29 15:24:10 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
InteractTwiKfdtool.EraseKey(device, keys);
|
2019-07-29 15:24:10 -06:00
|
|
|
|
}
|
2020-05-17 18:27:55 -06:00
|
|
|
|
else if (device.DeviceType == BaseDevice.DeviceTypeOptions.DliIp)
|
2019-07-29 15:24:10 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
InteractDliIp.EraseKey(device, keys);
|
2019-07-29 15:24:10 -06:00
|
|
|
|
}
|
2020-05-17 18:27:55 -06:00
|
|
|
|
else
|
2019-07-29 15:24:10 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
throw new Exception(string.Format("The device type {0} does not support EraseKey", device.DeviceType.ToString()));
|
2019-07-29 15:24:10 -06:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-05-17 18:27:55 -06:00
|
|
|
|
public static void EraseAllKeys(BaseDevice device)
|
2019-07-29 15:24:10 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
if (device.DeviceType == BaseDevice.DeviceTypeOptions.TwiKfdtool)
|
2019-07-29 15:24:10 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
InteractTwiKfdtool.EraseAllKeys(device);
|
2019-07-29 15:24:10 -06:00
|
|
|
|
}
|
2020-05-17 18:27:55 -06:00
|
|
|
|
else if (device.DeviceType == BaseDevice.DeviceTypeOptions.DliIp)
|
2019-07-29 15:24:10 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
InteractDliIp.EraseAllKeys(device);
|
2019-07-29 15:24:10 -06:00
|
|
|
|
}
|
2020-05-17 18:27:55 -06:00
|
|
|
|
else
|
2019-07-29 15:24:10 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
throw new Exception(string.Format("The device type {0} does not support EraseAllKeys", device.DeviceType.ToString()));
|
2019-07-29 15:24:10 -06:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-05-17 18:27:55 -06:00
|
|
|
|
public static List<RspKeyInfo> ViewKeyInfo(BaseDevice device)
|
2019-07-29 15:24:10 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
if (device.DeviceType == BaseDevice.DeviceTypeOptions.TwiKfdtool)
|
2019-07-29 15:24:10 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
return InteractTwiKfdtool.ViewKeyInfo(device);
|
2019-07-29 15:24:10 -06:00
|
|
|
|
}
|
2020-05-17 18:27:55 -06:00
|
|
|
|
else if (device.DeviceType == BaseDevice.DeviceTypeOptions.DliIp)
|
2019-07-29 15:24:10 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
return InteractDliIp.ViewKeyInfo(device);
|
2019-07-29 15:24:10 -06:00
|
|
|
|
}
|
2020-05-17 18:27:55 -06:00
|
|
|
|
else
|
2019-07-29 15:24:10 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
throw new Exception(string.Format("The device type {0} does not support ViewKeyInfo", device.DeviceType.ToString()));
|
2019-07-29 15:24:10 -06:00
|
|
|
|
}
|
|
|
|
|
}
|
2020-04-02 17:06:08 -06:00
|
|
|
|
|
2020-05-17 18:27:55 -06:00
|
|
|
|
public static RspRsiInfo LoadConfig(BaseDevice device, int kmfRsi, int mnp)
|
2020-04-02 17:06:08 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
if (device.DeviceType == BaseDevice.DeviceTypeOptions.TwiKfdtool)
|
2020-04-02 17:06:08 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
return InteractTwiKfdtool.LoadConfig(device, kmfRsi, mnp);
|
2020-04-02 17:06:08 -06:00
|
|
|
|
}
|
2020-05-17 18:27:55 -06:00
|
|
|
|
else if (device.DeviceType == BaseDevice.DeviceTypeOptions.DliIp)
|
2020-04-02 17:06:08 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
return InteractDliIp.LoadConfig(device, kmfRsi, mnp);
|
2020-04-02 17:06:08 -06:00
|
|
|
|
}
|
2020-05-17 18:27:55 -06:00
|
|
|
|
else
|
2020-04-02 17:06:08 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
throw new Exception(string.Format("The device type {0} does not support LoadConfig", device.DeviceType.ToString()));
|
2020-04-02 17:06:08 -06:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-05-17 18:27:55 -06:00
|
|
|
|
public static RspRsiInfo ChangeRsi(BaseDevice device, int rsiOld, int rsiNew, int mnp)
|
2020-04-02 17:06:08 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
if (device.DeviceType == BaseDevice.DeviceTypeOptions.TwiKfdtool)
|
2020-04-02 17:06:08 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
return InteractTwiKfdtool.ChangeRsi(device, rsiOld, rsiNew, mnp);
|
2020-04-02 17:06:08 -06:00
|
|
|
|
}
|
2020-05-17 18:27:55 -06:00
|
|
|
|
else if (device.DeviceType == BaseDevice.DeviceTypeOptions.DliIp)
|
2020-04-02 17:06:08 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
return InteractDliIp.ChangeRsi(device, rsiOld, rsiNew, mnp);
|
2020-04-02 17:06:08 -06:00
|
|
|
|
}
|
2020-05-17 18:27:55 -06:00
|
|
|
|
else
|
2020-04-02 17:06:08 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
throw new Exception(string.Format("The device type {0} does not support ChangeRsi", device.DeviceType.ToString()));
|
2020-04-02 17:06:08 -06:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-05-17 18:27:55 -06:00
|
|
|
|
public static List<RspRsiInfo> ViewRsiItems(BaseDevice device)
|
2020-04-02 17:06:08 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
if (device.DeviceType == BaseDevice.DeviceTypeOptions.TwiKfdtool)
|
2020-04-02 17:06:08 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
return InteractTwiKfdtool.ViewRsiItems(device);
|
2020-04-02 17:06:08 -06:00
|
|
|
|
}
|
2020-05-17 18:27:55 -06:00
|
|
|
|
else if (device.DeviceType == BaseDevice.DeviceTypeOptions.DliIp)
|
2020-04-02 17:06:08 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
return InteractDliIp.ViewRsiItems(device);
|
2020-04-02 17:06:08 -06:00
|
|
|
|
}
|
2020-05-17 18:27:55 -06:00
|
|
|
|
else
|
2020-04-02 17:06:08 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
throw new Exception(string.Format("The device type {0} does not support ViewRsiItems", device.DeviceType.ToString()));
|
2020-04-02 17:06:08 -06:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-05-17 18:27:55 -06:00
|
|
|
|
public static int ViewMnp(BaseDevice device)
|
2020-04-02 17:06:08 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
if (device.DeviceType == BaseDevice.DeviceTypeOptions.TwiKfdtool)
|
2020-04-02 17:06:08 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
return InteractTwiKfdtool.ViewMnp(device);
|
2020-04-02 17:06:08 -06:00
|
|
|
|
}
|
2020-05-17 18:27:55 -06:00
|
|
|
|
else if (device.DeviceType == BaseDevice.DeviceTypeOptions.DliIp)
|
2020-04-02 17:06:08 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
return InteractDliIp.ViewMnp(device);
|
2020-04-02 17:06:08 -06:00
|
|
|
|
}
|
2020-05-17 18:27:55 -06:00
|
|
|
|
else
|
2020-04-02 17:06:08 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
throw new Exception(string.Format("The device type {0} does not support ViewMnp", device.DeviceType.ToString()));
|
2020-04-02 17:06:08 -06:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-05-17 18:27:55 -06:00
|
|
|
|
public static int ViewKmfRsi(BaseDevice device)
|
2020-04-02 17:06:08 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
if (device.DeviceType == BaseDevice.DeviceTypeOptions.TwiKfdtool)
|
2020-04-02 17:06:08 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
return InteractTwiKfdtool.ViewKmfRsi(device);
|
2020-04-02 17:06:08 -06:00
|
|
|
|
}
|
2020-05-17 18:27:55 -06:00
|
|
|
|
else if (device.DeviceType == BaseDevice.DeviceTypeOptions.DliIp)
|
2020-04-02 17:06:08 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
return InteractDliIp.ViewKmfRsi(device);
|
2020-04-02 17:06:08 -06:00
|
|
|
|
}
|
2020-05-17 18:27:55 -06:00
|
|
|
|
else
|
2020-04-02 17:06:08 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
throw new Exception(string.Format("The device type {0} does not support ViewKmfRsi", device.DeviceType.ToString()));
|
2020-04-02 17:06:08 -06:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-05-17 18:27:55 -06:00
|
|
|
|
public static List<RspKeysetInfo> ViewKeysetTaggingInfo(BaseDevice device)
|
2020-04-02 17:06:08 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
if (device.DeviceType == BaseDevice.DeviceTypeOptions.TwiKfdtool)
|
2020-04-02 17:06:08 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
return InteractTwiKfdtool.ViewKeysetTaggingInfo(device);
|
2020-04-02 17:06:08 -06:00
|
|
|
|
}
|
2020-05-17 18:27:55 -06:00
|
|
|
|
else if (device.DeviceType == BaseDevice.DeviceTypeOptions.DliIp)
|
2020-04-02 17:06:08 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
return InteractDliIp.ViewKeysetTaggingInfo(device);
|
2020-04-02 17:06:08 -06:00
|
|
|
|
}
|
2020-05-17 18:27:55 -06:00
|
|
|
|
else
|
2020-04-02 17:06:08 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
throw new Exception(string.Format("The device type {0} does not support ViewKeysetTaggingInfo", device.DeviceType.ToString()));
|
2020-04-02 17:06:08 -06:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-05-17 18:27:55 -06:00
|
|
|
|
public static RspChangeoverInfo ActivateKeyset(BaseDevice device, int keysetSuperseded, int keysetActivated)
|
2020-04-02 17:06:08 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
if (device.DeviceType == BaseDevice.DeviceTypeOptions.TwiKfdtool)
|
2020-04-02 17:06:08 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
return InteractTwiKfdtool.ActivateKeyset(device, keysetSuperseded, keysetActivated);
|
2020-04-02 17:06:08 -06:00
|
|
|
|
}
|
2020-05-17 18:27:55 -06:00
|
|
|
|
else if (device.DeviceType == BaseDevice.DeviceTypeOptions.DliIp)
|
2020-04-02 17:06:08 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
return InteractDliIp.ActivateKeyset(device, keysetSuperseded, keysetActivated);
|
2020-04-02 17:06:08 -06:00
|
|
|
|
}
|
2020-05-17 18:27:55 -06:00
|
|
|
|
else
|
2020-04-02 17:06:08 -06:00
|
|
|
|
{
|
2020-05-17 18:27:55 -06:00
|
|
|
|
throw new Exception(string.Format("The device type {0} does not support ActivateKeyset", device.DeviceType.ToString()));
|
2020-04-02 17:06:08 -06:00
|
|
|
|
}
|
|
|
|
|
}
|
2019-07-29 15:24:10 -06:00
|
|
|
|
}
|
|
|
|
|
}
|