AWP Toolkit Programmers Intro

This tutorial is aimed at C developers who will be creating agents based on AWP to communicate to the Axeda Platform.

Introduction
While wireless costs have come down recently, the fact remains that its expensive. If you’re developing a wireless asset, Axeda Wireless Protocol (AWP) provides an efficient way for wireless assets to communicate with a central server.

AWP is language and platform neutral. It is defined in ASN.1 syntax, so you can generate code in the language of your choice. Still, there is work to create an agent behavior even if the protocol code is generated.

Axeda AWP toolkit is a C language library and set of code samples to make it easy to create a wireless agent. C is still the most common language in embedded controllers. The AWP toolkit is ready to compile on Linux and Windows platforms, but it is designed to port to any controller and OS.

The AWP toolkit specifically does not require or assume threading or even a file system. Your application may have threads, but it needs to call the AWP toolkit’s execute() function periodically for the library to do its work. The library will call the application’s callbacks when there is information to act on or persist, but it doesn’t access a file system directly. Its your decision where to store information.

The AWP toolkit is a library that handles communications and data. Your app controls the asset and has access to sensor readings, any collected data, and problems or fault codes. Your code passes information to the toolkit, where it is processed by rules, queued, and then sent to the Axeda Platform. The toolkit also receives messages from the Axeda Platform and takes action.

The AWP toolkit has rules that determine how data will be processed. Your application probably will create rules that publish some or all data values, alarms, and locations. In addition, you can create rules on the Axeda Platform that download and run in the agent.

Threshold rules apply to a variable or location, with some condition. The action is to send data, or to set an output. Usually the rules are used to filter data transmission. For example, if you want temperature readings only when they exceed 90, or change by 8, then the rule should send temperature when that condition is true. Locations can be handled the same way – the rule can send location only when it changes by 100’ or the asset leaves a geofence. Rules can also create alarms when a condition is true.

This article contains more detail including

  • Running the AWP Agent
  • Agent Structure
  • Memory Management
  • Context
  • Channels and Providers
  • Callbacks
  • Rules defined by Agent
  • Rules downloaded from Platform
  • Toolkit Contents
  • Object Oriented constructs in the AWP Toolkit