Agent

Top  Previous  Next

The AggreGate Agent is one of the most complex and versatile concepts in the AggreGate universe. In this part of the manual, we will attempt to explain its purpose, function, and importance.

note_glossary-term

The term Agent bears defining. The inspiration for this term comes from the following sense of the word:

1. somebody representing another: somebody who officially represents somebody else in business

[Microsoft® Encarta® 2006. © 1993-2005 Microsoft Corporation.]

The Agent is a an external hardware device running a special Tibbo BASIC application. The Agent communicates with LinkServer on behalf of the serial device(s) connected to it.

Plugin-Driven Devices vs. Agent-Driven Devices

The LinkServer can communicate with a device in one of two principal ways:

 

1.`Via a dedicated Data Transfer/Device Plugin: Using this method, the LinkServer processes a raw stream of data from a serial device connected to a Device Server. The Data Transfer plugin allows the LinkServer to correctly parse and 'understand' the data from this specific serial device, and thus make it accessible via the various LinkServer facilities (events, reports, context trees, etc.). This plugin is a Java software component running on the server side. The plugins are 'one-off' -- meaning, to connect a different device to LinkServer using this method, you would need a different plugin which 'understands' the protocol used by the new device. Writing such a plugin requires extensive familiarity with LinkServer internals and Java programming. Currently, this is not the recommended development path for integrating new devices into the LinkServer enterprise platform.
2. Via a Agent: The Agent is a hardware device (such as EM1000) running a special-purpose Tibbo BASIC application. This hardware/software combination acts as a mediator between the actual hardware device (connected to Agent using serial, Wi-Fi, GPRS or other link) and the LinkServer. Connection between LinkServer and Agent is established over IP network.

Let's discuss this second modus operandi a bit further:

When using an Agent, data conversion is done in hardware. The Tibbo device running the Agent BASIC application receives a stream of data from the hardware device using the device's own native protocol. It then converts this stream into a LinkServer generic protocol, and sends it to the LinkServer. When receiving instructions from the LinkServer, the Agent converts them back into the device-specific protocol and sends them to the device. In effect, the Agent BASIC application is composed of two primary parts:

 

1.Device-Specific side: This part of the code is written specifically for the particular hardware device connected to the Agent hardware platform. This is the only part which has to be modified to make AggreGate work with any new hardware device.
2.Network side: This part of the code handles all LinkServer communications. This is a generic part. In effect, it completely emulates a fixed-functionality hardware Device Server: It answers broadcast requests, communicates with LinkServer using the AggreGate Communications Protocol and is even detectable using Tibbo Device Server Manager (software used for administering fixed-functionality Device Servers in different situations). This part never has to be changed to make AggreGate work with a new device.

You may think of the AggreGate as a hardware-based driver. If you have a hardware device you wish to plug into AggreGate so it would exploit all of the power and benefits of the system, all you have to do is just modify one specific Tibbo BASIC file, and voila - you've got complete AggreGate connectivity for your device!

Agent application provides AggreGate operators several methods to control, monitor and configure hardware devices connected to it:

It exposes the internal settings of your device to LinkServer, so that settings such as Number of Records to Keep (for a time clock) or Maximum Permitted Speed (for a forklift) will be seamlessly displayed and edited in any LinkServer User Interface (such as AggreGate Client).
It allows to execute different operations with the device, such as Perform Self Test or Send Message To Device LCD. Operators may specify input parameters for every operation and view their execution results.
It helps to monitor events generated by a device, such as User has entered the area or User has exited the area for the Access Control Terminal. LinkServer stores all device events persistently and provides access to their history for system operators.

In addition, one AggreGate hardware platform can be connected to several different devices. For example, you could use a 4-port EM1000 programmable module manufactured by Tibbo as your hardware platform, and connect it to 4 serial devices (time clocks, for example). Your Agent application will allow access to each of these time clocks as if it were individually connected to the network.

Agent has a counterpart on LinkServer -- Data Transfer/Device Plugin called AggreGate Agent Device Plugin. This plugin is responsible for all communications between LinkServer and Agent.

Using Agent As a Core Hardware Component

Since Tibbo BASIC and the hardware running it are powerful solutions, another option would be to build your system around a Tibbo processor running the Agent application. In such a case, you could hook the peripheral components of your system (LCD, keypad, etc.) directly to the Tibbo processor and use it as the main CPU for your system. You would then code your device logic in Tibbo BASIC, as part of the Agent application. This would provide your new device with native AggreGate functionality.

Sorting Out The Terminology

When referring to AggreGate, several different yet similar terms are used:

A Device, or Data Terminal is the end-of-the-line hardware device. This is the actual machine doing the work - your Time Clock or PLC, etc.

A Device Server is a hardware platform connecting the Device to the LinkServer. The Device Server connects to LinkServer, logs on, and transfers data packets between the Device and the LinkServer. Sometimes the Device Server is built into the Device, making it seem like one unit in the real world. Yet for LinkServer, these are always two distinct units.

Agent Software is a program written in Tibbo BASIC, customized to communicate with certain type(s) of devices. This software can be installed on numerous physical <%AGENT%>s.

Customizing Agent For Your Devices

The Agent application may be customized to connect any existing or newly created device to AggreGate. You just have to modify a single BASIC source file and provide:

Definitions for device settings, operations and events,
Code that implements reading and writing device settings,
Code for forwarding operation requests to devices,
Code for polling the device for events or receiving events asynchronously and sending them to the server.

This requires you to be proficient in Tibbo BASIC, which is well documented. For more information and consulting services contact Tibbo.