Example, Example: 110 – ThingMagic Mercury API v1.23.0 User Manual
Page 110

Custom Serial Transport Naming
110
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 C.
main ()
{
……..
ret =
TMR_setSerialTransport(“tcp”,&TMR_SR_SerialTransportTcpNativeInit);
// where “tcp” : can be any string
// TMR_SR_SerialTransportTcpNativeInit : reference to tcp transport
factory init function.
//call TMR_create() with reader URI as tcp://readerIP:portnumber.
ret = TMR_create(rp, “tcp://172.16.16.146:1001”);
……...
}
In the “cs\Sample\Codelets” directory, there is source code for this example,
“ReadCustomTransport”, which shows how to enable reading over a “tcp” custom serial
transport layer (SerialTransportTCP.cs in the cs\ThingMagicReader directory).