Skip to content

Commit

Permalink
Merge pull request #35 from Fluigent/version-21.2.0.0
Browse files Browse the repository at this point in the history
Update SDK to version 21.2.0.0
  • Loading branch information
mtrellet authored Jul 28, 2021
2 parents f89c488 + 91a327e commit 674b572
Show file tree
Hide file tree
Showing 63 changed files with 252 additions and 130 deletions.
66 changes: 22 additions & 44 deletions C#/Examples/Basic Get Instruments Info/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ static void Main(string[] args)
// List all found controllers serial number and type
for (var index = 0; index < controllersCount; index++)
{
Console.WriteLine($"Detected instrument at index: {index}{Environment.NewLine}" +
$"Controller SN: {instruments[index].serialNumber}{Environment.NewLine}" +
$"Type: {instruments[index].type}{Environment.NewLine}");
Console.WriteLine($"Detected instrument at index: {index}");
Console.WriteLine($"Controller SN: {instruments[index].serialNumber}");
Console.WriteLine($"Type: {instruments[index].type}{Environment.NewLine}");
}

// Initialize only specific instrument controllers here
Expand All @@ -47,85 +47,63 @@ static void Main(string[] args)

// Get total number of initialized TTL channel(s)
(errCode, ttlChannelsCount) = fgtSdk.Fgt_get_TtlChannelCount();
Console.WriteLine($"Total number of TTL channels: {ttlChannelsCount}{Environment.NewLine}");
Console.WriteLine($"Total number of TTL channels: {ttlChannelsCount}");

// Get total number of initialized TTL channel(s)
(errCode, valveChannelsCount) = fgtSdk.Fgt_get_valveChannelCount();
Console.WriteLine($"Total number of valve channels: {valveChannelsCount}{Environment.NewLine}");
Console.WriteLine($"Total number of valve channels: {valveChannelsCount}");

Console.WriteLine("");

// Get detailed information about all controller(s)
List<fgt_CONTROLLER_INFO> controllerInfos;
(errCode, controllerInfos) = fgtSdk.Fgt_get_controllersInfo();

for (var index = 0; index < controllersCount; index++)
{
Console.WriteLine($"Controller info at index: {index}{Environment.NewLine}" +
$"SN: {controllerInfos[index].SN}{Environment.NewLine}" +
$"Firmware: {controllerInfos[index].Firmware}{Environment.NewLine}" +
$"ID: {controllerInfos[index].Id}{Environment.NewLine}" +
$"Type: {controllerInfos[index].InstrType}{Environment.NewLine}");
Console.WriteLine($"Controller info at index: {index}");
Console.WriteLine(controllerInfos[index]);
Console.WriteLine("");
}

// Get detailed information about all pressure channels
List<fgt_CHANNEL_INFO> pressureChannelInfo;
(errCode, pressureChannelInfo) = fgtSdk.Fgt_get_pressureChannelsInfo();
for (var index = 0; index < pressureChannelsCount; index++)
{
Console.WriteLine($"Pressure channel info at index: {index}{Environment.NewLine}" +
$"Controller SN: {pressureChannelInfo[index].ControllerSN}{Environment.NewLine}" +
$"Device SN: {pressureChannelInfo[index].DeviceSN}{Environment.NewLine}" +
$"Firmware: {pressureChannelInfo[index].Firmware}{Environment.NewLine}" +
$"Position: {pressureChannelInfo[index].Position}{Environment.NewLine}" +
$"Index: {pressureChannelInfo[index].Index}{Environment.NewLine}" +
$"ID: {pressureChannelInfo[index].IndexId}{Environment.NewLine}" +
$"Type: {pressureChannelInfo[index].InstrType}{Environment.NewLine}");
Console.WriteLine($"Pressure channel info at index: {index}");
Console.WriteLine(pressureChannelInfo[index]);
Console.WriteLine("");
}

