Closed mribichich closed 6 years ago
device firmware v6.60 Aug 10 2015
@bulentv what do you think about this? I was thinking that maybe we could solve it with two options:
parsing
function in getattendances
to be use instead of the default one (which is the one its there right now). The func would be optional of courseThe drawback from this one is that the decode func I have to use will not be in the lib, so others cannot use it
ZKLib.prototype.getattendance = function(decodingFunc, cb) {
what do you think?
thanks
@mribichich
I definetely prefer the second option. If you can implement your decoder in some file, named like att_parser_v6.60.js so we can import and refer it in the config. I will in the meantime move the existing parser to a separate file called att_parser_legacy.js.
One issue is unfortunately I no longer have access to any device to test the code. Hope we will have some feedback.
Please continue using ES2015 styling, I'm converting the other files as well.
Thanks
Ok great, I like it better too.
I of course have access to the one I'm using but only that one.
I'll let you know when its ready.
thanks
@bulentv were you able to separate the decoder like you said to a att_parser_legacy.js ?
How do you want to handle the require of the possible decoders?
As an option? maybe something like:
options: {
attendanceDecoder or attendanceParser: 'legacy' or '6.60'
}
is that ok?
I can extract both if you want
Yes, it would be great. I haven't had time to do it, completed the es2015 transition though.
Hi there. I've been trying to use your library, but it seems that I may have a different version of zkaccess, because the GetAttendace message is not being parse correctly
In line 19 you have:
But the uid and id are empty or wrong.
This is the buffer that comes:
I had to change it to this in order to work:
I would love to PR back to the lib, but is it working for you? How could we make it compatible with your version of the protocol and mine.
The version command returns 10
thanks!