@@ -7,6 +7,7 @@ Namespace Flux.Greaseweazle
77 Public Const REGEX_TRACK_CONVERTING As String = "^\s*Converting\s+c=(?<cs>\d+)(?:-(?<ce>\d+))?\s*:\s*h=(?<hs>\d+)(?:-(?<he>\d+))?\s*->\s*c=(?<ds>\d+)(?:-(?<de>\d+))?\s*:\s*h=(?<dhs>\d+)(?:-(?<dhe>\d+))?\s*$"
88 Public Const REGEX_TRACK_READ_DETAILS As String = "^(?<system>\w+) (?<encoding>\w+)( \((?<sectorsFound>\d+)\/(?<sectorsTotal>\d+) sectors\))?(?: from (?<srcFormat>[^()]+))? \((?<fluxCount>\d+) flux in (?<fluxTimeMS>\d+(?:\.?\d+)?)ms\)( \(Retry #(?<seek>\d+)\.(?<retry>\d+)\))?"
99 Public Const REGEX_TRACK_READ_FAILED As String = "^Giving up: (?<sectors>\d+) sectors missing"
10+ Public Const REGEX_TRACK_READ_OUTOFRANGE As String = "^WARNING: Out of range for format '(?<format>(\w|\.)+)': No format conversion applied: Raw Flux \((?<fluxCount>\d+) flux in (?<fluxTimeMS>\d+(?:\.?\d+)?)ms\)"
1011 Public Const REGEX_TRACK_READ_SUMMARY As String = "^T(?<destTrack>\d+)\.(?<destSide>\d+)( <- (?<srcType>\w+) (?<srcTrack>\d+)\.(?<srcSide>\d+))?: (?<details>.+)"
1112 Public Const REGEX_TRACK_UNEXPECTED As String = "^T(?<track>\d+)\.(?<side>\d+): Ignoring unexpected sector C:(?<cylinder>\d+) H:(?<head>\d+) R:(?<sectorId>\d+) N:(?<sizeId>\d+)"
1213 Public Const REGEX_TRACK_WRITE As String = "^T(?<srcTrack>\d+)\.(?<srcSide>\d+)( -> Drive (?<destTrack>\d+).(?<destHead>\d+))?: (?<action>Writing|Erasing) Track\b( \((?<details>.+)\))?"
@@ -17,6 +18,7 @@ Namespace Flux.Greaseweazle
1718 Private ReadOnly RegExTrackConverting As New Regex(REGEX_TRACK_CONVERTING, RegexOptions.IgnoreCase Or RegexOptions.CultureInvariant Or RegexOptions.Compiled)
1819 Private ReadOnly RegExTrackReadDetails As New Regex(REGEX_TRACK_READ_DETAILS, RegexOptions.IgnoreCase Or RegexOptions.CultureInvariant Or RegexOptions.Compiled)
1920 Private ReadOnly RegExTrackReadFailed As New Regex(REGEX_TRACK_READ_FAILED, RegexOptions.IgnoreCase Or RegexOptions.CultureInvariant Or RegexOptions.Compiled)
21+ Private ReadOnly RegExTrackReadOutOfRange As New Regex(REGEX_TRACK_READ_OUTOFRANGE, RegexOptions.IgnoreCase Or RegexOptions.CultureInvariant Or RegexOptions.Compiled)
2022 Private ReadOnly RegExTrackReadSummary As New Regex(REGEX_TRACK_READ_SUMMARY, RegexOptions.IgnoreCase Or RegexOptions.CultureInvariant Or RegexOptions.Compiled)
2123 Private ReadOnly RegExTrackUnexpected As New Regex(REGEX_TRACK_UNEXPECTED, RegexOptions.IgnoreCase Or RegexOptions.CultureInvariant Or RegexOptions.Compiled)
2224 Private ReadOnly RegExTrackWrite As New Regex(REGEX_TRACK_WRITE, RegexOptions.IgnoreCase Or RegexOptions.CultureInvariant Or RegexOptions.Compiled)
@@ -34,12 +36,12 @@ Namespace Flux.Greaseweazle
3436 End If
3537
3638 Dim info As New TrackRange With {
37- .Action = Match.Groups( "action" ).Value,
38- .TrackStart = GetInt(Match, "trkStart" ),
39- .TrackEnd = GetIntOrDefault(Match, "trkEnd" , .TrackStart),
40- .HeadStart = GetInt(Match, "headStart" ),
41- .HeadEnd = GetIntOrDefault(Match, "headEnd" , .HeadStart)
42- }
39+ .Action = Match.Groups( "action" ).Value,
40+ .TrackStart = GetInt(Match, "trkStart" ),
41+ .TrackEnd = GetIntOrDefault(Match, "trkEnd" , .TrackStart),
42+ .HeadStart = GetInt(Match, "headStart" ),
43+ .HeadEnd = GetIntOrDefault(Match, "headEnd" , .HeadStart)
44+ }
4345
4446 Return info
4547 End Function
@@ -128,6 +130,24 @@ Namespace Flux.Greaseweazle
128130 Return info
129131 End Function
130132
133+ Public Function ParseTrackReadOutOfRange(line As String ) As TrackReadOutOfRange
134+ If String .IsNullOrWhiteSpace(line) Then
135+ Return Nothing
136+ End If
137+
138+ Dim Match = RegExTrackReadOutOfRange.Match(line)
139+ If Not Match.Success Then
140+ Return Nothing
141+ End If
142+
143+ Dim info As New TrackReadOutOfRange With {
144+ .Format = Match.Groups( "format" ).Value,
145+ .FluxCount = GetInt(Match, "fluxCount" ),
146+ .FluxTimeMs = GetDouble(Match, "fluxTimeMS" )
147+ }
148+ Return info
149+ End Function
150+
131151 Public Function ParseTrackUnexpected(line As String ) As UnexpectedSector
132152 If String .IsNullOrWhiteSpace(line) Then
133153 Return Nothing
@@ -227,6 +247,13 @@ Namespace Flux.Greaseweazle
227247 Public Property TrackStart As Integer = 0
228248 End Class
229249
250+ Public Class TrackReadOutOfRange
251+ Public Property FluxCount As Integer
252+ Public Property FluxTimeMs As Double
253+ Public Property Format As String
254+
255+ End Class
256+
230257 Public Class TrackReadDetails
231258 Public ReadOnly Property BadSectors As Integer
232259 Get
0 commit comments