// Get detailed information about all sensor channels
List<(fgt_CHANNEL_INFO channelInfo, fgt_SENSOR_TYPE sensorType)> sensorChannelsInfo;
(errCode, sensorChannelsInfo) = fgtSdk.Fgt_get_sensorChannelsInfo();
for (var index = 0; index < sensorChannelsCount; index++)
{
Console.WriteLine($"Sensor channel info at index: {index}{Environment.NewLine}" +
$"Controller SN: {sensorChannelsInfo[index].channelInfo.ControllerSN}{Environment.NewLine}" +
$"Device SN: {sensorChannelsInfo[index].channelInfo.DeviceSN}{Environment.NewLine}" +
$"Firmware: {sensorChannelsInfo[index].channelInfo.Firmware}{Environment.NewLine}" +
$"Position: {sensorChannelsInfo[index].channelInfo.Position}{Environment.NewLine}" +
$"Index: {sensorChannelsInfo[index].channelInfo.Index}{Environment.NewLine}" +
$"ID: {sensorChannelsInfo[index].channelInfo.IndexId}{Environment.NewLine}" +
$"Type: {sensorChannelsInfo[index].channelInfo.InstrType}{Environment.NewLine}" +
$"Sensor type: {sensorChannelsInfo[index].sensorType}{Environment.NewLine}");
Console.WriteLine($"Sensor channel info at index: {index}");
Console.WriteLine(sensorChannelsInfo[index].channelInfo);
Console.WriteLine($"Sensor type: {sensorChannelsInfo[index].sensorType}{Environment.NewLine}");
}

// Get detailed information about all ttl channels
List<fgt_CHANNEL_INFO> ttlChannelsInfo;
(errCode, ttlChannelsInfo) = fgtSdk.Fgt_get_TtlChannelsInfo();
for (var index = 0; index < ttlChannelsCount; index++)
{
Console.WriteLine($"TTL channel info at index: {index}{Environment.NewLine}" +
$"Controller SN: {ttlChannelsInfo[index].ControllerSN}{Environment.NewLine}" +
$"Device SN: {ttlChannelsInfo[index].DeviceSN}{Environment.NewLine}" +
$"Firmware: {ttlChannelsInfo[index].Firmware}{Environment.NewLine}" +
$"Position: {ttlChannelsInfo[index].Position}{Environment.NewLine}" +
$"Index: {ttlChannelsInfo[index].Index}{Environment.NewLine}" +
$"ID: {ttlChannelsInfo[index].IndexId}{Environment.NewLine}" +
$"Type: {ttlChannelsInfo[index].InstrType}{Environment.NewLine}");
Console.WriteLine($"TTL channel info at index: {index}");
Console.WriteLine(ttlChannelsInfo[index]);
Console.WriteLine("");
}

// Get detailed information about all valve channels
List<(fgt_CHANNEL_INFO channelInfo, fgt_VALVE_TYPE valveType)> valveChannelsInfo;
(errCode, valveChannelsInfo) = fgtSdk.Fgt_get_valveChannelsInfo();
for (var index = 0; index < valveChannelsCount; index++)
{
Console.WriteLine($"Valve channel info at index: {index}{Environment.NewLine}" +
$"Controller SN: {valveChannelsInfo[index].channelInfo.ControllerSN}{Environment.NewLine}" +
$"Device SN: {valveChannelsInfo[index].channelInfo.DeviceSN}{Environment.NewLine}" +
$"Firmware: {valveChannelsInfo[index].channelInfo.Firmware}{Environment.NewLine}" +
$"Position: {valveChannelsInfo[index].channelInfo.Position}{Environment.NewLine}" +
$"Index: {valveChannelsInfo[index].channelInfo.Index}{Environment.NewLine}" +
$"ID: {valveChannelsInfo[index].channelInfo.IndexId}{Environment.NewLine}" +
$"Type: {valveChannelsInfo[index].channelInfo.InstrType}{Environment.NewLine}" +
$"Valve type: {valveChannelsInfo[index].valveType}{Environment.NewLine}");
Console.WriteLine($"Valve channel info at index: {index}");
Console.WriteLine(valveChannelsInfo[index].channelInfo);
Console.WriteLine($"Valve type: {valveChannelsInfo[index].valveType}{Environment.NewLine}");
}
}
else
Expand Down
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.
17 changes: 17 additions & 0 deletions C#/fgt_sdk_csharp/Structs/fgt_CHANNEL_INFO.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using fgt_sdk.Enums;
using System;

