IOCTL_GNSS_CREATE_GEOFENCE - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// gnssdriver.h

// CTL_CODE(0x0022, 0x050, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_GNSS_CREATE_GEOFENCE 0x00220140
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (ni-gnssdriver-ioctl_gnss_create_geofence)

Description

The IOCTL_GNSS_CREATE_GEOFENCE control code is used by the GNSS adapter to create a geofence.

Applies to GNSS DDI version 2 and later.

Parameters

Major code

Input buffer

A pointer to a GNSS_GEOFENCE_CREATE_PARAM structure that defines the geofence to be created.

Input buffer length

Set to sizeof(GNSS_GEOFENCE_CREATE_PARAM).

Output buffer

A pointer to a GNSS_GEOFENCE_CREATE_RESPONSE structure.

Output buffer length

Set to sizeof(GNSS_GEOFENCE_CREATE_RESPONSE).

Input/output buffer

Input/output buffer length

Status block

Irp->IoStatus.Status is set to STATUS_SUCCESS if the request is successful. Otherwise, Status to the appropriate error condition as a NTSTATUS code.

Remarks

GNSS adapter notes

If the call is successful, the GNSS engine registers the geofence and assigns a unique ID. The GNSS adapter uses the unique ID for all interaction with the driver regarding this specific geofence.

If the call fails, the GNSS driver must ensure that the GNSS engine does not end up creating the geofence and start tracking it. A failure should roll the state of the GNSS engine back to the previous state before adding this geofence.

The GNSS adapter does not expect the driver to persist the geofences across driver restarts. The GNSS adapter explicitly clears all geofences from the GNSS driver through the GNSS_ResetGeofencesTracking command at appropriate times (initialization, tracking status change after a failure, etc.).

GNSS driver notes

If this is the first geofence, the GNSS driver should start geofence tracking, continue monitoring the geofence against the current location of the device in a power efficient manner, and raise alerts if a geofence is breached. If the GNSS engine is unable to track the geofence (due to bad signal conditions or other transient errors), an error status must be raised through the LISTEN_GEOFENCES_TRACKINGSTATUS event.

The GNSS engine must adhere to the following guidelines for geofence tracking:

See also

Creating IOCTL Requests in Drivers

WdfIoTargetSendInternalIoctlOthersSynchronously

WdfIoTargetSendInternalIoctlSynchronously

WdfIoTargetSendIoctlSynchronously