Skip to content

Commit

Permalink
Revert "Update SDK to version 24.0.0.0"
Browse files Browse the repository at this point in the history
  • Loading branch information
mtrellet authored Sep 26, 2024
1 parent a03c9df commit 89f95a9
Show file tree
Hide file tree
Showing 83 changed files with 2,626 additions and 2,729 deletions.
Binary file modified C#/StaticFiles/fgt_sdk_dlls/linux/arm/libfgt_SDK.so
Binary file not shown.
Binary file modified C#/StaticFiles/fgt_sdk_dlls/linux/arm64/libfgt_SDK.so
Binary file not shown.
Binary file modified C#/StaticFiles/fgt_sdk_dlls/linux/x64/libfgt_SDK.so
Binary file not shown.
Binary file modified C#/StaticFiles/fgt_sdk_dlls/mac/x64/libfgt_SDK.dylib
Binary file not shown.
Binary file modified C#/StaticFiles/fgt_sdk_dlls/windows/x64/fgt_SDK.dll
Binary file not shown.
Binary file modified C#/StaticFiles/fgt_sdk_dlls/windows/x64/fgt_SDK.lib
Binary file not shown.
Binary file modified C#/StaticFiles/fgt_sdk_dlls/windows/x86/fgt_SDK.dll
Binary file not shown.
Binary file modified C#/StaticFiles/fgt_sdk_dlls/windows/x86/fgt_SDK.lib
Binary file not shown.
94 changes: 53 additions & 41 deletions C#/fgt_sdk_csharp/fgtSdk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
using fgt_sdk.Enums;
using fgt_sdk.Structs;

