Axis Joystick SDK with .NET8 #649
-
Hello there, Is there support enabled for Axis Joystick SDK (https://www.axis.com/developer-community/axis-joystick-sdk#download) for .NET 8 ? Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
This automatically generated reply acts as a friendly reminder. Answers to your questions will most often come from the community, from developers like yourself. You will, from time to time, find that Axis employees answers some of the questions, but this is not a guarantee. Think of the discussion forum as a complement to other support channels, not a replacement to any of them. If your question remains unanswered for a period of time, please revisit it to see whether it can be improved by following the guidelines listed in Axis support guidelines. |
Beta Was this translation helpful? Give feedback.
-
Hi @valonsejdini , Tested with:Output:Code:Program.cs (Same like MinimalApp example 😄 )using System;
using System.Text;
using AxisJoystickModuleLib;
namespace MinimalApp
{
class Program
{
// This simple program does the minimum required to control an Axis PTZ camera
// using a joystick. It is assumed that no username or password is required.
// (It would require the Username and Password properties of the AxisJoystick
// to be set.)
static void Main(string[] args)
{
// Create a AxisJoystickHandler and register all attached joysticks.
AxisJoystickHandler aHandler = new AxisJoystickHandler();
int aNbrJoysticks = aHandler.EnumerateJoysticks();
if (aNbrJoysticks > 0)
{
// Get the first found joystick and set the control URL based on
// the ip of the camera.
AxisJoystick aJoystick = aHandler.GetJoystick(0);
System.Console.Write("Enter ip address of camera: ");
aJoystick.PTZControlURL = "http://" + System.Console.ReadLine() + "/axis-cgi/com/ptz.cgi";
// Activate the joystick so that it will start sending commands to
// the camera.
aJoystick.Activate();
System.Console.WriteLine("Activating joystick. Press <RETURN> to exit");
System.Console.ReadLine();
// Make sure camera is stopped before exiting.
aJoystick.DeActivate();
}
else
{
System.Console.WriteLine("No joysticks attached. Please attach a joystick and restart the application.");
System.Console.ReadLine();
}
}
}
} ConsoleApp_test.csproj<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<COMReference Include="AxisJoystickModuleLib">
<WrapperTool>tlbimp</WrapperTool>
<VersionMinor>0</VersionMinor>
<VersionMajor>2</VersionMajor>
<Guid>f0ac9f23-2056-412a-abb8-6c46fa901163</Guid>
<Lcid>0</Lcid>
<Isolated>false</Isolated>
<EmbedInteropTypes>true</EmbedInteropTypes>
</COMReference>
</ItemGroup>
</Project> |
Beta Was this translation helpful? Give feedback.
Hi @valonsejdini ,
Yes, Axis Joystick SDK can be built using .NET 8.0
Tested with:
Output:
Code:
Program.cs (Same like MinimalApp example 😄 )