Skip to content

Commit 6c333dc

Browse files
committed
Move datalog to its own library
1 parent 85394b5 commit 6c333dc

34 files changed

+261
-36
lines changed

WPILib.sln

+181-3
Large diffs are not rendered by default.

src/cscore/cscore.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
</ItemGroup>
1616

1717
<ItemGroup>
18-
<PackageReference Include="FRC.CsCore.runtime" Version="2025.1.1-beta-1-127-gd1de766" />
18+
<PackageReference Include="FRC.CsCore.runtime" Version="2025.3.2-114-g3681121" />
1919
</ItemGroup>
2020

2121
</Project>

src/datalog/Assembly.cs

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
using System.Runtime.CompilerServices;
2+
3+
[assembly: DisableRuntimeMarshalling]

src/wpiutil/Logging/BooleanArrayLogEntry.cs renamed to src/datalog/BooleanArrayLogEntry.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Open Source Software; you can modify and/or share it under the terms of
33
// the WPILib BSD license file in the root directory of this project.
44

5-
namespace WPIUtil.Logging;
5+
namespace WPI.Logging;
66

77
/// <summary>
88
/// Log BooleanArray values.

src/wpiutil/Logging/BooleanLogEntry.cs renamed to src/datalog/BooleanLogEntry.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Open Source Software; you can modify and/or share it under the terms of
33
// the WPILib BSD license file in the root directory of this project.
44

5-
namespace WPIUtil.Logging;
5+
namespace WPI.Logging;
66

77
/// <summary>
88
/// Log Boolean values.

src/wpiutil/Logging/DataLog.cs renamed to src/datalog/DataLog.cs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
using System.Collections.Concurrent;
2+
using WPI.Logging.Natives;
3+
using WPIUtil;
24
using WPIUtil.Handles;
35
using WPIUtil.Natives;
46
using WPIUtil.Serialization.Protobuf;
57
using WPIUtil.Serialization.Struct;
68

7-
namespace WPIUtil.Logging;
9+
namespace WPI.Logging;
810