Expand Down Expand Up @@ -183,23 +182,23 @@ private static IntPtr ArchResolver(string libraryName, Assembly assembly, DllImp

// unsigned char __stdcall fgt_set_sessionPressureUnit(char unit[140]);
[DllImport(FGT_SDK)]
private static extern byte fgt_set_sessionPressureUnit(byte[] unit);
private static extern byte fgt_set_sessionPressureUnit(char[] unit);

// unsigned char __stdcall fgt_set_pressureUnit(unsigned int pressureIndex, char unit[140]);
// unsigned char __stdcall fgt_set_pressureUnit(unsigned int presureIndex, char unit[140]);
[DllImport(FGT_SDK)]
private static extern byte fgt_set_pressureUnit(uint pressureIndex, byte[] unit);
private static extern byte fgt_set_pressureUnit(uint pressureIndex, char[] unit);

// unsigned char __stdcall fgt_get_pressureUnit(unsigned int pressureIndex, char unit[140]);
[DllImport(FGT_SDK)]
private static extern byte fgt_get_pressureUnit(uint pressureIndex, [Out, MarshalAs(UnmanagedType.LPArray, SizeConst = 140)] byte[] unit);
private static extern byte fgt_get_pressureUnit(uint pressureIndex, [Out, MarshalAs(UnmanagedType.LPArray, SizeConst = 140)] char[] unit);

// unsigned char __stdcall fgt_set_sensorUnit(unsigned int sensorIndex, char unit[140]);
[DllImport(FGT_SDK)]
private static extern byte fgt_set_sensorUnit(uint sensorIndex, byte[] unit);
private static extern byte fgt_set_sensorUnit(uint sensorIndex, char[] unit);

// unsigned char __stdcall fgt_get_sensorUnit(unsigned int sensorIndex, char unit[140]);
[DllImport(FGT_SDK)]
private static extern byte fgt_get_sensorUnit(uint sensorIndex, [Out, MarshalAs(UnmanagedType.LPArray, SizeConst = 140)] byte[] unit);
private static extern byte fgt_get_sensorUnit(uint sensorIndex, [Out, MarshalAs(UnmanagedType.LPArray, SizeConst = 140)] char[] unit);

// unsigned char __stdcall fgt_set_sensorCalibration(unsigned int sensorIndex, int calibration);
[DllImport(FGT_SDK)]
Expand Down Expand Up @@ -249,10 +248,6 @@ private static IntPtr ArchResolver(string libraryName, Assembly assembly, DllImp
[DllImport(FGT_SDK)]
private static extern byte fgt_set_sensorRegulationResponse(uint sensorIndex, uint responseTime);

// unsigned char __stdcall fgt_set_sensorRegulationInverted(unsigned int sensorIndex, unsigned char inverted);
[DllImport(FGT_SDK)]
private static extern byte fgt_set_sensorRegulationInverted(uint sensorIndex, byte inverted);

// unsigned char __stdcall fgt_set_pressureResponse(unsigned int pressureIndex, unsigned char value);
[DllImport(FGT_SDK)]
private static extern byte fgt_set_pressureResponse(uint pressureIndex, byte value);
Expand Down Expand Up @@ -352,9 +347,9 @@ private static IntPtr ArchResolver(string libraryName, Assembly assembly, DllImp
[DllImport(FGT_SDK)]
private static extern byte fgt_set_log_output_mode(byte output_to_file, byte output_to_stderr, byte output_to_queue);

// unsigned char FGT_API fgt_get_next_log(char log[4000]);
// unsigned char FGT_API fgt_get_next_log(char log[2000]);
[DllImport(FGT_SDK)]
private static extern byte fgt_get_next_log([Out, MarshalAs(UnmanagedType.LPArray, SizeConst = 4000)] byte[] detail);
private static extern byte fgt_get_next_log([Out, MarshalAs(UnmanagedType.LPArray, SizeConst = 2000)] char[] detail);
#endregion

#endregion
Expand Down Expand Up @@ -578,7 +573,7 @@ public static (fgt_ERROR_CODE errCode, int count) Fgt_get_valveChannelCount()
}

/// <summary>
/// Retrieve information about each initialized pressure channel. This function is useful in order to get channels order, controller, unique ID and instrument type.
/// Retrieve information about each initialized pressure channel. This function is useful in order to get channels order, controller, unique ID and intrument type.
/// By default this array is built with MFCS first, MFCS-EZ second and FlowEZ last.If only one instrument is used, index is the default channel indexing starting at 0.
/// You can initialize instruments in specific order using <see cref="Fgt_initEx"/> function
/// </summary>
Expand Down Expand Up @@ -780,8 +775,18 @@ public static fgt_ERROR_CODE Fgt_set_allValves(uint controllerIndex, uint module
/// <returns>Error code <see cref="fgt_ERROR_CODE"/></returns>
public static fgt_ERROR_CODE Fgt_set_sessionPressureUnit(string unit)
{
var pressureUnit = new byte[140];
Encoding.UTF8.GetBytes(unit).CopyTo(pressureUnit, 0);
var unitArray = unit.ToCharArray();
var pressureUnit = new char[140];

try
{
unitArray.CopyTo(pressureUnit, 0);
}
catch (Exception e)
{
Console.WriteLine(e);
throw;
}

var errCode = ErrCheck((fgt_ERROR_CODE)fgt_set_sessionPressureUnit(pressureUnit), fgt_ERRCHECK_TYPE.Pressure);
return errCode;
Expand All @@ -796,8 +801,18 @@ public static fgt_ERROR_CODE Fgt_set_sessionPressureUnit(string unit)
/// <returns>Error code <see cref="fgt_ERROR_CODE"/></returns>
public static fgt_ERROR_CODE Fgt_set_pressureUnit(uint pressureIndex, string unit)
{
var pressureUnit = new byte[140];
Encoding.UTF8.GetBytes(unit).CopyTo(pressureUnit, 0);
var unitArray = unit.ToCharArray();
var pressureUnit = new char[140];

try
{
unitArray.CopyTo(pressureUnit, 0);
}
catch (Exception e)
{
Console.WriteLine(e);
throw;
}

var errCode = ErrCheck((fgt_ERROR_CODE)fgt_set_pressureUnit(pressureIndex, pressureUnit), fgt_ERRCHECK_TYPE.Pressure, pressureIndex);
return errCode;
Expand All @@ -811,10 +826,10 @@ public static fgt_ERROR_CODE Fgt_set_pressureUnit(uint pressureIndex, string uni
/// <returns>Error code <see cref="fgt_ERROR_CODE"/> and the current unit string</returns>
public static (fgt_ERROR_CODE errCode, string unit) Fgt_get_pressureUnit(uint pressureIndex)
{
var pressureUnit = new byte[140];
var pressureUnit = new char[140];
var errCode = ErrCheck((fgt_ERROR_CODE)fgt_get_pressureUnit(pressureIndex, pressureUnit), fgt_ERRCHECK_TYPE.Pressure, pressureIndex);

var unitString = Encoding.UTF8.GetString(pressureUnit.TakeWhile(c => c != '\0').ToArray());
var unitString = new string(pressureUnit.TakeWhile(c => c != '\0').ToArray());
return (errCode, unitString);
}

Expand All @@ -827,8 +842,18 @@ public static (fgt_ERROR_CODE errCode, string unit) Fgt_get_pressureUnit(uint pr
/// <returns>Error code <see cref="fgt_ERROR_CODE"/></returns>
public static fgt_ERROR_CODE Fgt_set_sensorUnit(uint sensorIndex, string sensorUnit)
{
var unit = new byte[140];
Encoding.UTF8.GetBytes(sensorUnit).CopyTo(unit, 0);
var unitArray = sensorUnit.ToCharArray();
var unit = new char[140];

try
{
unitArray.CopyTo(unit, 0);
}
catch (Exception e)
{
Console.WriteLine(e);
throw;
}

var errCode = ErrCheck((fgt_ERROR_CODE)fgt_set_sensorUnit(sensorIndex, unit), fgt_ERRCHECK_TYPE.Sensor, sensorIndex);
return errCode;
Expand All @@ -842,10 +867,10 @@ public static fgt_ERROR_CODE Fgt_set_sensorUnit(uint sensorIndex, string sensorU
/// <returns>Error code <see cref="fgt_ERROR_CODE"/> and the current unit string</returns>
public static (fgt_ERROR_CODE errCode, string unit) Fgt_get_sensorUnit(uint sensorIndex)
{
var unit = new byte[140];
var unit = new char[140];
var errCode = ErrCheck((fgt_ERROR_CODE)fgt_get_sensorUnit(sensorIndex, unit), fgt_ERRCHECK_TYPE.Sensor, sensorIndex);

var unitString = Encoding.UTF8.GetString(unit.TakeWhile(c => c != '\0').ToArray());
var unitString = new string(unit.TakeWhile(c => c != '\0').ToArray());
return (errCode, unitString);
}

Expand Down Expand Up @@ -1003,19 +1028,6 @@ public static fgt_ERROR_CODE Fgt_set_sensorRegulationResponse(uint sensorIndex,
return errCode;
}

/// <summary>
/// Specify whether the sensor is inverted in the physical setup, i.e., if an increase
/// in pressure causes the sensor value to decrease and vice-versa.
/// </summary>
/// <param name="sensorIndex">Index of sensor channel or unique ID</param>
/// <param name="inverted">true if the sensor is inverted, false otherwise</param>
/// <returns>Error code <see cref="fgt_ERROR_CODE"/></returns>
public static fgt_ERROR_CODE Fgt_set_sensorRegulationInverted(uint sensorIndex, bool inverted)
{
var errCode = ErrCheck((fgt_ERROR_CODE)fgt_set_sensorRegulationInverted(sensorIndex, (byte)(inverted ? 1 : 0)), fgt_ERRCHECK_TYPE.Sensor, sensorIndex);
return errCode;
}

/// <summary>
/// Set pressure controller response. This function can be used to customise response time for your set-up.
/// For FlowEZ available values are 0: use of fast switch valves or 1: do not use fast switch valves. Default value is 0.
Expand Down Expand Up @@ -1119,7 +1131,7 @@ public static fgt_ERROR_CODE Fgt_set_TtlMode(uint TtlIndex, fgt_TTL_MODE mode)
/// Read TTL port (BNC port) if set as input.
/// </summary>
/// <param name="ttlIndex">Index of TTL port or unique ID</param>
/// <returns>Error code <see cref="fgt_ERROR_CODE"/> and a boolean indicating if an event (edge) has occurred</returns>
/// <returns>Error code <see cref="fgt_ERROR_CODE"/> and a boolean indicating if an event (edge) has occured</returns>
public static (fgt_ERROR_CODE errCode, bool ttlEvent) Fgt_read_Ttl(uint ttlIndex)
{
uint state = 0;
Expand All @@ -1131,7 +1143,7 @@ public static (fgt_ERROR_CODE errCode, bool ttlEvent) Fgt_read_Ttl(uint ttlIndex
/// Trigger a specific TTL port (BNC ports) if set as output.
/// </summary>
/// <param name="ttlIndex">Index of TTL port or unique ID</param>
/// <returns>Error code <see cref="fgt_ERROR_CODE"/> and a boolean indicating if an event (edge) has occurred</returns>
/// <returns>Error code <see cref="fgt_ERROR_CODE"/> and a boolean indicating if an event (edge) has occured</returns>
public static fgt_ERROR_CODE Fgt_trigger_Ttl(uint ttlIndex)
{
var errCode = ErrCheck((fgt_ERROR_CODE)fgt_trigger_Ttl(ttlIndex), fgt_ERRCHECK_TYPE.Generic);
Expand Down Expand Up @@ -1324,10 +1336,10 @@ public static fgt_ERROR_CODE Fgt_set_log_output_mode(bool output_to_file, bool o
/// <returns>Error code <see cref="fgt_ERROR_CODE"/></returns>
public static (fgt_ERROR_CODE, string log) Fgt_get_next_log()
{
var log = new byte[4000];
var log = new char[2000];
var errCode = ErrCheck((fgt_ERROR_CODE)fgt_get_next_log(log), fgt_ERRCHECK_TYPE.Generic);
if (errCode != fgt_ERROR_CODE.OK) { return (errCode, string.Empty); }
var logString = Encoding.UTF8.GetString(log.TakeWhile(c => c != '\0').ToArray());
var logString = new string(log.TakeWhile(c => c != '\0').ToArray());
return (errCode, logString);
}
#endregion
Expand Down
8 changes: 4 additions & 4 deletions C#/fgt_sdk_csharp/fgt_sdk.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
<Authors>Fluigent</Authors>
<Product>Fluigent Software Development Kit</Product>
<Description>C# Software Development Kit for Fluigent instruments</Description>
<Version>24.0.0.0</Version>
<Version>23.0.0.0</Version>
<PackageTags>Microfluidics, Control</PackageTags>
<Platforms>AnyCPU;x64;x86</Platforms>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<AssemblyVersion>24.0.0.0</AssemblyVersion>
<AssemblyVersion>23.0.0.0</AssemblyVersion>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<Copyright>Copyright (c) Fluigent 2024</Copyright>
<Copyright>Copyright (c) Fluigent 2023</Copyright>
<RepositoryUrl>https://github.com/Fluigent/fgt-SDK</RepositoryUrl>
<PackageProjectUrl>https://www.fluigent.com/</PackageProjectUrl>
<FileVersion>24.0.0.0</FileVersion>
<FileVersion>23.0.0.0</FileVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
Expand Down
2 changes: 1 addition & 1 deletion C++/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.13)

project(SDK_cpp_examples VERSION 24.0.0.0)
project(SDK_cpp_examples VERSION 23.0.0.0)
set(CMAKE_CXX_STANDARD 11)

add_subdirectory(fgt_SDK_Cpp)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*============================================================================
* Fluigent Software Development Kit for C++
/*============================================================================
* Fluigent Software Developement Kit for C++
*----------------------------------------------------------------------------
* Copyright (c) Fluigent 2021. All Rights Reserved.
*----------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions C++/Examples/Advanced Features/Advanced Features.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*============================================================================
* Fluigent Software Development Kit for C++
/*============================================================================
* Fluigent Software Developement Kit for C++
*----------------------------------------------------------------------------
* Copyright (c) Fluigent 2021. All Rights Reserved.
*----------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*============================================================================
* Fluigent Software Development Kit for C++
* Fluigent Software Developement Kit for C++
*----------------------------------------------------------------------------
* Copyright (c) Fluigent 2021. All Rights Reserved.
*----------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*============================================================================
* Fluigent Software Development Kit for C++
/*============================================================================
* Fluigent Software Developement Kit for C++
*----------------------------------------------------------------------------
* Copyright (c) Fluigent 2021. All Rights Reserved.
*----------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*============================================================================
* Fluigent Software Development Kit for C++
/*============================================================================
* Fluigent Software Developement Kit for C++
*----------------------------------------------------------------------------
* Copyright (c) Fluigent 2021. All Rights Reserved.
*----------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*============================================================================
* Fluigent Software Development Kit for C++
/*============================================================================
* Fluigent Software Developement Kit for C++
*----------------------------------------------------------------------------
* Copyright (c) Fluigent 2021. All Rights Reserved.
*----------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*============================================================================
* Fluigent Software Development Kit for C++
/*============================================================================
* Fluigent Software Developement Kit for C++
*----------------------------------------------------------------------------
* Copyright (c) Fluigent 2021. All Rights Reserved.
*----------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions C++/Examples/Basic Set Pressure/Basic Set Pressure.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*============================================================================
* Fluigent Software Development Kit for C++
/*============================================================================
* Fluigent Software Developement Kit for C++
*----------------------------------------------------------------------------
* Copyright (c) Fluigent 2021. All Rights Reserved.
*----------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*============================================================================
* Fluigent Software Development Kit for C++
/*============================================================================
* Fluigent Software Developement Kit for C++
*----------------------------------------------------------------------------
* Copyright (c) Fluigent 2021. All Rights Reserved.
*----------------------------------------------------------------------------
Expand Down
Loading

0 comments on commit 89f95a9

Please sign in to comment.