How to add a new parameter in OpenGTS XML report?

70 Views Asked by At

I'm enabling the OpenGTS XML reports so clients can ask the info to the server but I want to add a couple of columns so the client get a better report.

I was reading the java files and seems like is configurable but I can't figure out how.

Does somebody knows how?

1

There are 1 best solutions below

3
On

Well, I don't know OpenGTS, but according to the docs (Appendix C, page 49) and B.6) How do I enable available optional table columns? you can add columns by specifying them in the various config files:

B6) How do I enable available optional table columns? [_] Various tables within GTS provide for additional table columns which can be used for special application requirements. These table columns can be enabled by setting specific property values within one of the available ".conf" files (ie. "config.conf", etc). Here is a summary of the common types of available additional table columns:

Account table additional columns:
    startupInit.Account.AddressFieldInfo
    startupInit.Account.AccountManagerInfo
Device table additional columns:
    startupInit.Device.NotificationFieldInfo
    startupInit.Device.LinkFieldInfo
    startupInit.Device.BorderCrossingFieldInfo
    startupInit.Device.GeoCorridorFieldInfo
    startupInit.Device.MaintOdometerFieldInfo
User table additional columns:
    startupInit.User.AddressFieldInfo
EventData table additional columns:
    startupInit.EventData.AddressFieldInfo
    startupInit.EventData.GPSFieldInfo
    startupInit.EventData.CustomFieldInfo
    startupInit.EventData.CANBUSFieldInfo
    startupInit.EventData.ThermoFieldInfo
    startupInit.EventData.AnalogFieldInfo
    startupInit.EventData.ServingCellTowerData
    startupInit.EventData.NeighborCellTowerData

For more information on the available optional table columns, and how they can be enabled, see Appendix C in the OpenGTS® Configuration/Installation manual at the following link:

OpenGTS® Installation/Configuration Manual

After making any changes to the runtime configuration to define additional table columns, the database tables themselves need to be updated to add the new columns to the existing tables. The following Linux commands will update the tables with the newly added fields:

cd $GTS_HOME
bin/dbAdmin.pl -tables=ca

On Windows, the commands would be as follows:

cd %GTS_HOME%
bin\dbConfig.bat -tables:ca

(Note: this command make take some time to complete if there are over 1 million records in the tables, such as the EventData table. Please plan accordingly.) Also Rebuild/Redeploy the "track.war" file, and restart any running DCS modules, so that these modules will also pick up the new table column changes.

Source: http://www.opengts.org/FAQ.html#faq_optionalFields