/// <summary> /// Populate optimal settings based on reader /// </summary> private void InitializeOptimalSettings() { _optimalReaderSettings = new Dictionary <string, string>(); try { Gen2.LinkFrequency blf = (Gen2.LinkFrequency)_reader.ParamGet("/reader/gen2/BLF"); switch (blf) { case Gen2.LinkFrequency.LINK250KHZ: _optimalReaderSettings["/reader/gen2/BLF"] = "LINK250KHZ"; break; case Gen2.LinkFrequency.LINK640KHZ: _optimalReaderSettings["/reader/gen2/BLF"] = "LINK640KHZ";; break; default: _optimalReaderSettings.Add("/reader/gen2/BLF", ""); break; } } catch (ArgumentException ex) { if (ex.Message.Contains("Unknown Link Frequency")) { MessageBox.Show("Unknown Link Frequency found, Reverting to defaults.", "Universal Reader Assistant", MessageBoxButton.OK, MessageBoxImage.Warning); _optimalReaderSettings["/reader/gen2/BLF"] = "LINK250KHZ"; } else { _optimalReaderSettings.Add("/reader/gen2/BLF", ""); } } try { Gen2.Tari tariVal = (Gen2.Tari)_reader.ParamGet("/reader/gen2/Tari"); switch (tariVal) { case Gen2.Tari.TARI_6_25US: _optimalReaderSettings["/reader/gen2/tari"] = "TARI_6_25US"; break; case Gen2.Tari.TARI_12_5US: _optimalReaderSettings["/reader/gen2/tari"] = "TARI_12_5US"; break; case Gen2.Tari.TARI_25US: _optimalReaderSettings["/reader/gen2/tari"] = "TARI_25US"; break; default: _optimalReaderSettings.Add("/reader/gen2/tari", ""); break; } } catch (ArgumentException) { _optimalReaderSettings.Add("/reader/gen2/tari", ""); } catch (ReaderCodeException) { } try { Gen2.TagEncoding tagencoding = (Gen2.TagEncoding)_reader.ParamGet("/reader/gen2/tagEncoding"); switch (tagencoding) { case Gen2.TagEncoding.FM0: _optimalReaderSettings["/reader/gen2/tagEncoding"] = "FM0"; break; case Gen2.TagEncoding.M2: _optimalReaderSettings["/reader/gen2/tagEncoding"] = "M2"; break; case Gen2.TagEncoding.M4: _optimalReaderSettings["/reader/gen2/tagEncoding"] = "M4"; break; case Gen2.TagEncoding.M8: _optimalReaderSettings["/reader/gen2/tagEncoding"] = "M8"; break; default: _optimalReaderSettings.Add("/reader/gen2/tagEncoding", ""); break; } } catch (ArgumentException) { _optimalReaderSettings.Add("/reader/gen2/tagEncoding", ""); } try { Gen2.Session session = (Gen2.Session)_reader.ParamGet("/reader/gen2/session"); switch (session) { case Gen2.Session.S0: _optimalReaderSettings["/reader/gen2/session"] = "S0"; break; case Gen2.Session.S1: _optimalReaderSettings["/reader/gen2/session"] = "S1"; break; case Gen2.Session.S2: _optimalReaderSettings["/reader/gen2/session"] = "S2"; break; case Gen2.Session.S3: _optimalReaderSettings["/reader/gen2/session"] = "S3"; break; default: _optimalReaderSettings.Add("/reader/gen2/session", ""); break; } } catch (ArgumentException) { _optimalReaderSettings.Add("/reader/gen2/session", ""); } try { Gen2.Target target = (Gen2.Target)_reader.ParamGet("/reader/gen2/Target"); switch (target) { case Gen2.Target.A: _optimalReaderSettings["/reader/gen2/target"] = "A"; break; case Gen2.Target.B: _optimalReaderSettings["/reader/gen2/target"] = "B"; break; case Gen2.Target.AB: _optimalReaderSettings["/reader/gen2/target"] = "AB"; break; case Gen2.Target.BA: _optimalReaderSettings["/reader/gen2/target"] = "BA"; break; default: _optimalReaderSettings.Add("Target", ""); break; } } catch (FeatureNotSupportedException) { _optimalReaderSettings.Add("Target", ""); } try { Gen2.Q qval = (Gen2.Q)_reader.ParamGet("/reader/gen2/q"); if (qval.GetType() == typeof(Gen2.DynamicQ)) { _optimalReaderSettings["/reader/gen2/q"] = "DynamicQ"; } else if (qval.GetType() == typeof(Gen2.StaticQ)) { Gen2.StaticQ stqval = (Gen2.StaticQ)qval; _optimalReaderSettings["/reader/gen2/q"] = "StaticQ"; int countQ = Convert.ToInt32(((Gen2.StaticQ)qval).InitialQ); _optimalReaderSettings["/application/performanceTuning/staticQValue"] = countQ.ToString(); } else { _optimalReaderSettings.Add("/reader/gen2/q", ""); } } catch (FeatureNotSupportedException) { _optimalReaderSettings.Add("/reader/gen2/q", ""); } }
static void Main(string[] args) { // Program setup if (1 != args.Length) { Console.WriteLine(String.Join("\r\n", new string[] { "Please provide reader URL, such as:", "tmr:///com4", "tmr://my-reader.example.com", })); Environment.Exit(1); } try { // Create Reader object, connecting to physical device. // Wrap reader in a "using" block to get automatic // reader shutdown (using IDisposable interface). using (Reader r = Reader.Create(args[0])) { //Uncomment this line to add default transport listener. //r.Transport += r.SimpleTransportListener; r.Connect(); if (Reader.Region.UNSPEC == (Reader.Region)r.ParamGet("/reader/region/id")) { Reader.Region[] supportedRegions = (Reader.Region[])r.ParamGet("/reader/region/supportedRegions"); if (supportedRegions.Length < 1) { throw new FAULT_INVALID_REGION_Exception(); } else { r.ParamSet("/reader/region/id", supportedRegions[0]); } } DenatranIAVCustomTagOperations denatranIavCustomTagOp = new DenatranIAVCustomTagOperations(); denatranIavCustomTagOp.reader = r; #region Initialsettings //Initial settings //Set BLF 320KHZ Console.WriteLine(String.Format("Get BLF : {0}", r.ParamGet("/reader/gen2/blf"))); Console.WriteLine("Set BLF to 320KHZ"); r.ParamSet("/reader/gen2/blf", Gen2.LinkFrequency.LINK320KHZ); Console.WriteLine(String.Format("Get BLF : {0}", r.ParamGet("/reader/gen2/blf"))); Console.WriteLine(); //Set session Console.WriteLine(String.Format("Get session : {0}", r.ParamGet("/reader/gen2/session"))); Console.WriteLine("Set session"); r.ParamSet("/reader/gen2/session", Gen2.Session.S0); Console.WriteLine(String.Format("Get session : {0}", r.ParamGet("/reader/gen2/session"))); Console.WriteLine(); //Set target Console.WriteLine(String.Format("Get target : {0}", r.ParamGet("/reader/gen2/target"))); Console.WriteLine("Set target"); r.ParamSet("/reader/gen2/target", Gen2.Target.AB); Console.WriteLine(String.Format("Get target : {0}", r.ParamGet("/reader/gen2/target"))); Console.WriteLine(); //Set tari Console.WriteLine(String.Format("Get tari : {0}", r.ParamGet("/reader/gen2/tari"))); Console.WriteLine("Set tari"); r.ParamSet("/reader/gen2/tari", Gen2.Tari.TARI_6_25US); Console.WriteLine(String.Format("Get tari : {0}", r.ParamGet("/reader/gen2/tari"))); Console.WriteLine(); //Set tagencoding Console.WriteLine(String.Format("Get tagencoding : {0}", r.ParamGet("/reader/gen2/tagEncoding"))); Console.WriteLine("Set tagencoding"); r.ParamSet("/reader/gen2/tagEncoding", Gen2.TagEncoding.FM0); Console.WriteLine(String.Format("Get tagencoding : {0}", r.ParamGet("/reader/gen2/tagEncoding"))); Console.WriteLine(); //Set Q Console.WriteLine(String.Format("Get Q : {0}", r.ParamGet("/reader/gen2/q"))); Console.WriteLine("Set Q"); Gen2.StaticQ staticQ = new Gen2.StaticQ(0); r.ParamSet("/reader/gen2/q", staticQ); Console.WriteLine(String.Format("Get Q : {0}", r.ParamGet("/reader/gen2/q"))); Console.WriteLine(); #endregion Initialsettings TagReadData[] tagReads; // Read tagReads = r.Read(500); if (tagReads.Length == 0) { Console.WriteLine("Error : No tags found"); } else { #region Filter initialization //Gen2Select filter Gen2.Select selectfilter = new Gen2.Select(false, Gen2.Bank.EPC, 32, (ushort)(tagReads[0].Epc.Length * 8), ByteFormat.FromHex(tagReads[0].EpcString)); //TagData filter TagFilter tagdataFilter = new TagData(ByteFormat.FromHex(tagReads[0].EpcString)); #endregion Filter initialization #region Tag Operation Initialization byte payload = 0x80; ushort readptr = 0xFFFF; ushort wordAddress = 0xFFFF; ushort word = 0xFFFF; //Read ptr for readsec tagop ushort readSecReadPtr = 0x0000; //Set the tag Identification and writeCredentials Gen2.DenatranIAVWriteCredential writeCredential = new Gen2.DenatranIAVWriteCredential (new byte [] { 0x80, 0x10, 0x00, 0x12, 0x34, 0xAD, 0xBD, 0xC0 }, new byte [] { 0xDE, 0xAD, 0xBE, 0xEF, 0xDE, 0xAD, 0xBE, 0xEF, 0xDE, 0xAD, 0xBE, 0xEF, 0xDE, 0xAD, 0xBE, 0xEF }); //Set the data and writeCredentials for WriteSec Gen2.DenatranIAVWriteSecCredential writeSecCredential = new Gen2.DenatranIAVWriteSecCredential (new byte[] { 0x11, 0x22, 0x33, 0x44, 0x55, 0x66 }, new byte[] { 0x35, 0x49, 0x87, 0xbd, 0xb2, 0xab, 0xd2, 0x7c, 0x2e, 0x34, 0x78, 0x8b, 0xf2, 0xf7, 0x0b, 0xa2 }); //IAVDenatran secure tag operation - ActivateSecureMode denatranIavCustomTagOp.tagOpActivateSecureMode = new Gen2.Denatran.IAV.ActivateSecureMode(payload); //IAVDenatran secure tag operation - AuthenticateOBU denatranIavCustomTagOp.tagOpAuthenticateOBU = new Gen2.Denatran.IAV.AuthenticateOBU(payload); //IAVDenatran secure tag operation - ActivateSiniavMode denatranIavCustomTagOp.tagOpActivateSiniavMode = new Gen2.Denatran.IAV.ActivateSiniavMode(0x81, new byte[] { 0xde, 0xad, 0xbe, 0xef, 0xde, 0xad, 0xbe, 0xef }); //IAVDenatran secure tag operation - OBUAuthFullPass1 denatranIavCustomTagOp.tagOpOBUAuthFullPass1 = new Gen2.Denatran.IAV.OBUAuthFullPass1(payload); //IAVDenatran secure tag operation - OBUAuthFullPass2 denatranIavCustomTagOp.tagOpOBUAuthFullPass2 = new Gen2.Denatran.IAV.OBUAuthFullPass2(payload); //IAVDenatran secure tag operation - OBUAuthID denatranIavCustomTagOp.tagOpOBUAuthID = new Gen2.Denatran.IAV.OBUAuthID(payload); //IAVDenatran secure tag operation - OBUReadFromMemMap denatranIavCustomTagOp.tagOpOBUReadFromMemMap = new Gen2.Denatran.IAV.OBUReadFromMemMap (payload, readptr); //IAVDenatran secure tag operation - OBUWriteToMemMap denatranIavCustomTagOp.tagOpOBUWriteToMemMap = new Gen2.Denatran.IAV.OBUWriteToMemMap (payload, wordAddress, word, writeCredential); //IAVDenatran secure tag operation - OBUAuthFullPass denatranIavCustomTagOp.tagOpOBUAuthFullPass = new Gen2.Denatran.IAV.OBUAuthFullPass(payload); //IAVDenatran secure tag operation - GetTokenId denatranIavCustomTagOp.tagOpGetTokenId = new Gen2.Denatran.IAV.GetTokenId(); //IAVDenatran secure tag operation - ReadSec denatranIavCustomTagOp.tagOpReadSec = new Gen2.Denatran.IAV.ReadSec (payload, readSecReadPtr); //IAVDenatran secure tag operation - WriteSec denatranIavCustomTagOp.tagOpWriteSec = new Gen2.Denatran.IAV.WriteSec (payload, writeSecCredential); #endregion Tag Operation Initialization #region Standalonetagoperations //Standalone tagop Console.WriteLine("Standalone tagop without filter : "); Console.WriteLine(); denatranIavCustomTagOp.ExecuteTagOpFilter(null); Console.WriteLine("Standalone tagop with tagdata filter : "); Console.WriteLine(); denatranIavCustomTagOp.ExecuteTagOpFilter(tagdataFilter); Console.WriteLine("Standalone tagop with gen2Select filter : "); Console.WriteLine(); denatranIavCustomTagOp.ExecuteTagOpFilter(selectfilter); #endregion Standalonetagoperations #region Embeddedtagoperations //Embedded tagop Console.WriteLine("Embedded tagop without filter and fastsearch : "); Console.WriteLine(); denatranIavCustomTagOp.EmbeddedTagOpFilter(null, false); Console.WriteLine("Embedded tagop with tagdata filter and fastsearch enabled : "); Console.WriteLine(); denatranIavCustomTagOp.EmbeddedTagOpFilter(tagdataFilter, true); Console.WriteLine("Embedded tagop with gen2select filter and fast search enabled : "); Console.WriteLine(); denatranIavCustomTagOp.EmbeddedTagOpFilter(selectfilter, true); #endregion Embeddedtagoperations } } } catch (ReaderException re) { Console.WriteLine("Error: " + re.Message); } catch (Exception ex) { Console.WriteLine("Error: " + ex.Message); } }
static void Main(string[] args) { // Program setup if (1 > args.Length) { Usage(); } for (int nextarg = 1; nextarg < args.Length; nextarg++) { string arg = args[nextarg]; if (arg.Equals("--ant")) { if (null != antennaList) { Console.WriteLine("Duplicate argument: --ant specified more than once"); Usage(); } antennaList = ParseAntennaList(args, nextarg); nextarg++; } else { Console.WriteLine("Argument {0}:\"{1}\" is not recognized", nextarg, arg); Usage(); } } try { // Create Reader object, connecting to physical device. // Wrap reader in a "using" block to get automatic // reader shutdown (using IDisposable interface). using (Reader r = Reader.Create(args[0])) { //Uncomment this line to add default transport listener. //r.Transport += r.SimpleTransportListener; r.Connect(); if (Reader.Region.UNSPEC == (Reader.Region)r.ParamGet("/reader/region/id")) { Reader.Region[] supportedRegions = (Reader.Region[])r.ParamGet("/reader/region/supportedRegions"); if (supportedRegions.Length < 1) { throw new FAULT_INVALID_REGION_Exception(); } r.ParamSet("/reader/region/id", supportedRegions[0]); } if (r.isAntDetectEnabled(antennaList)) { Console.WriteLine("Module doesn't has antenna detection support please provide antenna list"); Usage(); } // Create a simplereadplan which uses the antenna list created above SimpleReadPlan plan = new SimpleReadPlan(antennaList, TagProtocol.GEN2, null, null, 1000); // Set the created readplan r.ParamSet("/reader/read/plan", plan); //Use first antenna for operation if (antennaList != null) { r.ParamSet("/reader/tagop/antenna", antennaList[0]); } DenatranIAVCustomTagOperations denatranIavCustomTagOp = new DenatranIAVCustomTagOperations(); denatranIavCustomTagOp.reader = r; #region EnablingGEN2DenatranIAVTagOps // Serial reader condition is bypassed to add support for Network readers. Console.WriteLine(String.Format("Get Protocol Extension : {0}", r.ParamGet("/reader/gen2/protocolExtension"))); Console.WriteLine(); #endregion #region Initialsettings //Initial settings //Set tagencoding Console.WriteLine(String.Format("Get tagencoding : {0}", r.ParamGet("/reader/gen2/tagEncoding"))); Console.WriteLine("Set tagencoding"); r.ParamSet("/reader/gen2/tagEncoding", Gen2.TagEncoding.FM0); Console.WriteLine(String.Format("Get tagencoding : {0}", r.ParamGet("/reader/gen2/tagEncoding"))); Console.WriteLine(); //Set BLF 320KHZ Console.WriteLine(String.Format("Get BLF : {0}", r.ParamGet("/reader/gen2/blf"))); Console.WriteLine("Set BLF to 320KHZ"); r.ParamSet("/reader/gen2/blf", Gen2.LinkFrequency.LINK320KHZ); Console.WriteLine(String.Format("Get BLF : {0}", r.ParamGet("/reader/gen2/blf"))); Console.WriteLine(); //Set tari Console.WriteLine(String.Format("Get tari : {0}", r.ParamGet("/reader/gen2/tari"))); Console.WriteLine("Set tari"); r.ParamSet("/reader/gen2/tari", Gen2.Tari.TARI_6_25US); Console.WriteLine(String.Format("Get tari : {0}", r.ParamGet("/reader/gen2/tari"))); Console.WriteLine(); //Set session Console.WriteLine(String.Format("Get session : {0}", r.ParamGet("/reader/gen2/session"))); Console.WriteLine("Set session"); r.ParamSet("/reader/gen2/session", Gen2.Session.S0); Console.WriteLine(String.Format("Get session : {0}", r.ParamGet("/reader/gen2/session"))); Console.WriteLine(); //Set target Console.WriteLine(String.Format("Get target : {0}", r.ParamGet("/reader/gen2/target"))); Console.WriteLine("Set target"); r.ParamSet("/reader/gen2/target", Gen2.Target.AB); Console.WriteLine(String.Format("Get target : {0}", r.ParamGet("/reader/gen2/target"))); Console.WriteLine(); //Set Q Console.WriteLine(String.Format("Get Q : {0}", r.ParamGet("/reader/gen2/q"))); Console.WriteLine("Set Q"); Gen2.StaticQ staticQ = new Gen2.StaticQ(0); r.ParamSet("/reader/gen2/q", staticQ); Console.WriteLine(String.Format("Get Q : {0}", r.ParamGet("/reader/gen2/q"))); Console.WriteLine(); #endregion Initialsettings TagReadData[] tagReads; // Read tagReads = r.Read(500); if (tagReads.Length == 0) { Console.WriteLine("Error : No tags found"); } else { #region Filter initialization //Gen2Select filter Gen2.Select selectfilter = new Gen2.Select(false, Gen2.Bank.EPC, 32, (ushort)(tagReads[0].Epc.Length * 8), ByteFormat.FromHex(tagReads[0].EpcString)); //TagData filter TagFilter tagdataFilter = new TagData(ByteFormat.FromHex(tagReads[0].EpcString)); #endregion Filter initialization #region Tag Operation Initialization byte payload = 0x80; byte OBUAuthID = 0x00; byte OBUAuthFullPass = 0x01; byte OBUAuthFullPass1 = 0x02; ushort readptr = 0xFFFF; ushort wordAddress = 0xFFFF; ushort word = 0xFFFF; //Read ptr for readsec tagop ushort readSecReadPtr = 0x0000; //Set the tag Identification and writeCredentials Gen2.DenatranIAVWriteCredential writeCredential = new Gen2.DenatranIAVWriteCredential (new byte [] { 0x80, 0x10, 0x00, 0x12, 0x34, 0xAD, 0xBD, 0xC0 }, new byte [] { 0xDE, 0xAD, 0xBE, 0xEF, 0xDE, 0xAD, 0xBE, 0xEF, 0xDE, 0xAD, 0xBE, 0xEF, 0xDE, 0xAD, 0xBE, 0xEF }); //Set the data and writeCredentials for WriteSec Gen2.DenatranIAVWriteSecCredential writeSecCredential = new Gen2.DenatranIAVWriteSecCredential (new byte[] { 0x11, 0x22, 0x33, 0x44, 0x55, 0x66 }, new byte[] { 0x35, 0x49, 0x87, 0xbd, 0xb2, 0xab, 0xd2, 0x7c, 0x2e, 0x34, 0x78, 0x8b, 0xf2, 0xf7, 0x0b, 0xa2 }); //IAVDenatran secure tag operation - ActivateSecureMode denatranIavCustomTagOp.tagOpActivateSecureMode = new Gen2.Denatran.IAV.ActivateSecureMode(payload); //IAVDenatran secure tag operation - AuthenticateOBU denatranIavCustomTagOp.tagOpAuthenticateOBU = new Gen2.Denatran.IAV.AuthenticateOBU(payload); //IAVDenatran secure tag operation - ActivateSiniavMode denatranIavCustomTagOp.tagOpActivateSiniavMode = new Gen2.Denatran.IAV.ActivateSiniavMode(0x81, new byte[] { 0xde, 0xad, 0xbe, 0xef, 0xde, 0xad, 0xbe, 0xef }); //IAVDenatran secure tag operation - OBUAuthFullPass1 denatranIavCustomTagOp.tagOpOBUAuthFullPass1 = new Gen2.Denatran.IAV.OBUAuthFullPass1(payload); //IAVDenatran secure tag operation - OBUAuthFullPass2 denatranIavCustomTagOp.tagOpOBUAuthFullPass2 = new Gen2.Denatran.IAV.OBUAuthFullPass2(payload); //IAVDenatran secure tag operation - OBUAuthID denatranIavCustomTagOp.tagOpOBUAuthID = new Gen2.Denatran.IAV.OBUAuthID(payload); //IAVDenatran secure tag operation - OBUReadFromMemMap denatranIavCustomTagOp.tagOpOBUReadFromMemMap = new Gen2.Denatran.IAV.OBUReadFromMemMap (payload, readptr); //IAVDenatran secure tag operation - OBUWriteToMemMap denatranIavCustomTagOp.tagOpOBUWriteToMemMap = new Gen2.Denatran.IAV.OBUWriteToMemMap (payload, wordAddress, word, writeCredential); //IAVDenatran secure tag operation - OBUAuthFullPass denatranIavCustomTagOp.tagOpOBUAuthFullPass = new Gen2.Denatran.IAV.OBUAuthFullPass(payload); //IAVDenatran secure tag operation - GetTokenId denatranIavCustomTagOp.tagOpGetTokenId = new Gen2.Denatran.IAV.GetTokenId(); //IAVDenatran secure tag operation - ReadSec denatranIavCustomTagOp.tagOpReadSec = new Gen2.Denatran.IAV.ReadSec (payload, readSecReadPtr); //IAVDenatran secure tag operation - WriteSec denatranIavCustomTagOp.tagOpWriteSec = new Gen2.Denatran.IAV.WriteSec (payload, writeSecCredential); // For G0 Tag denatranIavCustomTagOp.tagOpG0PAOBUAuth = new Gen2.Denatran.IAV.G0PAOBUAuth((byte)(payload | OBUAuthID)); denatranIavCustomTagOp.tagOpG0PAOBUAuthFullPass = new Gen2.Denatran.IAV.G0PAOBUAuth((byte)(payload | OBUAuthFullPass)); denatranIavCustomTagOp.tagOpG0PAOBUAuthFullPass1 = new Gen2.Denatran.IAV.G0PAOBUAuth((byte)(payload | OBUAuthFullPass1)); //Uncomment this for PA tag //denatranIavCustomTagOp.tagOpG0PAOBUAuth = new Gen2.Denatran.IAV.G0PAOBUAuth(payload); #endregion Tag Operation Initialization #region Standalonetagoperations //Standalone tagop Console.WriteLine("Standalone tagop without filter : "); Console.WriteLine(); denatranIavCustomTagOp.ExecuteTagOpFilter(null); Console.WriteLine("Standalone tagop with tagdata filter : "); Console.WriteLine(); denatranIavCustomTagOp.ExecuteTagOpFilter(tagdataFilter); Console.WriteLine("Standalone tagop with gen2Select filter : "); Console.WriteLine(); denatranIavCustomTagOp.ExecuteTagOpFilter(selectfilter); #endregion Standalonetagoperations #region Embeddedtagoperations //Embedded tagop Console.WriteLine("Embedded tagop without filter and fastsearch : "); Console.WriteLine(); denatranIavCustomTagOp.EmbeddedTagOpFilter(null, false); Console.WriteLine("Embedded tagop with tagdata filter and fastsearch enabled : "); Console.WriteLine(); denatranIavCustomTagOp.EmbeddedTagOpFilter(tagdataFilter, true); Console.WriteLine("Embedded tagop with gen2select filter and fast search enabled : "); Console.WriteLine(); denatranIavCustomTagOp.EmbeddedTagOpFilter(selectfilter, true); #endregion Embeddedtagoperations } } } catch (ReaderException re) { Console.WriteLine("Error: " + re.Message); } catch (Exception ex) { Console.WriteLine("Error: " + ex.Message); } }