FarSync SDK
Developers Toolkit
The FarSync SDK Developers Toolkit provides everything the developer requires to use the APIs on the FarSync adapter product range
Overview
The SDK supports writing applications to use the FarSync range of products on both Linux and Windows. It contains documentation, working sample applications, user libraries and test utility applications. There is everything a user needs to rapidly develop and test a wide variety of applications using synchronous (HDLC framed) protocols, V.120, LAPB, asynchronous data or transparent bitstreams including Audio, G.704, MPEG Video T-DMB, DAB STI and DAB ETI with the bitstream encoder and decoders provided.
The SDK is intended to allow easy access to the set of hardware features offered by the various adapters in the FarSync range whilst also providing additional software encoding and decoding to supplement that provided by the hardware.
Our Engineering department provides free email and telephone assistance to application developers using the API as part of the package provided when the FarSync SDK is purchased.
This toolkit is not appropriate for the FarSync X25 range of products since they are supplied with their own specialist X.25 Toolkit already included. FarSync X25 cards can also support modes of operation as described in this page in addition to X.25.
Technical Details
Products supported by the SDK | Adapter Type | Product Code | Windows API | Linux API |
---|---|---|---|---|
FarSync Flex | USB | FS4100 | yes | yes |
FarSync T1U | PCI | FS4140 | yes | yes |
FarSync T2U | PCI | FS4240 | yes | yes |
FarSync T4U | PCI | FS4440 / FS4441 | yes | yes |
FarSync T4E+ | PCI | FS4446 | yes | yes |
FarSync TE1 | PCI | FS4150 | yes | yes |
FarSync TE1e | PCIe | FS4155 | yes | yes |
FarSync T2Ue | PCIe | FS4250 | yes | yes |
FarSync T2Ee | PCIe | FS4256 | yes | yes |
FarSync K2Ee | PCIe | FS4266 | yes | yes |
FarSync T4Ue | PCIe | FS4450 / FS4451 | yes | yes |
FarSync T4Ee | PCIe | FS4456 | yes | yes |
FarSync T2U-PMC | PMC | FS4280 / FS4281 | yes | yes |
A number of easy to follow sample applications are provided demonstrating the wide variety of features available with the adapters. GUI based demonstration and test utilities are supplied capable of utilizing the wide range of features supported by the adapters.
C, C#, VB and LabVIEW sample applications are supplied with the SDK. These support the range of communications modes supported by the FarSync adapters.
The Windows based interface common to the entire range of FarSync cards/devices is referred to as the FarSync Windows API (FsWinAPI). This is an extension of the MS Win32 COMM API and enables, for example, applications developed to support COM ports, to be easily ported to use FarSync support in both E1, synchronous or asynchronous modes. This standardization enables the API to also be readily accessible from higher level environments such as .NET (C#, VB etc.
The majority of the API is line protocol-independent so applications can select between them easily (e.g. HDLC, Async, LAPB, DAB-ETI etc.).
The number and size of internal buffers can be configured to match application-specific latency requirements and scheduling characteristics.
The support for asynchronous I/O provides for optimised application designs without the need for polling.
FsWinAPI is a superset of the earlier SDCI API and so is backward-compatible with existing applications previously developed for the FarSync range of cards/devices.
The FsWinAPI User Guide manual is provided as part of the product in a PDF format, it provides a comprehensive set of function call definitions and helpful advice on the best way to utilise the interface.
Dynamic switching between Async and Sync line operation is supported.
Configuration of the various type of line signalling, NRZ, NRZI, Manchester Encoding, Conditioned Diphase, FM1 and FM0 are handled by various adapters in the range – see each particular adapter for a list of which line signals formats are supported.
Both 32 and 64-bit applications are supported.
Synchronous HDLC, LAPB and V.120
The FsWinAPI allows connections both in raw HDLC frame mode, and the line error correcting LAPB and V.120 modes. The number and size of buffers used can be configured to achieve the optimum balance of throughput and latency.
Transparent bitstream operation
The driver has built in transparent bitstream encoding-decoding support that handles a number of common protocols commonly passed over a continuous bitstream. The protocols handled include G.704, MPEG Video T-DMB, DAB ETI.
The driver can be configured to identify and extract most fixed-length byte-oriented user frames; where frames can be defined in terms of single or alternate synchronizing patterns, frame length and number of sync patterns to acquire sync. It provides, for example, low level frame handling for E1 and DAB-ETI.
Sample send and receive programs demonstrating common modes of operation are supplied with sample data files.
DAB modes supported:
ETI
ETI(NI, G.703) and ETI(NI, G.704) – on the FarSync adapters of type TE1, TE1R and TE1e.
ETI(NI, V.11) – on the FarSync adapters of type Flex, T1U, T2U, T2Ue, T2Ee, T4U, T4Ue, T4E+, T4Ee and T2U-PMC.
The API also handles completely transparent bit streaming operation which could be used, for example, to support a non-standard protocol or, for instance, raw Audio.
For bitstream operations the driver supports the ability to define the amount of buffering used in the data path. This feature is vital to allow reliable continuous line transmissions required for bitstream operation while the applications driving them are rescheduled. This buffering requirement must be balanced with the latency constraints of the transmission path.
Note: For DAB STI modes the General Bitstream encoding – decoding library should be used.
Extended Clocking
The FsWinAPI supports the TE1e card’s option to use an externally sourced rate adapted clock to drive the E1 line, this is commonly used in DAB and DMB operations.
It also supports the extended clocking features of the FarSync T4E+ that allows external clocks to be remotely sourced, rate adapted and supplied to selected ports on the adapters. Alternatively a clock from one of the ports can be used to drive the clocks of all the other ports.
Asynchronous Operation
To operate a port with asynchronous data under Windows, the FarSync driver supports an extension of the standard MS COMM API. This enables applications that currently interface to standard serial ports on Windows to be easily ported to use FarSync ports in asynchronous mode.
The FarSync Flex actually appears as a “COM port” device when configured for async mode and so can be used directly with standard or ported COM port-based apps.
Asynchronous operation is available for the FarSync T4Ee and FarSync Flex/Flex+.
The Linux API allows applications to send and receive HDLC format (bitsync) frames and also transparent bitstreams using the Char I/O API.
Sample applications supplied with the Developers Toolkit demonstrate both modes of operation. The source for the applications and drivers are included, with the Linux API manuals provided in PDF format. A monitor program is included in the Linux support that allows data sent and received by the application to be recorded in hex format.
Synchronous and E1 Operation
The API can supports data rates to 10 Mbits/s per port, with all the ports individually selectable for speed, clocking direction and mode of operation. For the maximum speeds supported by a particular adapter check the FarSync products particular technical specification.
Frame sizes up to 32 Kbytes are supported in HDLC mode to allow support for a wide variety of specialist synchronous protocols.
The transparent bitstream mode is suitable for transparent data requirements such as Audio, MPEG Video T-DMB, DAB STI and DAB ETI. See also the General Bitstream encoding and decoding library which can help shortcut the development time needed for these types of applications.
The API allow the full range of internal clock speeds to be selected and also selection of extended clocking options supported by FarSync adapters such as the FarSync T4Ee and T4E+.
Configuration of the various type of line signalling, NRZ, NRZI, Manchester Encoding, Conditioned Diphase, FM1 and FM0 are handled by various adapters in the range – see each particular adapter for a list of which line signals formats are supported.
LAPB Operation
An API to the LAPB protocol is available though the hdlcX interface, all the ports on the adapters can be addressed by this method.
Asynchronous Operation
Asynchronous operation is available from the standard TTY interface for the FarSync T4Ee and FarSync Flex/Flex+. Dynamic switching between Async and Sync operation is supported.
Note: A Raw Sockets API is also available on Linux to support the adapters, though this interface is now deprecated.
The FarSync API can also be used by LabVIEW applications/VIs. This support includes a set of LabVIEW-compatible methods and properties supported by a COM API interface layer which is supplied in extensible source form to enable even further customisation by the user if and when required to suit their particular application design.
An example VI (LabVIEW executable/program) for Windows is included in the FarSync SDK. This example demonstrates how to interface to the FarSync adapters from LabVIEW and illustrates control and configuration of the FarSync port as well as example data transfer usage.
The FarSync API can also be used by LabVIEW applications/VIs. This support includes a set of LabVIEW-compatible methods and properties which are supplied in extensible source form to enable even further customisation by the user if and when required to suit their particular application design.
An example VI (LabVIEW executable/program) for Linux is available on request for use with the FarSync SDK. This example demonstrates how to interface to FarSync adapters from LabVIEW on Linux.
A library is provided that allows low level encoding and decoding of the transparent bitstream for speedy application development of your Linux application. The library can be configured to identify and extract most fixed-length byte-oriented user frames; where frames can be defined in terms of single or alternate synchronizing patterns, frame length and number of sync patterns to acquire sync. It provides, for example, low level frame handling for E1, DAB-ETI or DAB-STI.
The library is available on request for Windows for compatibility with legacy applications or for use with DAB STI mode. For new applications we recommend using the low level encoding and decoding built into the Windows driver.
Sample send and receive programs demonstrating common modes of operation are supplied with sample data files.
DAB modes supported:
ETI
ETI(NI, G.703) – on the FarSync adapters of type TE1, TE1R and TE1e
ETI(NI, V.11) – on the FarSync adapters of type Flex, T1U, T2U, T2Ue, T2Ee, T4Ee, T4U, T4Ue, T4E+ and T2U-PMC.
STI
STI(PI, G.703) – on the FarSync adapters of type TE1, TE1R and TE1e
STI(PI, V.11) – on the FarSync adapters of type Flex, T1U, T2U, T2Ue, T2Ee, T4Ee, T4U, T4Ue, T4E+ and T2U-PMC.
The library is available in 32 and 64 bit form.
fswdemo is provided with the FarSync SDK and is intended to demonstrate and test the operation of the Windows FsWinAPI interface and also provide a really useful and powerful tool for checking various operating modes of the FarSync adapters.
Both HDLC frame and Transparent bitstream modes can be tested. Selection and testing of multiple lines and adapters is supported.
Reference manuals | Windows FsWinAPI User Guide manuals (set of 4) Linux Char I/O API User Manual, Linux Raw Sockets User Manual (interface now deprecated), Linux LAPB API Manual, RS485 application guidelines (for the FarSync Flex, T2Ee, K2Ee T4E+, T4Ee), Bitstream Encoder/decoder User Manual, FarSync Flex Monitor User Manual. |
Sample programs | Sample applications supplied that use FsWinAPI, Char I/O APIs, Raw Sockets APIs and the bitstream encoder/decoder. There are also adapter performance check and adapter function test applications. |
Source code | Sample code in: C .NET (C# and VB) and LabVIEW VI. |
Bitstream encoding and decoding | Library and sample programs supporting decoding of bitstream data, can be configured to support many different fixed length bitstreams such as ETI, STI and E1 framing. |
Customer Support | Free email and telephone assistance to the application developer using the API as part of the package provided when the FarSync SDK is purchased. |
Order Information
Product Name | Description | Product Code |
FarSync SDK | Linux and Windows Developers Toolkit for the FarSync adapters - this is required if you want to write software to use the FarSync adapter APIs. Note: This toolkit is not suitable for the FarSync X25 range of products or the FarLinX Gateways, they are supplied with their own toolkit. | FS9610 |