Click here to Skip to main content
14,691,039 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello
I have 4 ZK-rfid101R reader which released with a SDK API for programmers...
I actually need to create a program to connect to 4 of them simultaneously and read data from them bur just with one program.
I need to create a list<> of that api and give which to each reader.
But there is a big problem.the problem is that that api is a static class api which doesn’t let me create generic lists or instances of that...
Please help me what can i do in c#

What I have tried:

List<api>
....................................................
Posted
Updated 7-Sep-20 16:41pm

1 solution

You don't make multiple instances of the API SDK. That's not a thing at all.

How you do this depends on the interface of the device. How do these thing connect to the PC?
   
Comments
Mohammad Razmi 7-Sep-20 21:42pm
   
More over i have 3 readers from another company that released with a public class API and let me to create generic list of that Api for each ip and port that is connected to the network,so because of that List<api> they are working perfectly and there is no problem with those ones.
They are all connected to the network using a switch/router.
My program works in this way that the user have to just enter a IP address and a port number and the program will try to connect all of the IP/port list entered by user.
Dave Kreskowiak 8-Sep-20 0:05am
   
What you're calling the "API" really isn't. It's just a wrapper class that you create an instance of that talks to a specific device.

The same thing may be possible for these devices, but only the documentation on the SDK is going to tell you that.
Mohammad Razmi 8-Sep-20 1:20am
   
I just need to connect to reader and read tags,don’t need any other method listed in that static api.
Could you help me with creating a dll which i could just connect to that ZK and read tags?
What do i need in c#?
Sockets class?i’m not that much pro in c# but if you say keywords i would search and find a way
Dave Kreskowiak 8-Sep-20 12:38pm
   
I don't really care what previous hardware you've used. You still haven't said how your current devices are connected to the PC.
Mohammad Razmi 8-Sep-20 12:46pm
   
they are connected using a router bro
is there any way out of List<> for creating and connecting to that API per each reader?
Dave Kreskowiak 8-Sep-20 15:42pm
   
Got the documentation on the SDK?
Mohammad Razmi 8-Sep-20 15:44pm
   
Yes i do.
But there is no method helping in connecting several readers at the same time
Mohammad Razmi 8-Sep-20 15:46pm
   
Could you give your email or facebook account so i could send files to you bro
Dave Kreskowiak 8-Sep-20 16:03pm
   
Nope, and stop calling everyone "Bro".

Post the link to the download instead.
Mohammad Razmi 8-Sep-20 16:14pm
   
Okay, sorry.
here you are

http://uploadb.me/qdhoz2r6519v/RFID101R.zip.html
Dave Kreskowiak 8-Sep-20 16:51pm
   
Yeah, I'm not touching that link. The one from the vendor for the documentation.
Mohammad Razmi 8-Sep-20 16:53pm
   
So just tell me where to upload my documents?
Dave Kreskowiak 8-Sep-20 17:13pm
   
Nevermind. I fired up one of my virtual machines to download it.

That's not documentation at all. It's nothing more than a bunch of function headers and everything else is in Chinese that I can't read.
Mohammad Razmi 8-Sep-20 17:15pm
   
There is a word file inside SDK folder.is’t that documentation?
Dave Kreskowiak 8-Sep-20 17:42pm
   
A list of function headers is not documentation. Documentation explains how to use the library. That doesn't have anything like that and it's entirely in Chinese. Good luck getting that translated.
Mohammad Razmi 9-Sep-20 0:36am
   
Could you please just say that is there any way to create a list or another alternative of a static API ?
Dave Kreskowiak 9-Sep-20 10:18am
   
No, not in the way you're describing.

You'd have to write your own class that "wraps" an instance of a reader, implementing the functionality you need and using the functions in the SDK library to accomplish that.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900