Template command with argument
Note: for an updated version of this and other articles, we recommend you to check our knowledge base here
Requires GpsGate Server v2.3 build 1944 or later
Here is a plugin to demonstrate executing a template command, taking a phone number as argument, for a selected device. GpsGate has a flexible plugin framework, which you can use to easily extend functionallity. Source code is included in this sample.
Install and run the sample - step by step:
1. Download and unzip http://franson.com/gpsgateserver/samples/TemplateCommandWithArgument.zip
into to a directory “[install_path]\IIS\Resources\ScriptPlugins\MyPlugins\TemplateCommandWithArgument”
where install_path is where you installed GpsGate Server.
2. Login to SiteAdmin. Go to the “Script Plugin” tab. Click on “Refresh Script Plugins”. A plugin named "TemplateCommandWithArgument" should be present in the drop down.
3. Select TemplateCommandWithArgument in the drop down. Check the applications for which to enable the plugin. Click "Save". The plugin is now enabled for the selected applications.
4. Create and save a new command "MyTemplateCommand" having a template containing the parameter [phoneNr] in SiteAdmin (see screenshot below) for the protocol of your device type.
5. Login to the application for which you enabled the plugin. A menu named "windows" should exist with an item named "TmplCmdWithArgument". Click the "Windows" -> "TmplCmdWithArgument" menu item and the window should pop up.
6. Select a vehicle.
7. In the plugin window, the list of devices is now be updated with all devices for the selected vehicle. Select a device having the protocol that now supports the "MyTemplateCommand" command.
8. Enter a phone number in the textbox.
9. Click Execute. The command should now be sent to the selected device.
The source code for this plugin may be modified and reused in any way.
Take a look in "Display Platform Kit" for how you develop your own custom Windows in VehicleTracker. Download the "Display Platform Kit" here: