private ParseMessage(LineType Type, Types.ErrorCode Code, string Message, string AlternativeFile, int AlternativeLineIndex) { this.Type = Type; this.Message = Message; this.Code = Code; this.AlternativeFile = AlternativeFile; this.AlternativeLineIndex = AlternativeLineIndex; }
public ParseMessage AddError(int Line, Types.ErrorCode Code, string Text, int CharIndex, int Length) { ParseMessage errorMessage = new ParseMessage(ParseMessage.LineType.ERROR, Code, Text, CharIndex, Length); Messages.Add(Line, errorMessage); ++m_ErrorMessages; return(errorMessage); }
public ParseMessage(LineType Type, Types.ErrorCode Code, string Message, int CharIndex, int Length) { this.Type = Type; this.Message = Message; this.Code = Code; this.CharIndex = CharIndex; this.Length = Length; }
public ParseMessage AddError(int Line, Types.ErrorCode Code, string Text) { ParseMessage errorMessage = new ParseMessage(ParseMessage.LineType.ERROR, Code, Text, -1, 0); Messages.Add(Line, errorMessage); ++m_ErrorMessages; return(errorMessage); }
public ParseMessage AddSevereWarning(int Line, Types.ErrorCode Code, string Text) { ParseMessage warningMessage = new ParseMessage(ParseMessage.LineType.SEVERE_WARNING, Code, Text); Messages.Add(Line, warningMessage); ++m_WarningMessages; return(warningMessage); }
public ParseMessage AddWarning(int Line, Types.ErrorCode Code, string Text, int CharIndex, int Length) { ParseMessage warningMessage = new ParseMessage(ParseMessage.LineType.WARNING, Code, Text, CharIndex, Length); Messages.Add(Line, warningMessage); ++m_WarningMessages; return(warningMessage); }
private ParseMessage(LineType Type, Types.ErrorCode Code, string Message, string AlternativeFile, int AlternativeLineIndex, int CharIndex, int Length) { this.Type = Type; this.Message = Message; this.Code = Code; this.AlternativeFile = AlternativeFile; this.AlternativeLineIndex = AlternativeLineIndex; this.CharIndex = CharIndex; this.Length = Length; }
public ParseMessage AddSevereWarning(int Line, Types.ErrorCode Code, string Text) { if (m_CompileConfig.WarningsToTreatAsError.ContainsValue(Code)) { return(AddError(Line, Code, Text)); } ParseMessage warningMessage = new ParseMessage(ParseMessage.LineType.SEVERE_WARNING, Code, Text); Messages.Add(Line, warningMessage); ++m_WarningMessages; return(warningMessage); }
public ParseMessage AddWarning(int Line, Types.ErrorCode Code, string Text, int CharIndex, int Length) { if (m_CompileConfig.WarningsToTreatAsError.ContainsValue(Code)) { return(AddError(Line, Code, Text, CharIndex, Length)); } ParseMessage warningMessage = new ParseMessage(ParseMessage.LineType.WARNING, Code, Text, CharIndex, Length); Messages.Add(Line, warningMessage); ++m_WarningMessages; return(warningMessage); }
private async Task <BusTransceiveResult> TransceiveAsyncInternal(int address, BusRequest request, int responseSize, int attempts, bool sync) { BusResponse response = new BusResponse(responseSize); Types.ErrorCode transceiveStatus = Types.ErrorCode.TransportTransmissionError; while (attempts > 0) { (ErrorCode, byte[])result = sync ? BusAbstraction.Transceive(address, request.GetByteArray(), responseSize) : await BusAbstraction.TransceiveAsync(address, request.GetByteArray(), responseSize); transceiveStatus = result.Item1; byte[] receiveBuffer = result.Item2; response = new BusResponse(responseSize); response.Fill(receiveBuffer); switch (transceiveStatus) { case Types.ErrorCode.Success: ++successfulTransmissions; return(new BusTransceiveResult(Types.ErrorCode.Success, response)); case Types.ErrorCode.TransportChecksumError: ++checksumErrors; break; case Types.ErrorCode.TransportReceptionNoAnswerError: ++noAnswer; break; case Types.ErrorCode.TransportReceptionMissingDataError: ++missingData; break; case Types.ErrorCode.TransportTransmissionError: ++transmitErrors; break; } attempts--; } return(new BusTransceiveResult(transceiveStatus, response)); }
public ParseMessage(LineType Type, Types.ErrorCode Code, string Message) { this.Type = Type; this.Message = Message; this.Code = Code; }