GeoEvent Simulator is a Windows application available with ArcGIS GeoEvent Server that you can use to send event data from a simulation text file or feature layer to a specified TCP socket. Event data sent from GeoEvent Simulator is received by a Receive Text from a TCP Socket input in GeoEvent Server that hosts and monitors the TCP socket to which simulated data is being sent. The input's TCP Transport receives the data as a byte stream; the input's Text Adapter uses a GeoEvent Definition to interpret the data to create a GeoEvent. If the input is incorporated in a GeoEvent Service, the GeoEvent is placed on a message queue for the GeoEvent Service to retrieve and process.
You can access GeoEvent Simulator from the Windows ArcGIS program group. The following image and table illustrate and describe the key components of GeoEvent Simulator:
Parameter or function | Description |
---|---|
1—Server | The host name of the server to which GeoEvent Simulator will connect. The default is localhost. |
2—TCP socket | The TCP socket on the specified server where GeoEvent Simulator will send its simulated event data. |
3—File or Layer selector | Specify whether the simulated event data will be loaded from a text file or a feature layer. Simulating data from a .csv file is the typical use case for GeoEvent Simulator. |
4—File or layer resource | Text field specifying the path name to the file or the URL to the feature layer from which GeoEvent Simulator will retrieve event data. |
5—Message rate | The rate at which event data will be sent. The default is to send one event record every 1,000 milliseconds. Change this value to send data at a faster rate (for example, five messages every 250 milliseconds) or a slower rate (for example, one message every 2,500 milliseconds). |
6—Go to Start, Play, Step, and Continuous Loop | Use the Go to Start, Play, and Step controls to set GeoEvent Simulator to the beginning of the event data, to start sending all events, or to send a single event record to GeoEvent Server. Check Continuous Loop to continuously loop back (or replay) the event data once the last record is reached. |
7—Next event message | A delimited text representation of the next event record to be sent to GeoEvent Server. |
8—Event index | Scroll through the simulated event data. As the position changes, the current index displayed in the middle of the range changes to indicate the current event index. |
9—Time Field # | Choose the field in the simulated event data that specifies the date and time. The array is zero-based, meaning the epoch long integer (in the example above) is the value immediately to the right of the event record's unique identifier (or Track ID). |
10—Set value to Current Time | When checked, GeoEvent Simulator will discard the date and time information retrieved from the simulated event data and replace it with the system's current time. |
11—Time value displays | The text field on the left displays the date and time of the event record retrieved from the simulated event data. The text field on the right displays the date and time that will be sent with the simulated event record. |
12—Last event message | Displays a delimited text representation of the event record most recently sent to GeoEvent Server. |
Connect GeoEvent Simulator to GeoEvent Server
When you open GeoEvent Simulator for the first time, you need to connect to a TCP socket hosted by one of your GeoEvent Server inputs before you can send simulated event records to GeoEvent Server. Use GeoEvent Manager to configure a Receive Text from a TCP Socket input and set a specific socket to which GeoEvent Simulator can connect.
With a TCP or text input configured and started in GeoEvent Server, complete the following steps to connect GeoEvent Server to GeoEvent Simulator:
- Set the Server and Port values to match those specified in the TCP or text input (the defaults are localhost and port 5565).
- Click Connect to server to establish the connection between GeoEvent Simulator and GeoEvent Server on the specified server and TCP port.
A valid connection has been established when the icon changes to .
Load event data into GeoEvent Simulator
To load simulated event data into GeoEvent Simulator, you must either browse to a .csv or .txt file whose content represents event data as delimited text or load event data from features in a feature layer.
Load event data from a .csv or .txt file
To load event data from a .csv or .txt file, complete the following steps:
- Choose File from the drop-down menu .
- Click Browse to browse to the .csv or .txt file and do the following as appropriate for the event data:
- Provide Event Separator and Field Separator values .
- If the event data has an attribute field with event date and time information, set a Time Field # value.
- If the event data includes field names (that is, headers) for each column, choose the number of lines to skip from the top so field names are not included.
- Review the event data in the preview window.
- Click Load to load the event data into GeoEvent Simulator.
The event data contained in a .csv or .txt file must have both a clear delimiter between each attribute value and a clear delimiter between each event record. The default delimiters are a comma (,) between attributes and a new line between event records.
The Load From File dialog box displays the first 12 or more event records, parsed using the specified delimiters. It is important that attribute values (for example, Field 0, Field 1, Field 2, Field 3) map to attribute fields specified in a GeoEvent Definition and that the values in a .csv or .txt file can be implicitly cast to the data types specified for each attribute in a GeoEvent Definition.
Date and time values can be represented as a string in the ISO 8601 format (for example, 2016-12-31T23:59:59+00:00) or an epoch long integer expressed in milliseconds (for example, 1483228799000). The ISO 8601 and epoch long integer formats tend to be less ambiguous, but an input connector interprets string values sent from GeoEvent Simulator, such as 12/31/2016 23:59:59 or 12/31/2016 12:59:59 PM, as a date.
Load event data from a map or feature service
Another option for loading simulated event data into GeoEvent Simulator is to load feature records from a feature service. Complete the following steps to add event data from a feature service:
- Choose Layer from the drop-down menu.
- Click Load from layer to open the Load From Layer dialog box.
- Click Select layer to open the Select Layer dialog box and set the properties appropriate for the environment.
- Provide the URL to the server that is hosting the map or feature service from which you want to read data.
- Provide the credentials for connecting to the specified server.
- Click Connect to connect to the specified server.
- Upon connection, click Browse to Layer.
- Choose a service folder, feature service, and layer (the URL constructed from these parameters will be displayed) and click OK.
- On the Load From Layer dialog box, click Connect to GeoEvent Server and do the following:
- Provide the URL used to connect to GeoEvent Server.
- Click OK to enter the credentials used to connect to GeoEvent Server.
Nota:
If GeoEvent Server is federated, you must use the administrative credentials for Portal for ArcGIS to sign in. If GeoEvent Server is not federated, use the administrator credentials as defined in the underlying ArcGIS Server user or role provider.
- Click Login to establish a connection to the GeoEvent Server.
The login process for GeoEvent Server is enabled by default. For backward compatibility (version 10.8 or earlier), you must disable authentication. To disable authentication in GeoEvent Simulator, click Options in the menu and uncheck Use GeoEvent Server admin Endpoints. This is only necessary for backward compatibility when you need to connect GeoEvent Simulator version 10.8.1 or later to GeoEvent Server version 10.8 or earlier.
When loading data from a .csv or .txt file, specifying Event Separator and Field Separator values was necessary so GeoEvent Simulator could interpret the delimited text. When loading event data from a feature layer, you must specify a GeoEvent Definition that GeoEvent Simulator will use to interpret the feature records. Use GeoEvent Manager to import a GeoEvent Definition from the feature layer by completing the remaining steps.
- Choose the appropriate Input GeoEvent Definition value from the drop-down list that matches the schema of the feature layer.
- Accept the default name for Output GeoEvent Definition Name.
- Click Load to load the feature records from the specified feature service's feature layer.
- Review the delimited text representation of the next event record in the Next event message text box. Hover over the text box to view the entire string of the event record.
GeoEvent Simulator prepends the name of the GeoEvent Definition chosen to its delimited text representation of the event record. GeoEvent Simulator sends this delimited text to GeoEvent Server.
- Start GeoEvent Manager and set the Receive Text from a TCP Socket input's Incoming Data Contains GeoEvent Definition parameter to Yes.
Each event record must include the GeoEvent Definition name.
Since GeoEvent Simulator is sending a JSON representation of the feature record's geometry, ensure that the last value in the delimited string maps is set to a field of type geometry in the GeoEvent Definition that is used by the input connector receiving the event data.
- In GeoEvent Simulator, once feature records from a feature service are loaded, optionally click File > Save As on the main menu to save the event records to a .csv file.