From: Nordic ID Support <support@nordicid.com>
Sent: Wednesday, May 16, 2018 5:20 PM
To: Jin <jin@intensecomp.com>
Subject: RE: Sampo S2 Mono Q&A
Hi Jin,
Your application has read/write access to its home folder(and the whole application folder to be exact). So writing to "test.txt" write directly in the bin-folder i.e. if you want to write something to the backend-folder, just use "../backend/test.txt" as the path.
try
{
using (TextWriter tw = new StreamWriter("test.txt"))
{
tw.WriteLine("test write");
}
Console.WriteLine("Write succeeded");
using (TextReader tr = new StreamReader("test.txt"))
{
Console.WriteLine("Read result: " + tr.ReadToEnd());
}
using (TextWriter tw = new StreamWriter("../backend/test.txt"))
{
tw.WriteLine("test write");
}
Console.WriteLine("Write succeeded");
using (TextReader tr = new StreamReader("../backend/test.txt"))
{
Console.WriteLine("Read result: " + tr.ReadToEnd());
}
}
catch (Exception ex)
{
Console.WriteLine("Could not write file [" + ex.Message + "]");
}
I'm not sure what do you mean by the second question but you can empty local tag storage with calling hNuri.ClearTagsEx();
Best Regards,
Turo Rantanen | Technical Support Engineer
Nordic ID | Salo IoT- Campus | Joensuunkatu 7 | FI-24100 Salo | Finland
Skype turo.rantanen | Skype for Business turo.rantanen@nordicid.com
Support +358 2 727 7790 | Service +358 2 727 7791 | Direct +358 40 838 0284
www.nordicid.com| RFID Arena | Facebook | Twitter | YouTube
From: Jin <jin@intensecomp.com>
Sent: Wednesday, 16 May 2018 9.16
To: Nordic ID Support <support@nordicid.com>
Subject: Sampo S2 Mono Q&A
Hi Support,
- I'll like to store the IP address in the configuration file. How can I do it? Can I store in the Backend folder so that I can edit in the WebUI? Can you suggest? I don't want to hardcode the IP address in the source code. See image below, TcpClient.
- I'll like to refresh the inventoryResults when not tag found. Any suggestion? Based on current logic the tag will be read once and stored in inventoryResults until the application restart. Therefore I'm not able to read the latest tag.
Regards,
Jin

Comments
Post a Comment