I’m developing a plugin integration which runs in the Event Server. I’m testing with XProtect version 2021 R1. I’d like to receive an event if the user changes positioning information fields of a camera, ie: “GPS coordinates”, “Direction”, “Field of view”, or “Depth”.
I’m currently using code of the form:
_cameraConfigChangedObject = EnvironmentManager.Instance.RegisterReceiver(
UpdateCameraConfig,
new MessageIdFilter(
MessageId.System.SystemConfigurationChangedIndication
)
);
in order register for camera configuration changes. This appears to work fine for certain actions, such as a camera rename, but does not appear to fire when the Positioning Information fields are changed.
I’ve also tried to register for these changes like so:
_cameraConfigChangedObject = EnvironmentManager.Instance.RegisterReceiver(
UpdateCameraConfig,
new MessageIdAndRelatedKindFilter(
MessageId.System.SystemConfigurationChangedIndication,
VideoOS.Platform.Kind.Camera
)
);
Firstly, PTZ change, or camera positioning change, is not considered a configuration change by XProtect and this is the reason SystemConfiguratioChangedIndication does not work. Secondly, there is no such an event like Camera Positioning Changed Indication.
The idea would be that you can see if someone is doing manual PTZ operations, when done you could read the PTZ coordinates of the camera. This will not work if the camera is doing patrolling where PTZ coordinates will change even if nobody manually manipulates the camera. Whether a workaround is feasible might depend on the use case scenario, but we hope you find a solution that might work for you.
Is there any recommended way this situation to be handled? I don’t think instructing our users to restart the event server if any camera position information is changed would be ideal. I’m thinking our best bet would be to start a polling thread in the plugin that calls: