lib/zklib/attendance_management.rb
def decode_attendance_data(options)
      data = options[:data]
      
      {
        uid:       data[0..3].split("\u0000").pop.to_i,
        id:        data[4..7].split("\u0000").pop.to_i,
        state:     BinData::Uint8le.read(data[28]).snapshot,
        timestamp: decode_time(seconds: BinData::Uint32le.read(data[29..-1]).snapshot),
      }
    end
# Decode attendance data
#
# param  options
#        |_ data  Attendance data to decode
Decode attendance data
param  options
|_ data  Attendance data to decode
Decode attendance data param options |_ data Attendance data to decode
def decode_attendance_data(options)
      data = options[:data]
      {
        uid:       data[0..3].split("\u0000").pop.to_i,
        id:        data[4..7].split("\u0000").pop.to_i,
        state:     BinData::Uint8le.read(data[28]).snapshot,
        timestamp: decode_time(seconds: BinData::Uint32le.read(data[29..-1]).snapshot),
      }
    end
def decode_attendance_data ( options ) data = options [ :data ] { uid : data [ 0 .. 3 ] . split ( "\u0000" ) . pop . to_i , id : data [ 4 .. 7 ] . split ( "\u0000" ) . pop . to_i , state : BinData :: Uint8le . read ( data [ 28 ] ) . snapshot , timestamp : decode_time ( seconds : BinData :: Uint32le . read ( data [ 29 .. - 1 ] ) . snapshot ) , } end
Decode attendance data
param  options
|_ data  Attendance data to decode
Decode attendance data param options |_ data Attendance data to decode
options