Supported interface
The server adapter calls:
GetUnitByPlayerId associates a cached CAD unit with a connected server player when possible. Player connection alone does not create an on-duty unit.
The optional Bodycams page also calls GetBodycamRuntime() and observes SonoranCAD::bodycam::RuntimeChanged. This bridge supplies authoritative active state and player/unit ownership. Station Displays obtains imagery locally through screenshot-basic; the bridge does not supply a peer, TURN configuration, relay URL, or hosted image.
Unit classification
The on-duty cache is the source of truth. Status code100 (OFFLINE) is excluded defensively.
Server owners normally do not configure department names. The adapter copies department/agency, subdivision, rank, district, and group labels from the cache, but service classification uses
data.page.
Config.AdvancedServiceOverridesEnabled and Config.AdvancedServiceOverrides provide a disabled-by-default fallback for legacy or customized caches with incorrect page data. Only enable this after confirming the cache classification is wrong.
Per-display filters
The filter is saved on each display. A police briefing room, apparatus bay, dispatch center, and emergency operations center can all use different filters without separate department lists.
Unit fields
The adapter normalizes:- ID and associated FiveM player ID, when available
- Callsign and display name
- Numeric and display status
- Service, agency, subdivision, rank, district, and group
- Location and postal
- World coordinates
- Assigned dispatch call ID
- Panic and dispatch flags
- Update timestamp and stale flag
Config.Debug = true.
Call caches
The pages remain separate because SonoranCADFiveM exposes two collections:
Dispatch calls with status
2 (CLOSED) are omitted. Emergency entries are displayed while they remain in the emergency cache.
A callβs service is determined from its assigned normalized units:
- Only LEO assigned β
LEO - Only Fire/EMS assigned β
FIRE_EMS - Both services assigned β
BOTH - No classified assigned units β
OTHER
BOTH displays show them. Single-service displays hide them by default unless the corresponding Config.CallClassificationFallback option is enabled.
Coordinates
- Unit markers use
unit.coordinatesorunit.coords. - Call markers use X/Y/Z values in call
metaData. - The station marker uses the saved display position.
Update flow
The adapter combines push-triggered refresh requests with centralized polling. Unit events:CAD restart and unavailable cache
Whensonorancad stops, the adapter marks the connection unavailable and authorized clients show the full CAD CONNECTION UNAVAILABLE overlay. When it starts, the resource waits one second, redetects the exports, and requests refreshed caches.
If one cache call fails, the connection state becomes disconnected and the polling loop retries. Existing client records are not immediately erased, but the disconnected overlay covers the display.
Unchanged units receive an internal stale flag after Config.StaleAfterSeconds. Version 1.0.0 does not render a separate per-unit stale badge. Use the connection overlay, cache revision, and diagnostics when investigating data freshness.
Radio menu relationship
radio_fivem was a source reference for the WarMenu, preview object, fine movement, rotation, confirmation, cancellation, synchronization, and cleanup patterns. Sonoran Station Displays ships the adapted code inside its own resource.
It does not:
- Call a radio menu export
- Require a Sonoran Radio resource name
- Require radio start order
- Modify a customerβs radio resource

