Thingmagic Mercury API v1.23.0 Instrukcja Użytkownika Strona 112

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 128
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 111
Custom Serial Transport Naming
112 Advanced Customization
Example
In MercuryAPI we have added support for a TCP serial bridge. The TCP serial bridge
allows the user to connect to a serial reader using TCP/IP and a port number. We have
added the custom transport file for TCP serial bridge. The following code example shows
how to implement it in Java.
class CustomTransport
{
public static void Main(string[] args)
{
……
Reader.setSerialTransport("tcp",new SerialTransportTCP.Factory());
// Add the custom transport scheme before calling Reader.create()
// This can be done by using function Reader.setSerialTransport()
// It accepts two arguments. scheme and Factory object.
// scheme: the custom transport scheme name. For demonstration
// purposes, we are using scheme "tcp".
// Factory object: reference to the serial transport.
// Call Reader.Create() method with reader URI as tcp://
readerIP:portnumber.
Reader.create(“tcp://172.16.16.146:1001”);
………
}
}
Przeglądanie stron 111
1 2 ... 107 108 109 110 111 112 113 114 115 116 117 ... 127 128

Komentarze do niniejszej Instrukcji

Brak uwag