Commit 49ce4dbb authored by Christoph Schimeczek's avatar Christoph Schimeczek
Browse files

🔧 update fame.protobuf dependency to v3.0

parent 38fbdb45
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ SPDX-License-Identifier: Apache-2.0 -->

  <groupId>de.dlr.gitlab.fame</groupId>
  <artifactId>core</artifactId>
  <version>3.0.0-alpha4</version>
  <version>3.0.0-alpha5</version>

  <name>FAME-Core</name>
  <description>An open framework for distributed agent-based modeling of energy systems</description>
@@ -61,7 +61,7 @@ SPDX-License-Identifier: Apache-2.0 -->
  <properties>
    <maven.compiler.release>11</maven.compiler.release>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <fame.protobuf.version>2.0.3</fame.protobuf.version>
    <fame.protobuf.version>3.0.0</fame.protobuf.version>
  </properties>

  <dependencies>
+4 −3
Original line number Diff line number Diff line
// SPDX-FileCopyrightText: 2025 German Aerospace Center <fame@dlr.de>
// SPDX-FileCopyrightText: 2025-2026 German Aerospace Center <fame@dlr.de>
//
// SPDX-License-Identifier: Apache-2.0
package de.dlr.gitlab.fame.service.input;
@@ -15,9 +15,10 @@ public class FileConstants {
	static final int HEADER_LENGTH = 30;
	static final String HEADER_V1 = "famecoreprotobufstreamfilev001";
	static final String HEADER_V2 = "fameprotobufstreamfilev002    ";
	static final int LATEST_HEADER_VERSION = 2;
	static final String HEADER_V3 = "fameprotobufstreamfilev003    ";
	static final int LATEST_HEADER_VERSION = 3;

	static final Map<Integer, String> headerMap = Map.of(1, HEADER_V1, 2, HEADER_V2);
	static final Map<Integer, String> headerMap = Map.of(1, HEADER_V1, 2, HEADER_V2, 3, HEADER_V3);

	/** Number of bytes in data byte stream that encode the length of the next protobuf binary message */
	public static final int MESSAGE_LENGTH_BYTE_COUNT = 4;
+2 −2
Original line number Diff line number Diff line
// SPDX-FileCopyrightText: 2025 German Aerospace Center <fame@dlr.de>
// SPDX-FileCopyrightText: 2025-2026 German Aerospace Center <fame@dlr.de>
//
// SPDX-License-Identifier: Apache-2.0
package de.dlr.gitlab.fame.service.input;
@@ -23,7 +23,7 @@ public abstract class FileReader {
	static final String ERR_READ_ERROR = "Reading failed for file: ";
	static final String ERR_PARSER_ERROR = "Could not parse content of input file: ";
	static final String ERR_NO_HEADER = "Cannot read input file: If the input file was create by FAME-Io, version <1.6 was used but requires FAME-Io version >= 3.0.";
	static final String ERR_OLD_HEADER = "Cannot read input file: This input file was created with a old version of FAME-Io. FAME-Io version >= 3.0 is required.";
	static final String ERR_OLD_HEADER = "Cannot read input file: This input file was created with a old version of FAME-Io. FAME-Io version >= 4.0 is required.";
	static final String ERR_LENGTH_DATA_SHORT = "Cannot read input file: Message length indicator too short. File is corrupted.";
	static final String ERR_MESSAGE_TOO_SHORT = "Cannot read input file: Message is too short. File is corrupted.";