Exporters / Forwarding

Exporters can be used to trigger the sending of data to external sources, this can be used to either send E-mail / SMS templates or export timing data to other systems such as third party timing software, tracking partners, LED clocks and more. 

Exporters include some built-in functionality for specific partners but it is designed to be fully flexible to support a wide range of uses.

The exporter runs on both online and offline versions of RACE RESULT 14, if you are working online and you are exporting to a local destination (e.g. local network IP address, Serial or File) then ensure to start the RACE RESULT Web Server on your computer. 

Settings

Exporters

When started an exporter will automatically send the corresponding data when a valid trigger is received, multiple exporters can be setup and run simultaneously. Exporters are sent for individual participants and so the trigger, filter and data always refer to the individual participant record.

Name

A name for the exporter
Timing Point/Split

The trigger for the exporter.

Timing Point - when a raw data record is received for the selected timing point

Split - whenever that split is calculated (including subsequent re-calculations for any reason)

All - whenever any raw data record is received or any split calculated

Filter A filter to be applied, this can also use the Raw Data Fields
Destination The export type and additional settings according to the type
Export Data Which data should be sent, either a default format or any custom expression 
Line End The line ending to be appended to each record sent

The additional Extended Settings control the flow of data.

If you wish to write a custom output data format using the raw data then you can use the Raw Data Fields, additionally any standard fields / functions can be used in the custom export data. 

If using FILE export then the file name should be the full destination address and file type for example: C:\Users\Timer\Documents\Export.csv 

Tracking

Tracking forwarding is supported for a number of specific third-party platforms, these work similarly to exporters but forward the data in a pre-specified format according to the platform. 

Some platforms additionally require a customer ID to process data. 

Extended Settings

The extended settings additionally control the behaviour of the exporter. 

Encoding - Either UTF-8 or ASCII.

Min. Seconds Between - Define a minimum time in seconds between each record being sent.

Max Queue Length - The maximum queue size allowed in the buffer, the buffer is first in, first out - so the earliest passings will be dropped if the queue reaches the maximum length. 

Ignore Before / Ignore After - Define a minimum and maximum time for passings to be exported. 

Connect Message - Define a custom message string which should be sent when starting the exporter (e.g. an authentication token).

Start in Paused Mode - If enabled then the exporter will be paused when started.

Default raw data exporters

This article lists all the default available exporters. Below shows the data format of each exporter as well as an example of its output.

Raw Data Record JSON

The Raw Data Record JSON mimics a Passing Record. It is a JSON struct with all relevant data, where the first part refers to information from RACE RESULT 14, and the last object refers to the actual passing raw data. 

Example output

{
    "ID":1,
    "Bib":50001,
    "TimingPoint":"STARTFINISH",
    "Result":-10,
    "Time":32795.944,
    "Invalid":false,
    "Passing":{
        "Transponder":"ZICAD30",
        "Position":{
            "Latitude":0,
            "Longitude":0,
            "Altitude":0,
            "Flag":""
            },
        "Hits":75,
        "RSSI":-75,
        "Battery":3,
        "Temperature":17,
        "WUC":6233,
        "LoopID":8,
        "Channel":8,
        "InternalData":"",
        "StatusFlags":128,
        "DeviceID":"D-50432",
        "DeviceName":"Support Decoder",
        "OrderID":0,
        "Port":0,
        "IsMarker":false,
        "FileNo":177,
        "PassingNo":1,
        "Customer":12345,
        "Received":"2024-01-12T09:07:43.15+01:00",
        "UTCTime":"2024-01-12T09:06:35.944Z"
        }
    }

 

Raw Data Record V2

The Raw Data Record V2 mimics a Passing Record from a RACE RESULT System. It does not include values for [<LoopOnly>] and [<InternalData>], however the structure is correct.

<PassingNo>;<Bib/TranspCode>;<Date>;<Time>;[<EventID>];<Hits>;<MaxRSSI>;
<InternalData>;<IsActive>;[<Channel>];[<LoopID>];[<LoopOnly>];[<WakeupCounter>];
[<Battery>];[<Temperature>];[<InternalActiveData>];<BoxName>;<FileNumber>;[<MaxRSSIAntenna>];<BoxId><CrLf>

