public void Felica_GetIDm_Suica() { using (var felica = new Felica(FelicaSystemCode.Suica)) { Debug.WriteLine(felica.GetIDm().ToHexString()); } }
static void ReadEdyBalanceEtc() { using (var felica = new Felica(FelicaSystemCode.Edy)) { Console.WriteLine(felica.GetIDm().ToHexString()); Console.WriteLine(felica.GetPMm().ToHexString()); var data = felica.ReadWithoutEncryption(FelicaServiceCode.EdyBalance, 0); Console.WriteLine(new EdyBalanceItem(data).Balance); } }
static void Test1() { for (int i = 0; i < 1000; i++) { Console.WriteLine("Start"); using (var felica = new Felica(FelicaSystemCode.Edy)) { Console.WriteLine("FeliCa ポート: {0}", felica.TryConnectionToPort()); Console.WriteLine("IC カード: {0}", felica.TryConnectionToCard()); try { Console.WriteLine(felica.GetIDm().ToHexString()); } catch (Exception ex) { Console.WriteLine(ex.Message); } try { Console.WriteLine(felica.GetPMm().ToHexString()); } catch (Exception ex) { Console.WriteLine(ex.Message); } try { var data = felica.ReadWithoutEncryption(FelicaServiceCode.EdyBalance, 0); Console.WriteLine(new EdyBalanceItem(data).Balance); } catch (Exception ex) { Console.WriteLine(ex.Message); } } } }