namespace fgt_sdk.Structs
{
Expand All @@ -21,5 +22,21 @@ public struct fgt_CHANNEL_INFO
public uint IndexId;
/** Type of the instrument */
public fgt_INSTRUMENT_TYPE InstrType;
/// <summary>
/// Prints the struct fields
/// </summary>
/// <returns></returns>
public override string ToString()
{
return string.Join(Environment.NewLine, new string[] {
$"Controller SN: {ControllerSN}",
$"Device SN: {DeviceSN}",
$"Firmware: {(Firmware >> 8) & 0xFF:x}.{Firmware & 0xFF:x2}",
$"Position: {Position}",
$"Index: {Index}",
$"ID: {IndexId}",
$"Type: {InstrType}",
});
}
}
}
14 changes: 14 additions & 0 deletions C#/fgt_sdk_csharp/Structs/fgt_CONTROLLER_INFO.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using fgt_sdk.Enums;
using System;
using System.Runtime.InteropServices;

namespace fgt_sdk.Structs
Expand All @@ -17,5 +18,18 @@ public struct fgt_CONTROLLER_INFO
public uint Id;
/** Instrument type */
public fgt_INSTRUMENT_TYPE InstrType;
/// <summary>
/// Prints the struct fields
/// </summary>
/// <returns></returns>
public override string ToString()
{
return string.Join(Environment.NewLine, new string[] {
$"Controller SN: {SN}",
$"Firmware: {(Firmware >> 8) & 0xFF:x}.{Firmware & 0xFF:x2}",
$"ID: {Id}",
$"Type: {InstrType}",
});
}
}
}
6 changes: 3 additions & 3 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>21.1.0.0</Version>
<Version>21.2.0.0</Version>
<PackageTags>Microfluidics, Control</PackageTags>
<Platforms>AnyCPU;x64;x86</Platforms>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<AssemblyVersion>21.1.0.0</AssemblyVersion>
<AssemblyVersion>21.2.0.0</AssemblyVersion>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<Copyright>Copyright (c) Fluigent 2021</Copyright>
<RepositoryUrl>https://github.com/Fluigent/fgt-SDK</RepositoryUrl>
<PackageProjectUrl>https://www.fluigent.com/</PackageProjectUrl>
<FileVersion>21.1.0.0</FileVersion>
<FileVersion>21.2.0.0</FileVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ int main()

// Get total number of initialized TTL channel(s)
Fgt_get_TtlChannelCount(&ttl_number);
std::cout << "Total number of TTL channels: " << int(ttl_number) << std::endl << std::endl;
std::cout << "Total number of TTL channels: " << int(ttl_number) << std::endl;

// Get total number of initialized valve channel(s)
Fgt_get_valveChannelCount(&valve_number);
Expand All @@ -75,49 +75,42 @@ int main()
Fgt_get_controllersInfo(controller_info);
for (unsigned char loop = 0; loop < controller_number; loop++)
{
std::cout << "Controller info at index: " << int(loop) << " SN: " << controller_info[loop].SN
<< " Firmware: " << controller_info[loop].Firmware << " ID: " << controller_info[loop].id
<< " type: " << controller_info[loop].InstrType << std::endl;
std::cout << "Controller info at index: " << int(loop) << "\n"
<< controller_info[loop] << "\n\n";
}

// Get detailed information about all pressure channels
Fgt_get_pressureChannelsInfo(pressure_info);
for (unsigned char loop = 0; loop < pressure_number; loop++)
{
std::cout << "Pressure channel info at index: " << int(loop) << " ,Controller SN: " << pressure_info[loop].ControllerSN
<< " DeviceSN: " << pressure_info[loop].DeviceSN << " firmware: " << pressure_info[loop].firmware
<< " position: " << pressure_info[loop].position << " index: " << pressure_info[loop].index
<< " ID: " << pressure_info[loop].indexID << " InstrType: " << pressure_info[loop].InstrType << std::endl;
std::cout << "Pressure channel info at index: " << int(loop) << "\n"
<< pressure_info[loop] << "\n\n";
}

// Get detailed information about all sensor channels
Fgt_get_sensorChannelsInfo(sensor_info, sensor_type);
for (unsigned char loop = 0; loop < sensor_number; loop++)
{
std::cout << "Sensor channel info at index: " << int(loop) << " ,ControllerSN: " << sensor_info[loop].ControllerSN
<< " DeviceSN: " << sensor_info[loop].DeviceSN << " firmware: " << sensor_info[loop].firmware
<< " position: " << sensor_info[loop].position << " index: " << sensor_info[loop].index
<< " ID: " << sensor_info[loop].indexID << " InstrType: " << sensor_info[loop].InstrType << " sensor SensorType: " << sensor_type[loop] << std::endl;
std::cout << "Sensor channel info at index: " << int(loop) << "\n"
<< sensor_info[loop] << "\n"
<< "Sensor type: " << sensor_type[loop] << "\n\n";
}

