Class: Rho::NFCTagTechnology
Direct Known Subclasses
NFCTagTechnology_IsoDep, NFCTagTechnology_MifareClassic, NFCTagTechnology_MifareUltralight, NFCTagTechnology_Ndef, NFCTagTechnology_NdefFormatable, NFCTagTechnology_NfcA, NFCTagTechnology_NfcB, NFCTagTechnology_NfcF, NFCTagTechnology_NfcV
Constant Summary collapse
- ISODEP =
'IsoDep'
- MIFARE_CLASSIC =
'MifareClassic'
- MIFARE_ULTRALIGHT =
'MifareUltralight'
- NDEF =
'Ndef'
- NDEF_FORMATABLE =
'NdefFormatable'
- NFCA =
'NfcA'
- NFCB =
'NfcB'
- NFCF =
'NfcF'
- NFCV =
'NfcV'
Instance Method Summary collapse
-
#close ⇒ Object
close connect - make it after your I/O operations.
-
#connect ⇒ Object
connect - only after it you can make any I/O operation.
-
#get_name ⇒ Object
return string.
-
#initialize(tech_name) ⇒ NFCTagTechnology
constructor
A new instance of NFCTagTechnology.
-
#is_connected ⇒ Object
return true if tech connected and ready for I/O operations.
Constructor Details
#initialize(tech_name) ⇒ NFCTagTechnology
Returns a new instance of NFCTagTechnology.
230 231 232 |
# File 'lib/extensions/nfc/nfc.rb', line 230 def initialize(tech_name) @techname = tech_name end |
Instance Method Details
#close ⇒ Object
close connect - make it after your I/O operations
245 246 247 |
# File 'lib/extensions/nfc/nfc.rb', line 245 def close Nfc.tech_close(get_name) end |
#connect ⇒ Object
connect - only after it you can make any I/O operation
240 241 242 |
# File 'lib/extensions/nfc/nfc.rb', line 240 def connect Nfc.tech_connect(get_name) end |
#get_name ⇒ Object
return string
235 236 237 |
# File 'lib/extensions/nfc/nfc.rb', line 235 def get_name return @techname end |
#is_connected ⇒ Object
return true if tech connected and ready for I/O operations
250 251 252 253 254 255 256 257 |
# File 'lib/extensions/nfc/nfc.rb', line 250 def is_connected res = Nfc.tech_is_connected(@techname) resb = false if res != 0 resb = true end return resb end |