GMS Parser Service for GC Download
Overview
The GMS Parser Service for GC Download functionality for ACM is a Windows Service application that manages GMS (Gas Measurement System) XML files of a specific format and creates GC Write requests from these files to be sent to a device. Each record in a GMS file is validated for mole sum component rules and then a write request is made via the asiGCWriteRequest API. This document will discuss how to use the service.
GMS XML Files
The format of this file looks like the following and may contain more than one record:
<?xml version="1.0"?> <!DOCTYPE TCinterface SYSTEM '<internal to='' TCPL='''> <TCinterface applicationCode="GMS" schemaVersion="1.0"> <transfer system="SI" sequenceNum="xxxxxxxxxx"> <gasAnalysis basis="hourly"> <facilityId system="NGTL">11111</facilityId> <gasCompRefNo>Z12345678</gasCompRefNo> <effectiveTime> <year>2011</year> <month>01</month> <day>20</day> <hour>10</hour> <minute>00</minute> <second>00</second> </effectiveTime> <analysisQuality level="valid" /> <specificGravity>0.55</specificGravity> <heatingValue>37.4</heatingValue> <componentAnalysis> <N2>1.3</N2> <C1>95.8</C1> <C2>1.6</C2> <C3>0.08</C3> <CO2>0.8</CO2> <nC4>0.004</nC4> <iC4>0.002</iC4> <nC5>0</nC5> <iC5>0</iC5> <C6>0.0004</C6> <C7>0.0004</C7> <C8>0</C8> <C9>0</C9> <C10>0</C10> <He>0.02215</He> <O2>0</O2> <H2S>0</H2S> <H2O>0</H2O> <H2>0.20829</H2> <C6Plus>0.000864</C6Plus> <Argon>0</Argon> <CO>0</CO> </componentAnalysis> <processingTime> <year>2011</year> <month>01</month> <day>20</day> <hour>10</hour> <minute>12</minute> <second>34</second> </processingTime> </gasAnalysis> <gasAnalysis basis="hourly"> ......</gasAnalysis> // Can be one or more records </transfer> </TCinterface>
The facilityId node indicated in red above must map to a meter configuration object in ACM in order for the GC write request to be created for that device/meter combination.
Meter Mapping Between Systems
To correctly map the facilityId with that of a device/meter in ACM, a device configuration must be present. When a request is being added, the database executes several stored procedures to resolve the tblGcWritePending.MeterId and tblGcWritePending.DeviceName for that request. There are two methods in which the meter can be mapped successfully:
- If the meter object name in ACM matches the value facilityId
- If the External GC Reference property of a device meter object matches the value of facilityId.
Service Configuration
The service uses a configuration file (installed in the same folder as the service executable) to set the options available for use of the service. This file is called asiGMSParserService.exe.config. It is formatted as an XML file with the following section holding the configurable parameters for this service:
<appSettings>
<add key="ImportFolder" value="C:/DataFiles/GCImport" />
<add key="FailedFolder" value=" C:/DataFiles/GCFailed " />
<add key="CompletedFolder" value=" C:/DataFiles/GCCompleted " />
<add key="LogErrorsOnly" value="0" />
<!-- 0=Log everything, 1 = Log only errors -->
<add key="ValidationTolerance" value="10" />
<!-- Default: 10 (90 to 110), Component Sum Tolerance from +/- of 100 -->
</appSettings>
ImportFolder The value element contains the location the service will use to look for new GSM files to process.
FailedFolder The value element contains the location the service will use to move GSM files that failed to process.
CompletedFolder The value element contains the location the service will use to move GSM files that processed successfully.
LogErrorsOnly The value element contains a 1 or 0. 0 to log everything and 1 to log errors only.
ValidationTolerance The value element contains a whole number. This value is used to compare the sum of the component values against a tolerance. For example, a value of 1 would allow a component sum of 99 to 101 to pass the tolerance validation.
For assistance, please submit a ticket via our Support Portal, email autosol.support@autosoln.com or call 281.286.6017 to speak to a support team member.