Page tree
Skip to end of metadata
Go to start of metadata

The CSV event file importer is designed to provide a way to upload one-off data for sites not currently monitored by MPEC loggers. This tool can be accessed via the sites tab and is listed under the actions menu next to each site.

Event files must be formatted using the following guidelines;

File Structure

File header

The file must start with the site name, on line 1. No other information is required.
Line 2 must be blank

Files created in Excel will add in extra commas on lines 1 and 2, these can be safely left in.

Event information

The first event must start on line 3. Each line should have the following form:

  • Date, represented in DD/MM/YYYY form (e.g. 30/01/2015). The date must be in GMT.
  • Time must be represented in 24-hour GMT including milliseconds in the form HH:MM:SS.sss (e.g. 17:01:51.012). Appending :G (as in an hour file) is not required and will be ignored when read by Centrix.
  • Relay name must be entered exactly as it is in Centrix. Any unrecognised relays will be created in Centrix. Any spare channels or unnamed channels will be ignored.
  • State/Transition must be entered in one of the following forms: UP, DN, UP to DN, DN to UP. This field can be left blank to indicate an info event.
    • UP and DN represents an initialisation state for the channel
    • UP to DN and DN to UP represent state transitions for the channel

All fields must be separated by single comma. Spaces are not required. A trailing comma is not required but will be removed automatically when read by Centrix.

Files created in Excel may add an extra comma to each event line, this can be safely left in.

Additional information

File must be saved as .csv, any other file type will be not be uploaded.

If an event already exists for a relay at the time listed in the file, that event will be marked as duplicate and not uploaded.

Warnings

Chronological order

Centrix generally expects event data to be imported in chronological order. Events that are imported out of sequence can cause unexpected results, especially with regard to Virtual Channels and Alerts. You may also find that the map initialises some objects to the wrong state if events are imported out of order for the site you are viewing.

Channel initialisation

Centrix expects to receive initialisation events for channels if there is a 'dark' period. For example, if you import some event data covering 8AM to 9AM and then subsequently import data from 11AM to 12PM, you should ensure that the beginning of the 11AM-12PM file contains the starting state for every channel. This is because there is an unknown period between 9AM and 11AM where the state transitions are missing. If you do not initialise the state at the beginning of the data set then you can experience some unexpected behaviour similar to those highlighted in the 'out of order' event warning above.

Function testing

One of the purposes of the CSV event upload is to allow testing of functions (e.g. virtual channels or alerts). If you are using the functionality for this purpose you should ideally use a test site to upload the data to rather than the actual live site. There is currently no means to delete or undo any data upload, so once the data is uploaded it will remain there.

As there is no means of removing data and bearing in mind that events should be imported in chronological order, it is recommended that if you wish to run the same data set multiple times for testing then you should increment the time frame of the data in the CSV file each time you run the test. This will ensure that the data set doesn't overlap the previous test data which may cause invalid test results.

  • No labels