public static void Keyload(BaseDevice device, List <CmdKeyItem> keys) { try { ManualRekeyApplication mra = GetMra(device); mra.Keyload(keys); } catch (Exception) { throw; } }
public static List <RspKeysetInfo> ViewKeysetTaggingInfo(BaseDevice device) { try { ManualRekeyApplication mra = GetMra(device); return(mra.ViewKeysetTaggingInfo()); } catch (Exception) { throw; } }
public static RspChangeoverInfo ActivateKeyset(BaseDevice device, int keysetSuperseded, int keysetActivated) { try { ManualRekeyApplication mra = GetMra(device); return(mra.ActivateKeyset(keysetSuperseded, keysetActivated)); } catch (Exception) { throw; } }
public static int ViewKmfRsi(BaseDevice device) { try { ManualRekeyApplication mra = GetMra(device); return(mra.ViewKmfRsi()); } catch (Exception) { throw; } }
public static List <RspRsiInfo> ViewRsiItems(BaseDevice device) { try { ManualRekeyApplication mra = GetMra(device); return(mra.ViewRsiItems()); } catch (Exception) { throw; } }
public static RspRsiInfo ChangeRsi(BaseDevice device, int rsiOld, int rsiNew, int mnp) { try { ManualRekeyApplication mra = GetMra(device); return(mra.ChangeRsi(rsiOld, rsiNew, mnp)); } catch (Exception) { throw; } }
public static RspRsiInfo LoadConfig(BaseDevice device, int kmfRsi, int mnp) { try { ManualRekeyApplication mra = GetMra(device); return(mra.LoadConfig(kmfRsi, mnp)); } catch (Exception) { throw; } }
public static void EraseAllKeys(BaseDevice device) { try { ManualRekeyApplication mra = GetMra(device); mra.EraseAllKeys(); } catch (Exception) { throw; } }
public static RspChangeoverInfo ActivateKeyset(BaseDevice device, int keysetSuperseded, int keysetActivated) { RspChangeoverInfo result = new RspChangeoverInfo(); if (device.TwiKfdtoolDevice.ComPort == string.Empty) { throw new ArgumentException("No device selected"); } AdapterProtocol ap = null; try { ap = new AdapterProtocol(device.TwiKfdtoolDevice.ComPort); ap.Open(); ap.Clear(); ManualRekeyApplication mra = new ManualRekeyApplication(ap); //result = mra.LoadConfig(kmfRsi, mnp); result = mra.ActivateKeyset(keysetSuperseded, keysetActivated); } catch (Exception) { throw; } finally { try { if (ap != null) { ap.Close(); } } catch (System.IO.IOException ex) { Logger.Warn("could not close serial port: {0}", ex.Message); } } return(result); }
public static List <RspKeysetInfo> ViewKeysetTaggingInfo(BaseDevice device) { List <RspKeysetInfo> result = new List <RspKeysetInfo>(); if (device.TwiKfdtoolDevice.ComPort == string.Empty) { throw new ArgumentException("No device selected"); } AdapterProtocol ap = null; try { ap = new AdapterProtocol(device.TwiKfdtoolDevice.ComPort); ap.Open(); ap.Clear(); ManualRekeyApplication mra = new ManualRekeyApplication(ap); result = mra.ViewKeysetTaggingInfo(); } catch (Exception) { throw; } finally { try { if (ap != null) { ap.Close(); } } catch (System.IO.IOException ex) { Logger.Warn("could not close serial port: {0}", ex.Message); } } return(result); }
public static RspRsiInfo ChangeRsi(BaseDevice device, int rsiOld, int rsiNew, int mnp) { RspRsiInfo result = new RspRsiInfo(); if (device.TwiKfdtoolDevice.ComPort == string.Empty) { throw new ArgumentException("No device selected"); } AdapterProtocol ap = null; try { ap = new AdapterProtocol(device.TwiKfdtoolDevice.ComPort); ap.Open(); ap.Clear(); ManualRekeyApplication mra = new ManualRekeyApplication(ap); result = mra.ChangeRsi(rsiOld, rsiNew, mnp); } catch (Exception) { throw; } finally { try { if (ap != null) { ap.Close(); } } catch (System.IO.IOException ex) { Logger.Warn("could not close serial port: {0}", ex.Message); } } return(result); }
public static int ViewKmfRsi(string port) { int result = new int(); if (port == string.Empty) { throw new ArgumentException("port empty"); } AdapterProtocol ap = null; try { ap = new AdapterProtocol(port); ap.Open(); ap.Clear(); ManualRekeyApplication mra = new ManualRekeyApplication(ap); result = mra.ViewKmfRsi(); } catch (Exception) { throw; } finally { try { if (ap != null) { ap.Close(); } } catch (System.IO.IOException ex) { Logger.Warn("could not close serial port: {0}", ex.Message); } } return(result); }
public static RspRsiInfo LoadConfig(string port, int kmfRsi, int mnp) { RspRsiInfo result = new RspRsiInfo(); if (port == string.Empty) { throw new ArgumentException("port empty"); } AdapterProtocol ap = null; try { ap = new AdapterProtocol(port); ap.Open(); ap.Clear(); ManualRekeyApplication mra = new ManualRekeyApplication(ap); result = mra.LoadConfig(kmfRsi, mnp); } catch (Exception) { throw; } finally { try { if (ap != null) { ap.Close(); } } catch (System.IO.IOException ex) { Logger.Warn("could not close serial port: {0}", ex.Message); } } return(result); }
public static void EraseAllKeys(BaseDevice device) { if (device.TwiKfdtoolDevice.ComPort == string.Empty) { throw new ArgumentException("No device selected"); } AdapterProtocol ap = null; try { ap = new AdapterProtocol(device.TwiKfdtoolDevice.ComPort); ap.Open(); ap.Clear(); ManualRekeyApplication mra = new ManualRekeyApplication(ap); mra.EraseAllKeys(); } catch (Exception) { throw; } finally { try { if (ap != null) { ap.Close(); } } catch (System.IO.IOException ex) { Logger.Warn("could not close serial port: {0}", ex.Message); } } }
public static void EraseKey(string port, List <CmdKeyItem> keys) { if (port == string.Empty) { throw new ArgumentException("port empty"); } AdapterProtocol ap = null; try { ap = new AdapterProtocol(port); ap.Open(); ap.Clear(); ManualRekeyApplication mra = new ManualRekeyApplication(ap); mra.EraseKeys(keys); } catch (Exception) { throw; } finally { try { if (ap != null) { ap.Close(); } } catch (System.IO.IOException ex) { Logger.Warn("could not close serial port: {0}", ex.Message); } } }
public static void Keyload(string port, bool useActiveKeyset, int keysetId, int sln, int keyId, int algId, List <byte> key) { if (port == string.Empty) { throw new ArgumentException("port empty"); } AdapterProtocol ap = null; try { ap = new AdapterProtocol(port); ap.Open(); ap.Clear(); ManualRekeyApplication mra = new ManualRekeyApplication(ap); mra.Keyload(useActiveKeyset, keysetId, sln, keyId, algId, key); } catch (Exception) { throw; } finally { try { if (ap != null) { ap.Close(); } } catch (System.IO.IOException ex) { Logger.Warn("could not close serial port: {0}", ex.Message); } } }