// Get detailed information about all TTL channels
Fgt_get_TtlChannelsInfo(Ttl_info);
for (unsigned char loop = 0; loop < ttl_number; loop++)
{
std::cout << "TTL channel info at index: " << int(loop) << " ControllerSN: " << Ttl_info[loop].ControllerSN
<< " DeviceSN: " << Ttl_info[loop].DeviceSN << " firmware: " << Ttl_info[loop].firmware
<< " position: " << Ttl_info[loop].position << " index: " << Ttl_info[loop].index
<< " ID: " << Ttl_info[loop].indexID << " InstrType: " << Ttl_info[loop].InstrType << std::endl;
std::cout << "TTL channel info at index: " << int(loop) << "\n"
<< Ttl_info[loop] << "\n\n";
}

// Get detailed information about all valve channels
Fgt_get_valveChannelsInfo(valve_info, valve_type);
for (unsigned char loop = 0; loop < valve_number; loop++)
{
std::cout << "Valve channel info at index: " << int(loop) << " ,ControllerSN: " << valve_info[loop].ControllerSN
<< " DeviceSN: " << valve_info[loop].DeviceSN << " firmware: " << valve_info[loop].firmware
<< " position: " << valve_info[loop].position << " index: " << valve_info[loop].index
<< " ID: " << valve_info[loop].indexID << " InstrType: " << valve_info[loop].InstrType << " valve ValveType: " << valve_type[loop] << std::endl;
std::cout << "Valve channel info at index: " << int(loop) << "\n"
<< valve_info[loop] << "\n"
<< "Valve type: " << valve_type[loop] << "\n\n";
}

// Close session
Expand Down
8 changes: 4 additions & 4 deletions C++/fgt_SDK_Cpp/dlls/fgt_SDK.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
*
* Title: fgt_SDK.h
* Purpose: Functions API for Fluigent instruments
* Version: 21.1.0.0
* Date: 05/2021
* Version: 21.2.0.0
* Date: 07/2021
*============================================================================*/

