private ProgrammingStatus(string data) { _operationStatus = (ProgrammingOperationStatus)data[0]; if (data.Length == 1) { return; } _operationType = data[1]; _fileName = data.Substring(2, 4); _terminalMode = data[6]; _programmingModeState = data[7]; _previousBlockNumber = SynelNumericFormat.Convert(data.Substring(8, 2)); _currentBlockNumber = SynelNumericFormat.Convert(data.Substring(10, 2)); _debugInfo = data.Substring(12, 3); // Workaround for some terminals that don't always report the correct operation status code. if (_fileName == "Run_") { _operationStatus = ProgrammingOperationStatus.InRunMode; } }
private ProgrammingStatus(string data) { _operationStatus = (ProgrammingOperationStatus) data[0]; if (data.Length == 1) return; _operationType = data[1]; _fileName = data.Substring(2, 4); _terminalMode = data[6]; _programmingModeState = data[7]; _previousBlockNumber = SynelNumericFormat.Convert(data.Substring(8, 2)); _currentBlockNumber = SynelNumericFormat.Convert(data.Substring(10, 2)); _debugInfo = data.Substring(12, 3); // Workaround for some terminals that don't always report the correct operation status code. if (_fileName == "Run_") _operationStatus = ProgrammingOperationStatus.InRunMode; }
internal ProgrammingStatus() { _operationStatus = ProgrammingOperationStatus.Unknown; }