Thingmagic Mercury API v1.23.0 Manuel d'utilisateur Page 112

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 128
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 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”);
………
}
}
Vue de la page 111
1 2 ... 107 108 109 110 111 112 113 114 115 116 117 ... 127 128

Commentaires sur ces manuels

Pas de commentaire