911
public unsafe class DataLog : IDisposable
1012
{

src/wpiutil/Logging/DataLogBackgroundWriter.cs renamed to src/datalog/DataLogBackgroundWriter.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
using System.Runtime.CompilerServices;
22
using System.Runtime.InteropServices;
3-
using WPIUtil.Natives;
3+
using WPI.Logging.Natives;
44

5-
namespace WPIUtil.Logging;
5+
namespace WPI.Logging;
66

77
public sealed unsafe class DataLogBackgroundWriter : DataLog
88
{

src/wpiutil/Logging/DataLogEntry.cs renamed to src/datalog/DataLogEntry.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using WPIUtil.Handles;
22

3-
namespace WPIUtil.Logging;
3+
namespace WPI.Logging;
44

55
public abstract class DataLogEntry(DataLog log, string name, string type, string metadata = "", long timestamp = 0)
66
{

src/wpiutil/Logging/DataLogWriter.cs renamed to src/datalog/DataLogWriter.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
using WPIUtil.Natives;
1+
using WPI.Logging.Natives;
22

3-
namespace WPIUtil.Logging;
3+
namespace WPI.Logging;
44

55
public unsafe class DataLogWriter : DataLog
66
{

src/wpiutil/Logging/DoubleArrayLogEntry.cs renamed to src/datalog/DoubleArrayLogEntry.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Open Source Software; you can modify and/or share it under the terms of
33
// the WPILib BSD license file in the root directory of this project.
44

5-
namespace WPIUtil.Logging;
5+
namespace WPI.Logging;
66

77
/// <summary>
88
/// Log DoubleArray values.

src/wpiutil/Logging/DoubleLogEntry.cs renamed to src/datalog/DoubleLogEntry.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Open Source Software; you can modify and/or share it under the terms of
33
// the WPILib BSD license file in the root directory of this project.
44

5-
namespace WPIUtil.Logging;
5+
namespace WPI.Logging;
66

77
/// <summary>
88
/// Log Double values.

src/wpiutil/Logging/FloatArrayLogEntry.cs renamed to src/datalog/FloatArrayLogEntry.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Open Source Software; you can modify and/or share it under the terms of
33
// the WPILib BSD license file in the root directory of this project.
44

5-
namespace WPIUtil.Logging;
5+
namespace WPI.Logging;
66

77
/// <summary>
88
/// Log FloatArray values.

src/wpiutil/Logging/FloatLogEntry.cs renamed to src/datalog/FloatLogEntry.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Open Source Software; you can modify and/or share it under the terms of
33
// the WPILib BSD license file in the root directory of this project.
44

5-
namespace WPIUtil.Logging;
5+
namespace WPI.Logging;
66

77
/// <summary>
88
/// Log Float values.

src/wpiutil/Logging/IntegerArrayLogEntry.cs renamed to src/datalog/IntegerArrayLogEntry.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Open Source Software; you can modify and/or share it under the terms of
33
// the WPILib BSD license file in the root directory of this project.
44

5-
namespace WPIUtil.Logging;
5+
namespace WPI.Logging;
66

77
/// <summary>
88
/// Log IntegerArray values.

src/wpiutil/Logging/IntegerLogEntry.cs renamed to src/datalog/IntegerLogEntry.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Open Source Software; you can modify and/or share it under the terms of
33
// the WPILib BSD license file in the root directory of this project.
44

5-
namespace WPIUtil.Logging;
5+
namespace WPI.Logging;
66

77
/// <summary>
88
/// Log Integer values.

src/wpiutil/Natives/DataLogNative.cs renamed to src/datalog/Natives/DataLogNative.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
using System.Runtime.CompilerServices;
22
using System.Runtime.InteropServices;
33
using System.Runtime.InteropServices.Marshalling;
4+
using WPIUtil;
45
using WPIUtil.Handles;
56
using WPIUtil.Marshal;
67

7-
namespace WPIUtil.Natives;
8+
namespace WPI.Logging.Natives;
89

910
public struct OpaqueDataLog { }
1011

src/wpiutil/Logging/ProtobufLogEntry.cs renamed to src/datalog/ProtobufLogEntry.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using WPIUtil.Serialization.Protobuf;
22

3-
namespace WPIUtil.Logging;
3+
namespace WPI.Logging;
44

55
public sealed class ProtobufLogEntry<T> : DataLogEntry where T : IProtobufSerializable<T>
66
{

src/wpiutil/Logging/RawLogEntry.cs renamed to src/datalog/RawLogEntry.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Open Source Software; you can modify and/or share it under the terms of
33
// the WPILib BSD license file in the root directory of this project.
44

5-
namespace WPIUtil.Logging;
5+
namespace WPI.Logging;
66

77
/// <summary>
88
/// Log Raw values.

src/wpiutil/Logging/StringArrayLogEntry.cs renamed to src/datalog/StringArrayLogEntry.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Open Source Software; you can modify and/or share it under the terms of
33
// the WPILib BSD license file in the root directory of this project.
44

5-
namespace WPIUtil.Logging;
5+
namespace WPI.Logging;
66

77
/// <summary>
88
/// Log StringArray values.

src/wpiutil/Logging/StringLogEntry.cs renamed to src/datalog/StringLogEntry.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Open Source Software; you can modify and/or share it under the terms of
33
// the WPILib BSD license file in the root directory of this project.
44

5-
namespace WPIUtil.Logging;
5+
namespace WPI.Logging;
66

77
/// <summary>
88
/// Log String values.

src/wpiutil/Logging/StructArrayLogEntry.cs renamed to src/datalog/StructArrayLogEntry.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using WPIUtil.Serialization.Struct;
22

3-
namespace WPIUtil.Logging;
3+
namespace WPI.Logging;
44

55
public sealed class StructArrayLogEntry<T> : DataLogEntry where T : IStructSerializable<T>
66
{

src/wpiutil/Logging/StructLogEntry.cs renamed to src/datalog/StructLogEntry.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using WPIUtil.Serialization.Struct;
22

3-
namespace WPIUtil.Logging;
3+
namespace WPI.Logging;
44

55
public sealed class StructLogEntry<T> : DataLogEntry where T : IStructSerializable<T>
66
{

src/datalog/datalog.csproj

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<RootNamespace>WPI.Logging</RootNamespace>
5+
<AssemblyName>FRC.DataLog</AssemblyName>
6+
<NoWarn>1591;CA1401;1570</NoWarn>
7+
<EnableNETAnalyzers>true</EnableNETAnalyzers>
8+
<AnalysisLevel>latest</AnalysisLevel>
9+
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
10+
</PropertyGroup>
11+
12+
<ItemGroup>
13+
<ProjectReference Include="..\wpiutil\wpiutil.csproj" />
14+
<ProjectReference Include="..\wpinet\wpinet.csproj" />
15+
</ItemGroup>
16+
17+
<ItemGroup>
18+
<PackageReference Include="FRC.DataLog.runtime" Version="2025.3.2-114-g3681121" />
19+
</ItemGroup>
20+
21+
</Project>

src/hal/hal.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
</ItemGroup>
1616

1717
<ItemGroup>
18-
<PackageReference Include="FRC.WPIHal.runtime" Version="2025.1.1-beta-1-127-gd1de766" />
18+
<PackageReference Include="FRC.WPIHal.runtime" Version="2025.3.2-114-g3681121" />
1919
</ItemGroup>
2020

2121
</Project>

src/ntcore/Natives/NtCore.Datalog.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
using System.Runtime.CompilerServices;
22
using System.Runtime.InteropServices;
33
using NetworkTables.Handles;
4+
using WPI.Logging.Natives;
45
using WPIUtil;
5-
using WPIUtil.Natives;
66

77
namespace NetworkTables.Natives;
88

src/ntcore/NetworkTableInstance.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
using NetworkTables.Handles;
1414
using NetworkTables.Natives;
1515
using UnitsNet;
16+
using WPI.Logging;
1617
using WPIUtil.Concurrent;
1718
using WPIUtil.Handles;
18-
using WPIUtil.Logging;
1919
using WPIUtil.Natives;
2020
using WPIUtil.Serialization.Protobuf;
2121
using WPIUtil.Serialization.Struct;

src/ntcore/ntcore.csproj

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@
1212
<ItemGroup>
1313
<ProjectReference Include="..\wpiutil\wpiutil.csproj" />
1414
<ProjectReference Include="..\wpinet\wpinet.csproj" />
15+
<ProjectReference Include="..\datalog\datalog.csproj" />
1516
</ItemGroup>
1617

1718
<ItemGroup>
18-
<PackageReference Include="FRC.NetworkTables.runtime" Version="2025.1.1-beta-1-127-gd1de766" />
19+
<PackageReference Include="FRC.NetworkTables.runtime" Version="2025.3.2-114-g3681121" />
1920
</ItemGroup>
2021

2122
</Project>

src/stereologue/Stereologuer.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System.Runtime.CompilerServices;
22
using System.Runtime.InteropServices;
33
using NetworkTables;
4-
using WPIUtil.Logging;
4+
using WPI.Logging;
55
using WPIUtil.Serialization.Protobuf;
66
using WPIUtil.Serialization.Struct;
77

src/wpilibsharp/DataLogManager.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
using NetworkTables;
44
using NetworkTables.Handles;
55
using UnitsNet.NumberExtensions.NumberToDuration;
6+
using WPI.Logging;
67
using WPIUtil.Concurrent;
7-
using WPIUtil.Logging;
88

99
namespace WPILib;
1010

src/wpilibsharp/DriverStation.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
using NetworkTables;
33
using UnitsNet;
44
using UnitsNet.NumberExtensions.NumberToDuration;
5+
using WPI.Logging;
56
using WPIHal;
67
using WPIHal.Natives;
78
using WPIUtil;
89
using WPIUtil.Concurrent;
910
using WPIUtil.Handles;
10-
using WPIUtil.Logging;
1111
using WPIUtil.Natives;
1212
using MatchType = WPIHal.MatchType;
1313

src/wpinet/wpinet.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</ItemGroup>
1515

1616
<ItemGroup>
17-
<PackageReference Include="FRC.WPINet.runtime" Version="2025.1.1-beta-1-127-gd1de766" />
17+
<PackageReference Include="FRC.WPINet.runtime" Version="2025.3.2-114-g3681121" />
1818
</ItemGroup>
1919

2020
</Project>

src/wpiutil/wpiutil.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
<ItemGroup>
1313
<PackageReference Include="CommunityToolkit.Diagnostics" Version="8.2.2" />
14-
<PackageReference Include="FRC.WPIUtil.runtime" Version="2025.1.1-beta-1-127-gd1de766" />
14+
<PackageReference Include="FRC.WPIUtil.runtime" Version="2025.3.2-114-g3681121" />
1515
<PackageReference Include="Google.Protobuf" Version="3.21.12" />
1616
<PackageReference Include="UnitsNet" Version="5.42.0" />
1717
<PackageReference Include="UnitsNet.NumberExtensions" Version="5.42.0" />

test/wpiutil.test/DataLogTest.cs renamed to test/datalog.test/DataLogTest.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
using WPIUtil.Logging;
1+
using WPI.Logging;
22
using Xunit;
33

4-
namespace WPIUtil.Test;
4+
namespace Datalog.Test;
55

66
internal class CallbackData
77
{

test/datalog.test/datalog.test.csproj

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<ItemGroup>
4+
<ProjectReference Include="..\..\src\datalog\datalog.csproj" />
5+
</ItemGroup>
6+
7+
<ItemGroup>
8+
<PackageReference Update="coverlet.collector" Version="6.0.2">
9+
<PrivateAssets>all</PrivateAssets>
10+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
11+
</PackageReference>
12+
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.11.1" />
13+
<PackageReference Update="xunit.runner.visualstudio" Version="2.8.2">
14+
<PrivateAssets>all</PrivateAssets>
15+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
16+
</PackageReference>
17+
</ItemGroup>
18+
19+
</Project>

0 commit comments

Comments
 (0)