#ifndef _FGT_SDK_H
Expand Down Expand Up @@ -116,7 +116,7 @@ typedef struct
{
/** Serial number of this channel's controller */
unsigned short ControllerSN;
/** Firmware version of this channel (0 if not applicable) */
/** Firmware version of this channel in BCD (0 if not applicable) */
unsigned short firmware;
/** Serial number of this channel (0 if not applicable) */
unsigned short DeviceSN;
Expand All @@ -135,7 +135,7 @@ typedef struct
{
/** Serial number */
unsigned short SN;
/** Firmware version */
/** Firmware version in BCD */
unsigned short Firmware;
/** Index */
unsigned int id;
Expand Down
Binary file modified C++/fgt_SDK_Cpp/dlls/linux/x64/libfgt_SDK.so
Binary file not shown.
Binary file modified C++/fgt_SDK_Cpp/dlls/mac/x64/libfgt_SDK.dylib
Binary file not shown.
Binary file modified C++/fgt_SDK_Cpp/dlls/windows/x64/fgt_SDK.dll
Binary file not shown.
Binary file modified C++/fgt_SDK_Cpp/dlls/windows/x64/fgt_SDK.lib
Binary file not shown.
Binary file modified C++/fgt_SDK_Cpp/dlls/windows/x86/fgt_SDK.dll
Binary file not shown.
Binary file modified C++/fgt_SDK_Cpp/dlls/windows/x86/fgt_SDK.lib
Binary file not shown.
28 changes: 28 additions & 0 deletions C++/fgt_SDK_Cpp/fgt_SDK_Cpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
*============================================================================*/

#include <iostream>
#include <cstdio>
#include "fgt_SDK_Cpp.h"

/*============================================================================*/
Expand Down Expand Up @@ -157,6 +158,33 @@ std::ostream& operator<<(std::ostream& str, fgt_SWITCH_DIRECTION direction)
return str;
}

std::string format_firmware_version(unsigned short bcd_version)
{
char buf[10]{};
std::snprintf(buf, 10, "%x.%02x", bcd_version >> 8, bcd_version & 0xff);
return std::string(buf);
}

std::ostream& operator<<(std::ostream& str, const fgt_CONTROLLER_INFO& info)
{
str << "SN: " << info.SN << "\n"
<< "Firmware: " << format_firmware_version(info.Firmware) << "\n"
<< "Unique ID: " << info.id << "\n"
<< "Type: " << info.InstrType;
return str;
}

std::ostream& operator<<(std::ostream& str, const fgt_CHANNEL_INFO& info)
{
str << "Controller SN: " << info.ControllerSN << "\n"
<< "Device SN: " << info.DeviceSN << "\n"
<< "Firmware: " << format_firmware_version(info.firmware) << "\n"
<< "Position: " << info.position << "\n"
<< "Unique ID: " << info.indexID << "\n"
<< "Type: " << info.InstrType;
return str;
}


/** Manage pressure error and status, display details
* Change this function for custom error management, returned fgt_ERROR_CODE can directly be used in main application
Expand Down
6 changes: 6 additions & 0 deletions C++/fgt_SDK_Cpp/fgt_SDK_Cpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ std::ostream& operator<<(std::ostream& str, fgt_VALVE_TYPE valveType);
/** fgt_SWITCH_DIRECTION: switch direction for rotating switches */
std::ostream& operator<<(std::ostream& str, fgt_SWITCH_DIRECTION direction);

/** fgt_CONTROLLER_INFO: displays data on controller instruments */
std::ostream& operator<<(std::ostream& str, const fgt_CONTROLLER_INFO& info);

/** fgt_CHANNEL_INFO: displays data instrument channels */
std::ostream& operator<<(std::ostream& str, const fgt_CHANNEL_INFO& info);

/** Manage pressure error and status, display details
* Change this function for custom error management, returned fgt_ERROR_CODE can directly be used in main application
* This functions calls Fgt_get_pressureStatus and displays error details */
Expand Down
Binary file modified Fluigent SDK.pdf
Binary file not shown.
8 changes: 4 additions & 4 deletions LabVIEW/dlls/fgt_SDK.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
*
* Title: fgt_SDK.h
* Purpose: Functions API for Fluigent instruments
* Version: 21.1.0.0
* Date: 05/2021
* Version: 21.2.0.0
* Date: 07/2021
*============================================================================*/

#ifndef _FGT_SDK_H
Expand Down Expand Up @@ -116,7 +116,7 @@ typedef struct
{
/** Serial number of this channel's controller */
unsigned short ControllerSN;
/** Firmware version of this channel (0 if not applicable) */
/** Firmware version of this channel in BCD (0 if not applicable) */
unsigned short firmware;
/** Serial number of this channel (0 if not applicable) */
unsigned short DeviceSN;
Expand All @@ -135,7 +135,7 @@ typedef struct
{
/** Serial number */
unsigned short SN;
/** Firmware version */
/** Firmware version in BCD */
unsigned short Firmware;
/** Index */
unsigned int id;
Expand Down
Binary file modified LabVIEW/dlls/fgt_SDK_32.dll
Binary file not shown.
Binary file modified LabVIEW/dlls/fgt_SDK_64.dll
Binary file not shown.
Binary file modified LabVIEW/sourceCode/Examples/Basic Get Instruments Info.vi
Binary file not shown.
Binary file modified LabVIEW/sourceCode/Examples/Basic Set Valve Position.vi
Binary file not shown.
Binary file not shown.
Binary file modified LabVIEW/sourceCode/VIs/Specific functions/fgt set all Valves.vi
Binary file not shown.
Binary file modified LabVIEW/sourceCode/VIs/dir.mnu
Binary file not shown.
Binary file modified MATLAB/Toolbox/SDK/Fluigent/+LowLevel/private/fgt_SDK_32.dll
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function [methodinfo,structs,enuminfo,ThunkLibName]=fgt_SDK_32_prototype
%FGT_SDK_32_PROTOTYPE Create structures to define interfaces found in 'fgt_SDK'.

%This function was generated by loadlibrary.m parser version on Wed May 26 15:48:12 2021
%This function was generated by loadlibrary.m parser version on Tue Jul 13 15:27:11 2021
%perl options:'fgt_SDK.i -outfile=fgt_SDK_32_prototype.m'
ival={cell(1,0)}; % change 0 to the actual number of functions to preallocate the data.
structs=[];enuminfo=[];fcnNum=1;
Expand Down
Binary file modified MATLAB/Toolbox/SDK/Fluigent/+LowLevel/private/fgt_SDK_64.dll
Binary file not shown.
Loading

0 comments on commit 674b572

Please sign in to comment.