-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathSurveyType.cs
More file actions
35 lines (33 loc) · 1.18 KB
/
SurveyType.cs
File metadata and controls
35 lines (33 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using System;
using System.Runtime.CompilerServices;
namespace SL3Reader;
public enum SurveyType : ushort
{
Primary, Secondary, DownScan,
LeftSideScan, RightSideScan,
SideScan, Unknown6, Unknown7,
Unknown8, ThreeDimensional,
DebugDigital, DebugNoise,
All = ushort.MaxValue // For filtering purposes only
}
public static class SurveyTypeTranslator
{
[SkipLocalsInit]
public static ReadOnlySpan<byte> ToSpan(SurveyType surveyType) => surveyType switch
{
SurveyType.Primary => "Primary"u8,
SurveyType.Secondary => "Secondary"u8,
SurveyType.DownScan => "DownScan"u8,
SurveyType.LeftSideScan => "LeftSideScan"u8,
SurveyType.RightSideScan => "RightSideScan"u8,
SurveyType.SideScan => "SideScan"u8,
SurveyType.Unknown6 => "Unknown6"u8,
SurveyType.Unknown7 => "Unknown7"u8,
SurveyType.Unknown8 => "Unknown8"u8,
SurveyType.ThreeDimensional => "ThreeDimensional"u8,
SurveyType.DebugDigital => "DebugDigital"u8,
SurveyType.DebugNoise => "DebugNoise"u8,
SurveyType.All => "All"u8,
_ => throw new NotImplementedException(),
};
}