Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleaned up some outputs #32

Merged
merged 7 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/develop-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ name: Develop Build
on:
workflow_dispatch:
pull_request:
branches: [ develop ]
push:
branches: [ develop ]
branches: [ develop ]

jobs:
build:
Expand Down Expand Up @@ -41,12 +42,12 @@ jobs:
path: Meadow.Modbus
ref: develop

- name: Checkout MQTTnet fork
- name: Checkout MQTTnet
uses: actions/checkout@v3
with:
repository: WildernessLabs/MQTTnet
path: MQTTnet
ref: meadow
ref: develop

- name: Checkout Meadow.Core
uses: actions/checkout@v3
Expand All @@ -71,7 +72,7 @@ jobs:
uses: actions/setup-dotnet@v1
with:
dotnet-version:
7.0.x
8.0.x

- name: Build Maple
run: dotnet build -c Release Maple/Source/Maple.sln
26 changes: 12 additions & 14 deletions Source/Utilities/Maple.Server_UDP_Listener_Sample.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Company>Wilderness Labs, Inc</Company>
<Authors>Wilderness Labs, Inc</Authors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<LangVersion>10.0</LangVersion>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
<PropertyGroup>
<Company>Wilderness Labs, Inc</Company>
<Authors>Wilderness Labs, Inc</Authors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<LangVersion>10.0</LangVersion>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion Source/Web.Maple.Client/Web.Maple.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Nullable>enable</Nullable>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Authors>Wilderness Labs, Inc</Authors>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>netstandard2.1</TargetFramework>
<AssemblyName>Maple.Client</AssemblyName>
<Company>Wilderness Labs, Inc</Company>
<PackageProjectUrl>http://developer.wildernesslabs.co/Meadow/Meadow.Foundation/</PackageProjectUrl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Authors>Wilderness Labs, Inc</Authors>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Web.Maple.Client\Web.Maple.Client.csproj" />
Expand Down
10 changes: 6 additions & 4 deletions Source/Web.Maple.Server/MapleServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
int port = DefaultPort,
bool advertise = false,
RequestProcessMode processMode = RequestProcessMode.Serial,
Logger logger = null)

Check warning on line 80 in Source/Web.Maple.Server/MapleServer.cs

View workflow job for this annotation

GitHub Actions / build

Cannot convert null literal to non-nullable reference type.

Check warning on line 80 in Source/Web.Maple.Server/MapleServer.cs

View workflow job for this annotation

GitHub Actions / build

Cannot convert null literal to non-nullable reference type.
: this(IPAddress.Parse(ipAddress), port, advertise, processMode, logger)
{
}
Expand Down Expand Up @@ -127,7 +127,7 @@
if (ni.Address.AddressFamily == AddressFamily.InterNetwork)
{
// for now, just use IPv4
Console.WriteLine($"Listening on http://{ni.Address}:{port}/");
Logger?.Trace($"Listening on http://{ni.Address}:{port}/");

// _httpListener.Prefixes.Add($"http://{ni.Address}:{port}/");
}
Expand All @@ -137,7 +137,7 @@
}
else
{
Console.WriteLine($"Listening on http://{IPAddress}:{port}/");
Logger?.Trace($"Listening on http://{IPAddress}:{port}/");

_httpListener.Prefixes.Add($"http://{IPAddress}:{port}/");
}
Expand Down Expand Up @@ -180,6 +180,8 @@
StartUdpAdvertisement();
}
StartListeningToIncomingRequests();

Logger?.Info($"Maple started on IP Address: {IPAddress}");
adrianstevens marked this conversation as resolved.
Show resolved Hide resolved
}

/// <summary>
Expand Down Expand Up @@ -214,7 +216,7 @@

while (Running && _shouldAdvertise)
{
Logger?.Info("UDP Broadcast: " + broadcastData + ", port: " + MAPLE_SERVER_BROADCASTPORT);
Logger?.Trace("UDP Broadcast: " + broadcastData + ", port: " + MAPLE_SERVER_BROADCASTPORT);
socket.SendTo(UTF8Encoding.UTF8.GetBytes(broadcastData), remoteEndPoint);

Thread.Sleep(AdvertiseIntervalMs);
Expand Down Expand Up @@ -262,7 +264,7 @@

if (typesAdded == 0)
{
Console.WriteLine("Warning: No Maple Server `IRequestHandler`s found. Server will not operate.");
Logger?.Warn("Warning: No Maple Server `IRequestHandler`s found. Server will not operate.");
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Authors>Wilderness Labs, Inc</Authors>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Web.Maple.Server\Web.Maple.Server.csproj" />
Expand Down
Loading