Example output

7750;ZCMBG52;;10:50:00.477;0;72;127;;1;1;1;;16731;2,9;17;0;D-5662;;0;D-5662

 

Raw Data Record V1

The Raw Data Record V1 is a legacy version of a Passing Record. It does not write a data and it does not include [<LoopOnly>] (see |Decoder Communication Protocol) and hence moves all columns thereafter to the left by one column when compared to a full passing record. This format has been maintained to ensure backwards compatability for existing implementations (2023 and earlier).

<PassingNo>;<Bib/TranspCode>;<Date>;<Time>;[<EventID>];<Hits>;<MaxRSSI>;
<InternalData>;<IsActive>;[<Channel>];[<LoopID>];[<WakeupCounter>];
[<Battery>];[<Temperature>];[<InternalActiveData>];<BoxName>;<FileNumber>;[<MaxRSSIAntenna>];<BoxId><CrLf>

Example output

7750;ZCMBG52;;10:50:00.477;0;72;127;;1;1;1;16731;2,9;17;0;D-5662;;0;D-5662

 

Raw Data Record with Position

The Raw Data Record V1 with Position mimics the legacy version of a Passing Record but also adds in GPS position.

<PassingNo>;<Bib/TranspCode>;<Date>;<Time>;[<EventID>];<Hits>;<MaxRSSI>;
<InternalData>;<IsActive>;[<Channel>];[<LoopID>];[<WakeupCounter>];
[<Battery>];[<Temperature>];[<InternalActiveData>];<BoxName>;<FileNumber>;[<MaxRSSIAntenna>];<BoxId>;[RD_Latitude];[RD_Longitude]<CrLf>

Example output

7750;ZCMBG52;;10:50:00.477;0;72;127;;1;1;1;16731;2,9;17;0;D-5662;;0;D-5662;33.57663;-117.2486

 

Custom

See Custom Destination Data Fields for more information on setting up a custom exporter.

 

Raw Data Time

This exporter only exports the raw time of the passings in seconds.

<Time>

Example output

39000.477

 

RunScore RSBCI

"RSBCI," & if([RD_Transponder]<>"";[RD_Transponder];[RD_IDBib]) & "," & format([RD_Time];"hh:mm:ss.kkk") & "," & [RD_TimingPoint]
  • RSBCI - Text string "RSBCI"
  • [RD_Transponder] or [RD_IDBib] - Exports transponder if one is entered, otherwise exports bib
  • [RD_Time] - Exports raw time of the passing formatted to "hh:mm:ss.kkk"
  • [RD_TimingPoint] - Exports the TimingPoint name from RACE RESULT 14

Example output

RSBCI,ZCMBG52,10:50:00.477,START+FINISH

Tracking Location Forwarding

