Previous Topic: Specify the Basic InformationNext Topic: Specify the Device Pack Elements Information


Specify the Input File Information

After you have specified the values for the basic information in the device pack configuration XML file, specify the values for the input file information in the appropriate section of the same device pack configuration XML file.

Navigate to each of the following sections. For each section, specify the values for the device pack that you want to generate:

Type
<Type></Type>

Specifies the type of data file to provide to this application.

The current supported type is CSV only (case insensitive).

Default: CSV

Example:

<Type>CSV</Type>

Compression
<Compression></Compression>

Specifies the type of compression used (if any) for a device or EMS while creating input files.

The following information describes the supported compression types:

TEXT

This type is used if the input file is created without any compression.

ZIP

This type is used if the input file is compressed in zip format.

GZIP

This type is used if the input file is compressed in gzip format.

If the value is not TEXT, then the device pack decompresses (unzips) the downloaded files before processing.

Note: Because only a single level of decompression is supported, input files from a device or EMS can be compressed one time.

Example:

<Compression>TEXT</Compression>

Paths
<Paths>
	<Path deltaTime="900"></Path>
	<Path deltaTime="300"></Path>
</Paths>

Specifies the absolute path of the directory that contains the sample input CSV data files for this application.

The application uses the files in <Path> to generate a device pack. The input files for the application must be identical to the input files that the device or EMS created. You copy the input files from the device or EMS to the system where the application is installed.

Note: Do not modify the file name or the file content after you copy. Keep the file name and the file content identical to the file name and the file content on the device or EMS from which you created them. Modifying the files causes the generated device pack to not work correctly when it is installed and downloads actual files.

If the CSV data files are in multiple directories, then add as many occurrences of <Path></Path> as needed.

This value must not be empty.

The default extension of the data files is *.csv; for example:

/opt/data/one (selects all *.csv files from this directory)

/opt/data/two/*.sts (selects all CSV files that have an extension of *.sts)

The attribute deltaTime specifies the time in seconds by which the input files are generated.

To create a single device pack that can poll the generated files at different time intervals, provide each set of files in a different <Path> with its deltaTime. During the installation of the generated device pack, you are prompted for the target directory for each deltaTime attribute provided.

A target directory is the actual directory on the device or EMS from which this device pack continues to download the CSV files after it is installed.

This value must be a positive integer.

This value must not be empty.

Default: 900

Note: Once the generated device pack is deployed, it automatically connects to the device or EMS and downloads the files.

Example:

<Paths>

<Path deltaTime="900">/opt/dataFor15mins/InputCSVFiles</Path>

<Path deltaTime="300">/opt/dataFor5mins/InputCSVFiles</Path>

</Paths>

Delimiter
<Delimiter></Delimiter

Specifies the delimiter in the CSV files.

The delimiter can be any character of any length.

This value must not be empty.

Default: Comma (,)

Example:

<Delimiter>,</Delimiter>

CSVFile
<CSVFile>
<Header fileNamePattern=”” isHeaderInFile="true" dataStartsFrom=""></Header>
<Header fileNamePattern=”” isHeaderInFile="true" dataStartsFrom=""></Header>
</CSVFile>

Note: This section is an important part of the configuration information that allows the application to map a data value to a name successfully.

Specifies the regular expression that identifies the header of a CSV file. The first line of the CSV file that matches the value of <Header> is considered the header for the CSV file.

The attribute fileNamePattern specifies a file name identifier.

If the fileNamePattern attribute is provided, then the value of <Header> is only used for files whose name matches this fileNamePattern.

If the fileNamePattern attribute is empty, then the value of <Header> is used for all files that do not match any fileNamePattern.

If <Header> is not in the file, do the following actions:

MaxFileCount
<MaxFileCount></MaxFileCount>

Restricts the application so that the specified number of files to be read from <Paths> is not exceeded.

Note: This restriction does not apply to a generated device pack. To limit the number of files for a generated device pack, provide the value when you deploy the device pack.

MaxFileCount must be a positive integer or empty.

Specifying empty processes all files.

Default: Empty

MaxFileSize
<MaxFileSize></MaxFileSize>

Restricts the application so that files that exceed this limit are not processed.

Note: This restriction does not apply to a generated device pack, which processes files of all sizes. We recommend that you split up the input files if they are larger than 10 MB.

MaxFileSize must be a positive integer or empty.

The MaxFileSize unit is kilobyte (KB).

Specifying empty processes files of all sizes.

Default: Empty

After you have specified the input file information, specify the device pack elements information.