OptrisOptrisDocumentation

Documentation/OTC SDK/Optris.Sdk — C# API referencev12.0

RecordingStopReason

public enum RecordingStopReason

Who ended a recording.

On RecordingPhase.Stopped and on nothing else. A program branches on this; RecordingEvent.Message is the same answer in words, for a log a person reads.

Why this is a value and not a string to match on. A Stopped with an empty message read exactly like the application's own stop, like a bounded recording reaching its duration, and like an alarm rule's stop, so an application could see its file end during an outage and have no way to say that the outage ended it. Optris Connect reported such a stop as "a bounded recording reached its duration, a write failed, or an alarm rule stopped it", which is a guess, because the event gave it nothing to go on. A caller that has to match text cannot be told apart from one that is guessing, and the text is free to be reworded or translated without anybody thinking they have changed an interface.

The set is closed and every value has a producer. These six are what can end a recording in this SDK, and scripts/check_recording_stop_producers.py fails the build if any of them has no producing line: a public enumerator that can never be delivered is a defect rather than a feature, because an application writes a branch for it and the branch is dead.

Value
Unknown 0 Nobody said.
Application 1 The application asked.
Duration 2 The recording reached the RecordingOptions.Duration it was started with and stopped itself.
AlarmRule 3 An alarm rule stopped it.
Reconnect 4 The SDK's reconnect stopped it, because a reconnect is a re-open and a recording is not resumed across one.
Failure 5 A write or encode failure ended it: a full disk, a removed drive, an encoder error.
SegmentLimit 6 The recording reached its segment limit and was ended there rather than carried on in the next part. Added in 12.0.10.