Exporters can also be used to send Raw Timing Data to Tracking Partners for use in tracking visualisation.

  • For passive timing data or active passings from a system which has a GPS location and is synced to GPS time then the reported GPS location of the system will be forwarded.
  • For USB Timing boxes, Loop Boxes in Store or Repeat Mode or systems without a GPS location then the Timing Point Position (according to the Timing Point Settings  is forwarded.

If there is no GPS location on the system and no Timing Point Position set then the data will be sent with no location, which some Tracking Visualisation setups will subsequently ignore.

Database Insert

Raw Data Exporters currently supports below mentioned SQL Database Types and ODBC Drivers for Access databases and similar, if you require additional database types then let us know and we can look in to the implementation. If using a database which requires ODBC drivers then first ensure these are installed on your computer and that ODBC can create a connection to your database.

When setting up your exporter you will need to enter the server settings for your database, these accept different strings depending on the database type.

MySQL: USERNAME:PASS@tcp(HOSTNAME:PORT)/DATABASE
MS-SQL:  server=HOSTNAME; user id=USERNAME; password=PASS; database=DATABASE; port=PORT;
PostgreSQL: postgresql://USERNAME:PASS@HOSTNAME:PORT/DATABASE?sslmode=disable
ODBC Drivers (e.g. Microsoft Access): Driver={Microsoft Access Driver (*.mdb, *.accdb)};Dbq=C:\Database.accdb

For ODBC driver connections you will need to reference the correct connection string for your installed drivers.

Some database types may require additional security settings for username and password, a good resource for this is available at: https://www.connectionstrings.com/ 

You need to format the Export Data using the Custom entry to formulate an Insert Statement as an Expression

For example for MS-SQL:

"INSERT INTO RawData (Chip, Time, TimingPoint) VALUES ('" & if([RD_Transponder]<>"";[RD_Transponder];[RD_IDBib]) & "', '" & format([RD_Time];"hh:mm:ss.kkk") &"', '" & [RD_TimingPoint] &"')"

 

This will insert to a table called "RawData", to the fields Chip, Time and TimingPoint the fields Transponder Code or Chip Code, raw data time formatted as hh:mm:ss.kkk and the timing point respectively. For Microsoft Access databases the field names should be enclosed in square brackets. 

Exporting Date & Time

Some platforms may require you to send the passing date and time, however currently RACE RESULT 14 does not store the passing date when the passing is saved to the database. To send dates and times correctly you will need to set the Timing Module to handle the times correctly according to Multi-Day Race settings.

To export date and time you can use the following formulas in your expression.

Date: ([EventDate]+int([RD_Time]/86400)) 
This requires the EventDate to be set in your files basic settings, it calculates how many days after the start date the passing was from and sends the corresponding date.

Time: format(([RD_Time]%86400);"hh:mm:ss.kkk")
This is the remainder of time after the time has been divided by 86400, the number of seconds in 24 hours, and so will always send the Time of Day. As the modal does not return milliseconds we must then append the milliseconds with a separate format. 

It is on our wishlist to save and use the passing date in the event file, however this solution should work for most cases so long as you setup the file correctly.

Sending E-mail / SMS

Exporters can be setup to send E-mail / SMS templates, for example sending finisher e-mails or SMS when a participant finishes. This functionality has replaced that of the Instant Push tool.

E-mail and SMS exporters can be triggered by either a Timing Point or a Split. When a time is received or calculated for the selected Timing Point or Split then the exporter will be triggered (if the filter is also valid). 

When sending E-mails / SMS via exporters the default filter for the template will be pre-loaded in to the exporter filter and the Set Checkbox Field will be set when the template is sent. 

Setup

Setting up an Exporter to send an E-mail / SMS template requires a name for the Exporter, a selected Timing Point or Split and the template to be sent. Optionally a filter can be applied which must also be true for the participant in order to send.

Once created the Exporter will be shown in the Chip Timing and Systems tabs where the exporter can be started, paused or stopped. When starting an exporter which is sending an SMS template you will be required to enter the username and password for your account as the sending of SMS will automatically deduct the credits from your account. 

When running Exporters can also be replayed, so this can be started even after the first data to be sent or replayed if an issue prevents messages from being sent. Exporters also observe the setting for Keep Timing Active, meaning that for long-running events they can be started and will remain running until the end of the event. 

Filters

Particularly when using a Timing Point trigger for exporters you may wish to setup a filter to ensure the time which is received should really trigger the sending of the data. For example if using the Finish Timing Point then you may wish to filter on [Finished].

For more complex filters you may wish to use the Raw Data Data Fields.

Raw Data Fields

You can create any combination of data for the destination according to your requirements. You can use any of the standard data fields from RACE RESULT 14 or the custom fields below which are related directly to the passing which triggered the exporter. Data fields should be enclosed in square brackets, to join data fields you should use '&', for example to join just Transponder and Time separated by a semi-colon you would enter - [RD_Transponder] & ";" & [RD_Time] .

  • [RD_ID] - A Unique ID for that passing
  • [RD_IDBib] - If using standard passive tags then this is the chip code of the tag. 
  • [RD_Transponder] - If using non-standard passive tags or active transponders then this will return the transponder code.
  • [RD_Time] - The raw time of the passing in seconds. You can use the Time Format function to display this in the required format. 
  • [RD_OrderID] - The OrderID of the chip. (Passive Only)
  • [RD_Hits] - The number of hits on the transponder for the passing. (Number of times the transponder was seen).
  • [RD_RSSI] - The max RSSI (strength) of the signal received from the transponder.
  • [RD_ChannelID] - The active Channel ID from the timing point (Active Only)
  • [RD_LoopID] - The active Loop ID from the timing point. (Active Only)
  • [RD_WakeupCounter] - The wake-up count from the transponder. (Active Only)
  • [RD_Battery] - The battery voltage of the transponder. (Active Only)
  • [RD_Temperature] - Internal temperature of the transponder. (Active Only)
  • [RD_StatusFlags] - The status flag indicates if the passing was a stored passing on the transponder.
  • [RD_TimingPoint] - The TimingPoint name in RACE RESULT 12.
  • [RD_DecoderName] - The name of the decoder if it has been assigned.
  • [RD_DecoderID] - The device ID
  • [RD_Port] - The antenna port with max. RSSI during a passing (Passive Only)
  • [RD_Latitude] / [RD_Longitude] - The coordinates of the detection, provided the device it comes from delivers GPS coordinates.
  • [RD_IsMarker] - whether or not this passing is treated as a Marker
  • [RD_FileNo] - indicates the file number from a Ubidium or decoder
  • [RD_PassingNo] - the passing number as saved in a passings file
  • [RD_Customer] - the customer ID to which the passing has been uploaded
  • [RD_Received] - the timestamp with timezone when the passing has been received by RACE RESULT 12
  • [RD_UTCTime] - the timestamp of the passing converted to UTC time

Markers return a transponder code of -1 regardless of the decoder settings. 

Exporter Commands

For TCP/IP exporters you can additionally send commands to the TCP socket to control exporters remotely when connected. 

Getting Info

To get info about the exporter send the following command:

GETINFO\n

The response looks like this:

{
  "Command": "GETINFO",
  "Exporter": {
    "ID": 8,
    "Name": "PacketSender Home",
    "Filter": "",
    "TriggerTimingPoint": "",
    "TriggerResultID": 0,
    "DestinationType": "TCPIP",
    "Destination": "192.168.178.25:54696",
    "Data": "[RD_ID] \u0026 \";\" \u0026 if([RD_Transponder]\u003c\u003e\"\";[RD_Transponder];[RD_IDBib]) \u0026 \";;\" \u0026 format([RD_Time];\"hh:mm:ss.kkk\") \u0026 \";\" \u0026 [RD_OrderID] \u0026 \";\" \u0026 [RD_Hits] \u0026 \";\" \u0026 [RD_RSSI] \u0026 \";;\" \u0026 if([RD_LoopID]\u003e0;1;0) \u0026 \";\" \u0026 [RD_ChannelID] \u0026 \";\" \u0026 [RD_LoopID] \u0026 \";;\" \u0026 [RD_WakeupCounter] \u0026 \";\" \u0026 ([RD_Battery]/10) \u0026 \";\" \u0026 ([RD_Temperature]-100) \u0026 \";\" \u0026 [RD_StatusFlags] \u0026 \";\" \u0026 [RD_DecoderName]",
    "MTB": 0,
    "MQL": 0,
    "LineEnding": "LF",
    "OrderPos": 7000
  },
  "Paused": false,
}

Stop Command

This command stops the exporter at any time.

STOP\n

Normal response:

{
  "Command": "STOP",
}

Error response:

{
  "Command": "STOP",
  "Error": "Some error message"
}

Pause Command

This command pauses the exporter at any time.

Command

PAUSE\n

Responds with:

{
  "Command": "PAUSE",
  "Paused": true
}

Resume Command

This command resumes the exporter at any time.

Command:

RESUME\n

Responds with:

{
  "Command": "RESUME",
  "Paused": false
}

Note: if the connection breaks while in "paused" mode it will not be reopened unless there is new data to write. If you want to resume you need to wait for the connection to re-establish.

Replay Command

This command allows you to replay the exporter at any time.

Command:

REPLAY\n

Normal response:

{
  "Command": "REPLAY",
}

Error response:

{
  "Command": "REPLAY",
  "Error": "Some error message"
}