Shift Processing

A SPEEDMONITORING table in the Pitram Reporting database has the following columns:

Column Name Data Type   Uniqueness Description
TSKey bigint NOT NULL PK The unique generated transaction key.
SHKey TokenCode NOT NULL   The shift key of the shift the transaction belongs to.
DateTimeUtc DateTime NOT NULL UK The UTC time of the position that caused the Warning Display to be shown in Mobile.
DateTime DateTime NOT NULL UK The local time of the position that caused the Warning Display to be shown in Mobile.
Equipment TokenCode NOT NULL UK The token code of the equipment the speeding infraction is pinned against.
Zone TokenCode NULL   The token code of the zone that the speeding initially started in, i.e. moving to another zone where the speed limit is violated does not change the infraction's zone.
RecordedMaximumSpeed numeric(5,2) NULL   The maximum speed recorded during the period of speeding.
SpeedLimit numeric(5,2) NULL   The speed limit in place in time of the infraction.
DisplayLabel nvarchar(50) NULL   Defines the label that is used when displaying speed values on the user interface.
In reality it should define the unit of measure used for both RecordedMaximumSpeed and SpeedLimit. E.g. km/h.
Duration bigint NULL   The duration of the speeding infraction in seconds.
EventSource int NOT NULL   Defines the source of the event/transaction. 1 = PITRAM, 2 = PLOD.

ORM Classes

In order to map the data from the database, the following classes will be created in the PITRAM2DataStore assembly:

  • SpeedMonitoring
  • SpeedMonitoringFactory

Event Handler Class

In order to handle the incoming change notifications, the following class will be created in the Micromine.PITRAMShiftProcessing assembly:

  • SpeedMonitoringEventHandler

This class will implement the logic to handle both shift processing and reprocessing, as well as mapping the data from the Business Model to the ORM classes.

The Business Model can be queried for a list of all speeding infractions. The function GetSpeedingIncidents will require a start and end time and optionally accept the equipment code of an equipment for filtering. The function will also be provided on the Business Object Equipment.

Reporting

The Speed Monitoring standard report will be based on Speed Alarm events that originate from Pitram Mobile. Report parameters are Period, Equipment and Operator. The report is grouped by shift and ordered by date/time descending.

Report fields are Date/Time of alarm, Equipment, Operator, Zone, Recorded Speed, Speed Limit in force at the time that it was exceeded, The excess speed (Actual minus limit) and the duration that the speed was exceeded.

Reference Data

Events

Business Model