.NET Examples

Overview

The following examples show common usages of the SDK using Microsoft .NET. We recommend that you study the examples to learn everything necessary to build your own custom applications:

Click here to download the examples ZIP file and extract to your local drive.

GetCount

A simple console example to obtain the count of devices from a database. A good example to see how our authentication scheme works. Required parameters: server, database, username, password.

ExtractMileage

An example that “extracts” vehicle mileage into a CSV or XML file. A good starting point for any data extraction tool. Required parameters: server, database, username, password, output file name.

GetLogs

A GUI example that obtains the logs for a given vehicle between a range of dates. Required parameters: server, database, username, password

TextMessage

An example that sends text messages to and from a GO device. Required parameters: server, database, username, password

ImportGroups

A console example that is also a group (node) import tool. It enables a one time import of groups to a database from a CSV file. Required parameters: server, database, username, password, input file name.

ImportGroupsR — Alpha Version

A console example that is also a group (node) import tool. Similar to the ImportGroups tool, it enables the initial import of groups into a database from a CSV file. Unlike the ImportGroups tool,  ImportGroupsR enables synchronization between an existing group tree in a database and a group tree represented by the CSV file and can be run multiple times with the same or updated CSV file. The input CSV file shall represent an entire tree of groups with which the database will be synchronized.

R in the name stands for Reference. Reference is the property of a group that should be unique and is used as the group identifier.

Required parameters: server, database, username, input file path, password, log file path.
Please see a detailed description
here.

Warning: This tool can move groups to different parent groups and can delete groups if certain command line arguments are used. Please use this tool with caution and at your own risk.

ImportDevices

Another console example that imports devices from a CSV file. Required parameters: server, database, username, password, input file name.

ImportZones

A console example that imports zones from a CSV file. This is useful if you have a list of geographic coordinates and want to quickly create zones around them. Required parameters: server, database, username, password, input file name.

ImportZonesShapeFile

Another console zone importer, but imports from an Esri shapefile set (.shp, .shx, .dbf) into a given database. Required parameters: server, database, username, password, input file name.

ImportUsers

Another console example that imports users from a CSV file. Required parameters: server, database, username, password, input file name.

DataFeed

An example of retrieving GPS, Status and Fault data as a feed and exporting to a CSV file. Required parameters: server, database, username, password, last known GPS data/status data/fault data/trip/exception id, save folder, continuous