Class: MIFARE::DESFire::FILE_PERMISSION
- Inherits:
-
Struct
- Object
- Struct
- MIFARE::DESFire::FILE_PERMISSION
- Defined in:
- lib/mifare/des_fire.rb
Overview
value 0x00 ~ 0x0D are key numbers, 0x0E grants free access, 0x0F always denies access
Instance Attribute Summary collapse
-
#change_access ⇒ Object
Returns the value of attribute change_access.
-
#read_access ⇒ Object
Returns the value of attribute read_access.
-
#read_write_access ⇒ Object
Returns the value of attribute read_write_access.
-
#write_access ⇒ Object
Returns the value of attribute write_access.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#change_access ⇒ Object
Returns the value of attribute change_access
126 127 128 |
# File 'lib/mifare/des_fire.rb', line 126 def change_access @change_access end |
#read_access ⇒ Object
Returns the value of attribute read_access
126 127 128 |
# File 'lib/mifare/des_fire.rb', line 126 def read_access @read_access end |
#read_write_access ⇒ Object
Returns the value of attribute read_write_access
126 127 128 |
# File 'lib/mifare/des_fire.rb', line 126 def read_write_access @read_write_access end |
#write_access ⇒ Object
Returns the value of attribute write_access
126 127 128 |
# File 'lib/mifare/des_fire.rb', line 126 def write_access @write_access end |
Class Method Details
.import(byte) ⇒ Object
127 128 129 130 131 132 133 134 |
# File 'lib/mifare/des_fire.rb', line 127 def self.import(byte) self.new( (byte >> 12) & 0x0F, (byte >> 8) & 0x0F, (byte >> 4) & 0x0F, byte & 0x0F ) end |
Instance Method Details
#export ⇒ Object
136 137 138 |
# File 'lib/mifare/des_fire.rb', line 136 def export (read_access << 12) | (write_access << 8) | (read_write_access << 4) | change_access end |