beautypg.com

Advanced customization, Custom serial transport naming, Implementation – ThingMagic Mercury API v1.23.0 User Manual

Page 105

background image

Advanced Customization

105

Advanced Customization

Custom Serial Transport Naming

Starting with version 1.23.0 of the MercuryAPI SDK, users can write their own custom
serial transport layer to handle different types of serial connections, and create a unique
URI name for it. The SDK provides an example of this for serial connections over TCP
networks, for each of the supported OS’s.

Two devices have been tested with this implementation. (Each has their own Windows-
based configuration tool)



WIZnet WIZ110SR Serial-to-Ethernet Gateway



Tibbo Technology DS1101 BASIC-programmable Serial Controller

Implementation

The SDK now contains a table-based dispatcher and a common API for calling the
different constructors.

Before calling Reader.Create(), the user application should set up the URI dispatch table
(a mapping from string to factory function). Examples for each OS are provided below.



Users can add new entries with their own choice of strings and factory functions.



When Reader.Create is called, it will:



Parse the reader URI to get the URI scheme (e.g., eapi:///COM1 -> “eapi”)



Look up the URI scheme in the URI dispatch table to get a pointer to a factory

function (e.g., “eapi” -> CreateSerialReader)