verwijder testen
This commit is contained in:
parent
a058880011
commit
ac114cce90
42 changed files with 0 additions and 26701 deletions
|
|
@ -1,14 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.IO.Ports" Version="10.0.10" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
using System;
|
||||
using System.Text;
|
||||
|
||||
public static class Crc16IbmSdlc
|
||||
{
|
||||
private const ushort PolyReversed = 0x8408; // Reflected 0x1021
|
||||
private const ushort Init = 0xFFFF;
|
||||
private const ushort XorOut = 0xFFFF;
|
||||
|
||||
private static readonly ushort[] Table = new ushort[256];
|
||||
|
||||
static Crc16IbmSdlc()
|
||||
{
|
||||
for (ushort i = 0; i < 256; i++)
|
||||
{
|
||||
ushort value = i;
|
||||
for (byte j = 0; j < 8; j++)
|
||||
{
|
||||
if ((value & 1) != 0)
|
||||
value = (ushort)((value >> 1) ^ PolyReversed);
|
||||
else
|
||||
value >>= 1;
|
||||
}
|
||||
Table[i] = value;
|
||||
}
|
||||
}
|
||||
|
||||
public static ushort ComputeChecksum(ReadOnlySpan<byte> data)
|
||||
{
|
||||
ushort crc = Init;
|
||||
foreach (byte b in data)
|
||||
{
|
||||
crc = (ushort)((crc >> 8) ^ Table[(crc ^ b) & 0xFF]);
|
||||
}
|
||||
return (ushort)(crc ^ XorOut);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,189 +0,0 @@
|
|||
using System.Buffers;
|
||||
using System.Buffers.Binary;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.IO.Ports;
|
||||
|
||||
|
||||
//string bx = "4F000000780000004F00000078000000000000000000";
|
||||
|
||||
//ReadOnlySpan<byte> rs = Convert.FromHexString(bx);
|
||||
//int x = rs.Length;
|
||||
//ushort checksum = Crc16IbmSdlc.ComputeChecksum(rs);
|
||||
|
||||
string bufp = "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff";
|
||||
string buf = "ffffffffc0ffffff003f00c1";
|
||||
|
||||
Span<byte> discoverID = [ 0xff, 0xff, 0xff];
|
||||
Span<byte> curID = [ 0xff, 0xf9, 0x07 ];
|
||||
Span<byte> curIDrest = [ 0x00, 0x00, 0xc2, 0x01, 0x00 ];
|
||||
|
||||
byte[] bufferp = Convert.FromHexString(bufp);
|
||||
byte[] buffer = Convert.FromHexString(buf);
|
||||
byte[] buffer2 = new byte[256];
|
||||
|
||||
ReadOnlySpan<byte> bConnect = MakeConnect(4, curID, curIDrest);
|
||||
ReadOnlySpan<byte> bDiscover = MakeDiscover(discoverID);
|
||||
string hexString;
|
||||
|
||||
SerialPort sp = new SerialPort("COM3", 9600);
|
||||
sp.Open();
|
||||
sp.BaudRate = 9600; sp.Parity = Parity.None; sp.DataBits = 8; sp.StopBits = StopBits.One;
|
||||
sp.DtrEnable = true;
|
||||
sp.RtsEnable = true;
|
||||
|
||||
sp.ReadTimeout = 1000;
|
||||
sp.Handshake = Handshake.RequestToSend;
|
||||
for (int ix = 0; ix < 2; ix++)
|
||||
{
|
||||
hexString = Convert.ToHexString(bDiscover);
|
||||
Console.WriteLine($"-> Discover {hexString}");
|
||||
sp.BaseStream.Write(bDiscover);
|
||||
|
||||
int b = sp.Read(buffer2, 0, 255);
|
||||
hexString = Convert.ToHexString(buffer2,0,b);
|
||||
Console.WriteLine($"<- ok {b} bytes: {hexString}");
|
||||
Thread.Sleep(500);
|
||||
}
|
||||
|
||||
sp.ReadTimeout = 1000;
|
||||
sp.DiscardInBuffer();
|
||||
sp.DiscardOutBuffer();
|
||||
for (int ix = 0; ix < 2; ix++)
|
||||
{
|
||||
hexString = Convert.ToHexString(bConnect);
|
||||
Console.WriteLine($"-> Connect {hexString}");
|
||||
sp.BaseStream.Write(bConnect);
|
||||
int b = sp.Read(buffer2, 0, 255);
|
||||
hexString = Convert.ToHexString(buffer2, 0, b);
|
||||
Console.WriteLine($"<- ok {b} bytes: {hexString}");
|
||||
Thread.Sleep(500);
|
||||
} //-> "C0FFF907879994C1"
|
||||
|
||||
//for (int ix = 0; ix < 32; ix++)
|
||||
//{
|
||||
// //hexString = Convert.ToHexString(makeBuf, 0, makeBuf.Length);
|
||||
// //Console.WriteLine($"-> {hexString}");
|
||||
// //sp.Write(makeBuf, 0, makeBuf.Length);
|
||||
// int b = 0;
|
||||
// try
|
||||
// {
|
||||
// b = sp.Read(buffer2, 0, 255);
|
||||
// }
|
||||
// catch (TimeoutException)
|
||||
// {
|
||||
// Console.WriteLine("Read timeout");
|
||||
// }
|
||||
// if (b > 0)
|
||||
// {
|
||||
// hexString = Convert.ToHexString(buffer2, 0, b);
|
||||
// Console.WriteLine($"ok {b} bytes: {hexString}");
|
||||
|
||||
// }
|
||||
//} //-> "C0FFF907879994C1"
|
||||
|
||||
|
||||
sp.Close();
|
||||
|
||||
Console.ReadLine();
|
||||
|
||||
|
||||
|
||||
ReadOnlySpan<byte> MakeDiscover(Span<byte> discoverID)
|
||||
{
|
||||
return BuildPacket(64, discoverID , new byte[] { 0x00 });
|
||||
}
|
||||
|
||||
ReadOnlySpan<byte> MakeConnect(int syncbytes, ReadOnlySpan<byte> ID, ReadOnlySpan<byte> IDrest)
|
||||
{
|
||||
byte[] packet = new byte[1 + ID.Length + IDrest.Length];
|
||||
|
||||
packet[0] = 0x07; //connectcommnand
|
||||
ID.CopyTo(packet.AsSpan(1));
|
||||
IDrest.CopyTo(packet.AsSpan(1 + ID.Length));
|
||||
|
||||
return BuildPacket(syncbytes, ID, packet);
|
||||
}
|
||||
|
||||
ReadOnlySpan<byte> BuildPacket(int syncbytes, ReadOnlySpan<byte> ID, byte[] payload)
|
||||
{
|
||||
|
||||
ArrayBufferWriter<byte> writer = new ArrayBufferWriter<byte>();
|
||||
if (syncbytes > 0)
|
||||
{
|
||||
Span<byte> span = writer.GetSpan(syncbytes);
|
||||
span.Fill(0xFF);
|
||||
writer.Advance(syncbytes);
|
||||
}
|
||||
|
||||
writer.Write(new byte[] { 0xC0 }); // STX
|
||||
int startCS = writer.WrittenCount;
|
||||
if (ID!=ReadOnlySpan<byte>.Empty) writer.Write(ID);
|
||||
|
||||
// 3. Schrijf de dynamische payload
|
||||
writer.Write(payload);
|
||||
|
||||
// 4. Pak alle geschreven data, maar sla de eerste byte (index 0) over via Slice(1)
|
||||
ReadOnlySpan<byte> dataToChecksum = writer.WrittenSpan.Slice(startCS);
|
||||
|
||||
// Bereken de 16-bit checksum
|
||||
ushort checksum = Crc16IbmSdlc.ComputeChecksum(dataToChecksum);
|
||||
|
||||
// 5. Reserveer ruimte voor de staart: 2 bytes checksum + 1 finale byte = 3 bytes
|
||||
Span<byte> tailSpan = writer.GetSpan(3);
|
||||
|
||||
// Checksum wegschrijven in Little Endian (LSB eerst, dan MSB)
|
||||
tailSpan[0] = (byte)(checksum & 0xFF); // Least Significant Byte
|
||||
tailSpan[1] = (byte)((checksum >> 8) & 0xFF); // Most Significant Byte
|
||||
|
||||
// Finale byte toevoegen
|
||||
tailSpan[2] = 0xc1; // ETX (End of Text)
|
||||
|
||||
// Geef door aan de writer dat we exact 3 bytes hebben toegevoegd
|
||||
writer.Advance(3);
|
||||
|
||||
// 6. Return het resultaat (of stuur writer.WrittenSpan direct naar je Socket)
|
||||
return writer.WrittenSpan;
|
||||
}
|
||||
|
||||
byte[] MakeBuf(int synccount, string prefix, string id, string playloadrest, string suffix)
|
||||
{
|
||||
// Calculate lengths
|
||||
int prefixLen = prefix.Length / 2;
|
||||
int idLen = id.Length / 2;
|
||||
int payloadLen = playloadrest.Length / 2;
|
||||
int suffixLen = suffix.Length / 2;
|
||||
int chkLen = 2; // 2 bytes for the CRC16
|
||||
|
||||
int blen = synccount + chkLen + prefixLen + idLen + payloadLen + suffixLen;
|
||||
byte[] buf = new byte[blen];
|
||||
|
||||
// 1. Fill sync count bytes with 0xFF
|
||||
buf.AsSpan(0, synccount).Fill(0xFF);
|
||||
|
||||
int currentOffset = synccount;
|
||||
|
||||
Convert.FromHexString(prefix, buf.AsSpan(currentOffset), out _, out int written);
|
||||
currentOffset += written;
|
||||
int chkstart = currentOffset;
|
||||
|
||||
Convert.FromHexString(id, buf.AsSpan(currentOffset), out _, out int idWritten);
|
||||
currentOffset += idWritten;
|
||||
|
||||
Convert.FromHexString(playloadrest, buf.AsSpan(currentOffset), out _, out int payloadWritten);
|
||||
currentOffset += payloadWritten;
|
||||
|
||||
int chkOffset = currentOffset;
|
||||
int chkend = chkOffset - chkstart;
|
||||
currentOffset += 2;
|
||||
|
||||
Convert.FromHexString(suffix, buf.AsSpan(currentOffset), out _, out int suffixWritten);
|
||||
currentOffset += suffixWritten;
|
||||
|
||||
|
||||
UInt16 chk = (UInt16)Crc16IbmSdlc.ComputeChecksum(buf.AsSpan(chkstart, chkend));
|
||||
|
||||
BinaryPrimitives.WriteUInt16LittleEndian(buf.AsSpan(chkOffset, 2), chk);
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
#include "pch.h"
|
||||
|
||||
using namespace System;
|
||||
using namespace System::Reflection;
|
||||
using namespace System::Runtime::CompilerServices;
|
||||
using namespace System::Runtime::InteropServices;
|
||||
using namespace System::Security::Permissions;
|
||||
|
||||
[assembly:AssemblyTitleAttribute(L"LSWDevices")];
|
||||
[assembly:AssemblyDescriptionAttribute(L"")];
|
||||
[assembly:AssemblyConfigurationAttribute(L"")];
|
||||
[assembly:AssemblyCompanyAttribute(L"")];
|
||||
[assembly:AssemblyProductAttribute(L"LSWDevices")];
|
||||
[assembly:AssemblyCopyrightAttribute(L"Copyright (c) 2024")];
|
||||
[assembly:AssemblyTrademarkAttribute(L"")];
|
||||
[assembly:AssemblyCultureAttribute(L"")];
|
||||
|
||||
[assembly:AssemblyVersionAttribute(L"1.0.*")];
|
||||
|
||||
[assembly:ComVisible(false)];
|
||||
|
|
@ -1,169 +0,0 @@
|
|||
#pragma unmanaged
|
||||
#include "pch.h"
|
||||
#include "Device.h"
|
||||
|
||||
HDEVINFO hi;
|
||||
HDEVINFO DeviceInfoSet;
|
||||
int DeviceIndex;
|
||||
SP_DEVINFO_DATA DeviceInfoData;
|
||||
|
||||
TCHAR szDeviceInstanceID[MAX_DEVICE_ID_LEN];
|
||||
TCHAR szDesc[1024], szHardwareIDs[4096];
|
||||
|
||||
WCHAR BusReportedDeviceDesc[255];
|
||||
DWORD cbBusReportedDeviceDesc;
|
||||
WCHAR Device_Manufacturer[255];
|
||||
DWORD cbDevice_Manufacturer;
|
||||
WCHAR Device_FriendlyName[255];
|
||||
DWORD cbDevice_FriendlyName;
|
||||
WCHAR DeviceDisplay_Category[255];
|
||||
DWORD cbDeviceDisplay_Category;
|
||||
WCHAR Hardware_ID[255];
|
||||
DWORD cbHARDWAREID;
|
||||
WCHAR PortName[255];
|
||||
DWORD cbPortName;
|
||||
CHAR Device_Exclusive;
|
||||
DWORD cbDevice_Exclusive;
|
||||
|
||||
std::vector<const wchar_t* > filters;
|
||||
|
||||
|
||||
CONFIGRET eject(DEVINST dnDevInst)
|
||||
{
|
||||
TCHAR szVetoName[512];
|
||||
PNP_VETO_TYPE vt;
|
||||
CONFIGRET status =
|
||||
CM_Request_Device_EjectW(
|
||||
dnDevInst,
|
||||
&vt, szVetoName, 512, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static BOOL Reset(HDEVINFO hDevInfo, SP_DEVINFO_DATA* pDeviceInfoData)
|
||||
{
|
||||
DWORD err = 0;
|
||||
bool rv = true;
|
||||
//https://forums.codeguru.com/showthread.php?418183-Reset-USB-connection
|
||||
SP_CLASSINSTALL_HEADER classInstallParams;
|
||||
SP_PROPCHANGE_PARAMS propChangeParams;
|
||||
|
||||
classInstallParams.cbSize = sizeof(SP_CLASSINSTALL_HEADER);
|
||||
classInstallParams.InstallFunction = DIF_PROPERTYCHANGE;
|
||||
propChangeParams.ClassInstallHeader = classInstallParams;
|
||||
propChangeParams.StateChange = DICS_DISABLE; //DICS_PROPCHANGE
|
||||
propChangeParams.Scope = DICS_FLAG_GLOBAL;
|
||||
propChangeParams.HwProfile = 0;
|
||||
|
||||
if (SetupDiSetClassInstallParams(hDevInfo, pDeviceInfoData, (PSP_CLASSINSTALL_HEADER)&propChangeParams, sizeof(SP_PROPCHANGE_PARAMS)))
|
||||
{
|
||||
rv = SetupDiCallClassInstaller(DIF_PROPERTYCHANGE, hDevInfo, pDeviceInfoData);
|
||||
if (!rv) err = GetLastError();
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
BOOL DeviceScanStart(int type)
|
||||
{
|
||||
const GUID* gClass;
|
||||
filters.clear();
|
||||
switch (type)
|
||||
{
|
||||
case 1: gClass = &GUID_DEVCLASS_SMARTCARDREADER; break; //smartcard
|
||||
default: gClass = &GUID_DEVCLASS_PORTS; break;
|
||||
}
|
||||
DeviceInfoSet = SetupDiGetClassDevsExA( gClass, 0, nullptr, DIGCF_PRESENT, NULL, NULL, NULL);
|
||||
ZeroMemory(&DeviceInfoData, sizeof(SP_DEVINFO_DATA));
|
||||
DeviceInfoData.cbSize = sizeof(SP_DEVINFO_DATA);
|
||||
DeviceIndex = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
BOOL DeviceScanEnd()
|
||||
{
|
||||
SetupDiDestroyDeviceInfoList(DeviceInfoSet);
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
BOOL DeviceScan()
|
||||
{
|
||||
int rv = true; //1=found 2=end
|
||||
CONFIGRET status;
|
||||
DWORD dwSize, dwPropertyRegDataType;
|
||||
DEVPROPTYPE ulPropertyType;
|
||||
DWORD err;
|
||||
|
||||
//class __declspec(uuid(portGuid)) cRoot;
|
||||
//const GUID root = __uuidof(cRoot);
|
||||
//const static LPCTSTR arPrefix[3] = { TEXT("VID_"), TEXT("PID_"), TEXT("MI_") };
|
||||
//WCHAR szBuffer[4096];
|
||||
//GUID_DEVCLASS_PORTS
|
||||
|
||||
if (SetupDiEnumDeviceInfo(
|
||||
DeviceInfoSet,
|
||||
DeviceIndex,
|
||||
&DeviceInfoData))
|
||||
{
|
||||
szDesc[0] = 0;
|
||||
status = CM_Get_Device_ID(DeviceInfoData.DevInst, szDeviceInstanceID, MAX_DEVICE_ID_LEN, 0);
|
||||
if (status != CR_SUCCESS)
|
||||
return false;
|
||||
|
||||
if (SetupDiGetDeviceRegistryProperty(DeviceInfoSet, &DeviceInfoData, SPDRP_HARDWAREID, &ulPropertyType, (BYTE*)Hardware_ID, sizeof(Hardware_ID), &cbHARDWAREID)) {};
|
||||
if (filters.size() > 0) {
|
||||
rv = 0;
|
||||
int filterIdx = 1; //vanaf 1
|
||||
for (LPCTSTR f : filters) {
|
||||
if (!_tcsncmp(Hardware_ID, f, _tcslen(f))) {
|
||||
rv = filterIdx;
|
||||
break;
|
||||
}
|
||||
filterIdx++;
|
||||
}
|
||||
}
|
||||
else
|
||||
rv = 0;
|
||||
|
||||
|
||||
if (SetupDiGetDeviceRegistryProperty(DeviceInfoSet, &DeviceInfoData, SPDRP_DEVICEDESC, &dwPropertyRegDataType, (BYTE*)szDesc, sizeof(szDesc), &dwSize)) {}
|
||||
|
||||
if (SetupDiGetDevicePropertyW(DeviceInfoSet, &DeviceInfoData, &DEVPKEY_Device_BusReportedDeviceDesc, &ulPropertyType, (BYTE*)BusReportedDeviceDesc, sizeof(BusReportedDeviceDesc), &cbBusReportedDeviceDesc, 0)) {};
|
||||
if (SetupDiGetDevicePropertyW(DeviceInfoSet, &DeviceInfoData, &DEVPKEY_Device_Manufacturer, &ulPropertyType, (BYTE*)Device_Manufacturer, sizeof(Device_Manufacturer), &cbDevice_Manufacturer, 0)) {};
|
||||
if (SetupDiGetDevicePropertyW(DeviceInfoSet, &DeviceInfoData, &DEVPKEY_Device_FriendlyName, &ulPropertyType, (BYTE*)Device_FriendlyName, sizeof(Device_FriendlyName), &cbDevice_FriendlyName, 0)) {
|
||||
int s = 0;
|
||||
};
|
||||
//if (SetupDiGetDevicePropertyW(DeviceInfoSet, &DeviceInfoData, &DEVPKEY_Device_LocationInfo,&ulPropertyType, (BYTE*)szBuffer, sizeof(szBuffer), &dwSize, 0)) {};
|
||||
//if (SetupDiGetDevicePropertyW(DeviceInfoSet, &DeviceInfoData, &DEVPKEY_Device_SecuritySDS,&ulPropertyType, (BYTE*)szBuffer, sizeof(szBuffer), &dwSize, 0)) {};
|
||||
// // (http://msdn.microsoft.com/en-us/library/windows/desktop/aa379567(v=vs.85).aspx)
|
||||
//if (SetupDiGetDevicePropertyW(DeviceInfoSet, &DeviceInfoData, &DEVPKEY_Device_ContainerId,&ulPropertyType, (BYTE*)szDesc, sizeof(szDesc), &dwSize, 0)) {
|
||||
// StringFromGUID2((REFGUID)szDesc, szBuffer, ARRAY_SIZE(szBuffer));
|
||||
//}
|
||||
if (SetupDiGetDevicePropertyW(DeviceInfoSet, &DeviceInfoData, &DEVPKEY_DeviceDisplay_Category, &ulPropertyType, (BYTE*)DeviceDisplay_Category, sizeof(DeviceDisplay_Category), &cbDeviceDisplay_Category, 0))
|
||||
{
|
||||
err = 0;
|
||||
}
|
||||
else {
|
||||
err = GetLastError();
|
||||
DeviceDisplay_Category[0] = 0;
|
||||
}
|
||||
|
||||
if (SetupDiGetDevicePropertyW(DeviceInfoSet, &DeviceInfoData, &DEVPKEY_Device_Exclusive, &ulPropertyType, (BYTE*)&Device_Exclusive, sizeof(Device_Exclusive), &cbDevice_Exclusive, 0))
|
||||
{
|
||||
LSTATUS s = 0;
|
||||
};
|
||||
|
||||
|
||||
HKEY hkey = SetupDiOpenDevRegKey(DeviceInfoSet, &DeviceInfoData, DICS_FLAG_GLOBAL, 0, DIREG_DEV, KEY_QUERY_VALUE | KEY_READ | KEY_ENUMERATE_SUB_KEYS);
|
||||
if (hkey != INVALID_HANDLE_VALUE) {
|
||||
LSTATUS s = 0;
|
||||
cbPortName = sizeof(PortName);
|
||||
s = RegGetValueW(hkey, 0, L"PortName", RRF_RT_REG_SZ, nullptr, (PVOID)PortName, &cbPortName);
|
||||
RegCloseKey(hkey);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else rv = -1; //error
|
||||
return rv;
|
||||
}
|
||||
|
|
@ -1,76 +0,0 @@
|
|||
#pragma once
|
||||
#pragma unmanaged
|
||||
#define INITGUID
|
||||
|
||||
#include <Windows.h>
|
||||
#include <devguid.h> // for GUID_DEVCLASS_CDROM etc
|
||||
#include <setupapi.h>
|
||||
#include <cfgmgr32.h> // for MAX_DEVICE_ID_LEN, CM_Get_Parent and CM_Get_Device_ID
|
||||
#include <Devpkey.h>
|
||||
#include <vector>
|
||||
#pragma comment (lib, "Setupapi.lib")
|
||||
#pragma comment (lib, "Advapi32.lib")
|
||||
//#include <iostream>
|
||||
#include <tchar.h>
|
||||
|
||||
#define ARRAY_SIZE(arr) (sizeof(arr)/sizeof(arr[0]))
|
||||
#define CLS "USB\\VID_0EBB&PID_0340&MI_00"
|
||||
#define CLS2 0
|
||||
#define devstr "USB\\VID_0EBB&PID_0340&MI_00\\7&8520AE7&5&0000"
|
||||
#define portGuid "4d36e978-e325-11ce-bfc1-08002be10318"
|
||||
#define USBGuid "88BAE032-5A81-49f0-BC3D-A4FF138216D"
|
||||
|
||||
//// include DEVPKEY_Device_BusReportedDeviceDesc from WinDDK\7600.16385.1\inc\api\devpropdef.h
|
||||
//#ifdef DEFINE_DEVPROPKEY
|
||||
//#undef DEFINE_DEVPROPKEY
|
||||
//#endif
|
||||
//#ifdef INITGUID
|
||||
//#define DEFINE_DEVPROPKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) EXTERN_C const DEVPROPKEY DECLSPEC_SELECTANY name = { { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }, pid }
|
||||
//#else
|
||||
//#define DEFINE_DEVPROPKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) EXTERN_C const DEVPROPKEY name
|
||||
//#endif // INITGUID
|
||||
//
|
||||
//// include DEVPKEY_Device_BusReportedDeviceDesc from WinDDK\7600.16385.1\inc\api\devpkey.h
|
||||
//DEFINE_DEVPROPKEY(DEVPKEY_Device_BusReportedDeviceDesc, 0x540b947e, 0x8b40, 0x45bc, 0xa8, 0xa2, 0x6a, 0x0b, 0x89, 0x4c, 0xbd, 0xa2, 4); // DEVPROP_TYPE_STRING
|
||||
//DEFINE_DEVPROPKEY(DEVPKEY_Device_ContainerId, 0x8c7ed206, 0x3f8a, 0x4827, 0xb3, 0xab, 0xae, 0x9e, 0x1f, 0xae, 0xfc, 0x6c, 2); // DEVPROP_TYPE_GUID
|
||||
//DEFINE_DEVPROPKEY(DEVPKEY_Device_FriendlyName, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 14); // DEVPROP_TYPE_STRING
|
||||
//DEFINE_DEVPROPKEY(DEVPKEY_DeviceDisplay_Category, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x5a); // DEVPROP_TYPE_STRING_LIST
|
||||
//DEFINE_DEVPROPKEY(DEVPKEY_Device_LocationInfo, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 15); // DEVPROP_TYPE_STRING
|
||||
//DEFINE_DEVPROPKEY(DEVPKEY_Device_Manufacturer, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 13); // DEVPROP_TYPE_STRING
|
||||
//DEFINE_DEVPROPKEY(DEVPKEY_Device_SecuritySDS, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 26); // DEVPROP_TYPE_SECURITY_DESCRIPTOR_STRING
|
||||
//DEFINE_DEVPROPKEY(DEVPKEY_Device_UINumberDescFormat, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 31); // DEVPROP_TYPE_STRING
|
||||
|
||||
typedef BOOL(WINAPI* fn_SetupDiGetDevicePropertyW)(
|
||||
__in HDEVINFO DeviceInfoSet,
|
||||
__in PSP_DEVINFO_DATA DeviceInfoData,
|
||||
__in const DEVPROPKEY* PropertyKey,
|
||||
__out DEVPROPTYPE* PropertyType,
|
||||
__out_opt PBYTE PropertyBuffer,
|
||||
__in DWORD PropertyBufferSize,
|
||||
__out_opt PDWORD RequiredSize,
|
||||
__in DWORD Flags
|
||||
);
|
||||
|
||||
|
||||
|
||||
extern TCHAR szDeviceInstanceID[MAX_DEVICE_ID_LEN];
|
||||
extern WCHAR BusReportedDeviceDesc[255];
|
||||
extern WCHAR Device_Manufacturer[255];
|
||||
extern WCHAR Device_FriendlyName[255];
|
||||
extern WCHAR DeviceDisplay_Category[255];
|
||||
extern WCHAR Hardware_ID[255];
|
||||
extern WCHAR PortName[255];
|
||||
extern CHAR Device_Exclusive;
|
||||
|
||||
extern int DeviceIndex;
|
||||
extern std::vector<const wchar_t* > filters;
|
||||
|
||||
inline static void cAddFilter(const wchar_t* filter)
|
||||
{
|
||||
const wchar_t* x = _wcsdup(filter);
|
||||
filters.push_back(x);
|
||||
}
|
||||
static BOOL Reset(HDEVINFO hDevInfo, SP_DEVINFO_DATA* pDeviceInfoData);
|
||||
BOOL DeviceScanEnd();
|
||||
BOOL DeviceScanStart(int type);
|
||||
BOOL DeviceScan();
|
||||
|
|
@ -1,129 +0,0 @@
|
|||
#include "pch.h"
|
||||
|
||||
#include "Device.h"
|
||||
#include "LSWDevices.h"
|
||||
#include <vcclr.h>
|
||||
|
||||
|
||||
|
||||
LSWDevices::cLSWDevice::cLSWDevice()
|
||||
{
|
||||
}
|
||||
|
||||
LSWDevices::cLSWDevice::~cLSWDevice()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
LSWDevices::cLSWDevices::cLSWDevices()
|
||||
{
|
||||
DeviceList = gcnew System::Collections::Generic::List<LSWDevices::cLSWDevice^>();
|
||||
}
|
||||
|
||||
LSWDevices::cLSWDevices::~cLSWDevices()
|
||||
{
|
||||
//DeviceList->Clear();
|
||||
}
|
||||
|
||||
void LSWDevices::cLSWDevices::AddFilter(System::Collections::Generic::List<System::String^>^ Filter)
|
||||
{
|
||||
for each (String^ var in Filter)
|
||||
{
|
||||
pin_ptr<const wchar_t> wch = PtrToStringChars(var);
|
||||
cAddFilter( const_cast<wchar_t*>(wch) );
|
||||
}
|
||||
}
|
||||
|
||||
void LSWDevices::cLSWDevices::Scan(int type, System::Collections::Generic::List<System::String^>^ Filter)
|
||||
{
|
||||
int maxFilter = 0;
|
||||
DevicesFound = nullptr;
|
||||
DeviceScanStart(type);
|
||||
if (Filter != nullptr) {
|
||||
maxFilter = Filter->Count;
|
||||
AddFilter(Filter);
|
||||
DevicesFound = gcnew System::Collections::Generic::Dictionary<Int32, cLSWDevice^>(maxFilter) ;
|
||||
}
|
||||
int i = DeviceIndex;
|
||||
int rv = DeviceScan();
|
||||
int minrv = 0; if (Filter != nullptr && Filter->Count > 0) minrv = 1;
|
||||
while (rv >=0) {
|
||||
if (rv >= minrv) {
|
||||
cLSWDevice^ d = gcnew cLSWDevice();
|
||||
d->DeviceInstanceID = gcnew System::String(szDeviceInstanceID);
|
||||
d->Device_FriendlyName = gcnew System::String(Device_FriendlyName);
|
||||
d->BusReportedDeviceDesc = gcnew System::String(BusReportedDeviceDesc);
|
||||
d->Device_Manufacturer = gcnew System::String(Device_Manufacturer);
|
||||
d->DeviceDisplay_Category = gcnew System::String(DeviceDisplay_Category);
|
||||
d->Hardware_ID = gcnew System::String(Hardware_ID);
|
||||
d->PortName = gcnew System::String(PortName);
|
||||
d->Firmware = GetFirmware();
|
||||
DeviceList->Add(d);
|
||||
if (rv > 0 && rv<= maxFilter && DevicesFound->Count<maxFilter && !DevicesFound->ContainsKey(rv-1)) DevicesFound->Add(rv-1, d);
|
||||
}
|
||||
++DeviceIndex;
|
||||
rv = DeviceScan();
|
||||
}
|
||||
DeviceScanEnd();
|
||||
}
|
||||
|
||||
String^ LSWDevices::cLSWDevices::GetFirmware()
|
||||
{
|
||||
String^ result = nullptr;
|
||||
wchar_t* firmware = nullptr;
|
||||
if (!_tcsncmp(BusReportedDeviceDesc, TEXT("TWN"), 3)) {
|
||||
wchar_t* e = BusReportedDeviceDesc + _tcslen(BusReportedDeviceDesc);
|
||||
wchar_t* x = wcsrchr(BusReportedDeviceDesc, (wchar_t)'/');
|
||||
if (x != nullptr) {
|
||||
firmware = _tcsdup(x + 1);
|
||||
result= gcnew System::String(firmware);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
int LSWDevices::cLSWDevices::GetComPortElatec(String^% ElatecPort, String^% ElatecFirmware)
|
||||
{
|
||||
//LSWDevices.LSWDevices a;
|
||||
String^ comport = nullptr;
|
||||
System::Collections::Generic::List<System::String^>^ f = gcnew System::Collections::Generic::List<String^>();
|
||||
f->Add(fElatec);
|
||||
cLSWDevices^ cDev = gcnew cLSWDevices();
|
||||
cDev->Scan(0, f);
|
||||
if (cDev->DevicesFound->Count == 1)
|
||||
{
|
||||
ElatecPort = cDev->DevicesFound[0]->PortName;
|
||||
ElatecFirmware = cDev->DevicesFound[0]->Firmware;
|
||||
}
|
||||
cDev->~cLSWDevices();
|
||||
|
||||
return cDev->DevicesFound->Count;
|
||||
}
|
||||
|
||||
int LSWDevices::cLSWDevices::GetComPortEdosElatec(String^ %eDosPort, String^ %ElatecPort, String^% ElatecFirmware)
|
||||
{
|
||||
int r = 0;
|
||||
String^ comport = nullptr;
|
||||
System::Collections::Generic::List<System::String^>^ f = gcnew System::Collections::Generic::List<String^>();
|
||||
f->Add(fEdos);
|
||||
f->Add(fElatec);
|
||||
cLSWDevices^ cDev = gcnew cLSWDevices();
|
||||
cDev->Scan(0, f);
|
||||
|
||||
r = cDev->DevicesFound->Count;
|
||||
if (cDev->DevicesFound->Count == 2)
|
||||
{
|
||||
eDosPort = cDev->DevicesFound[0]->PortName;
|
||||
ElatecPort = cDev->DevicesFound[1]->PortName;
|
||||
ElatecFirmware = cDev->DevicesFound[1]->Firmware;
|
||||
|
||||
}
|
||||
else {
|
||||
eDosPort = nullptr;
|
||||
ElatecPort = nullptr;
|
||||
}
|
||||
|
||||
cDev->~cLSWDevices();
|
||||
|
||||
return r;
|
||||
}
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#pragma managed
|
||||
using namespace System;
|
||||
using namespace System::Runtime::InteropServices;
|
||||
|
||||
namespace LSWDevices {
|
||||
|
||||
|
||||
|
||||
public ref class cLSWDevice
|
||||
{
|
||||
public:
|
||||
String^ DeviceInstanceID;
|
||||
String^ BusReportedDeviceDesc;
|
||||
String^ Device_Manufacturer;
|
||||
String^ Device_FriendlyName;
|
||||
String^ DeviceDisplay_Category;
|
||||
String^ Hardware_ID;
|
||||
String^ PortName;
|
||||
String^ Firmware;
|
||||
|
||||
cLSWDevice();
|
||||
~cLSWDevice();
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
public ref class cLSWDevices
|
||||
{
|
||||
public:
|
||||
literal String^ fElatec = "USB\\VID_09D8&PID_0420";
|
||||
literal String^ fEdos = "USB\\VID_0EBB&PID_0340";
|
||||
|
||||
System::Collections::Generic::List<LSWDevices::cLSWDevice^>^ DeviceList;
|
||||
System::Collections::Generic::Dictionary<Int32, cLSWDevice^>^ DevicesFound;
|
||||
cLSWDevices();
|
||||
~cLSWDevices();
|
||||
void AddFilter(System::Collections::Generic::List<System::String^>^ Filter);
|
||||
void Scan(int type, System::Collections::Generic::List<System::String^>^ Filter);
|
||||
static int GetComPortElatec([Out] String^% ElatecPort, [Out] String^% ElatecFirmware);
|
||||
static int GetComPortEdosElatec( [Out] String^% eDosPort, [Out] String^% ElatecPort, [Out] String^% ElatecFirmware );
|
||||
|
||||
private:
|
||||
String^ GetFirmware();
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,153 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>17.0</VCProjectVersion>
|
||||
<ProjectGuid>{DD7E3ADD-D2DF-4755-80F3-853C49809CE6}</ProjectGuid>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<Keyword>ManagedCProj</Keyword>
|
||||
<RootNamespace>LSWDevices</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CLRSupport>true</CLRSupport>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CLRSupport>true</CLRSupport>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CLRSupport>true</CLRSupport>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CLRSupport>true</CLRSupport>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup />
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies />
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies />
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies />
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies />
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Device.h" />
|
||||
<ClInclude Include="LSWDevices.h" />
|
||||
<ClInclude Include="pch.h" />
|
||||
<ClInclude Include="Resource.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="AssemblyInfo.cpp" />
|
||||
<ClCompile Include="Device.cpp" />
|
||||
<ClCompile Include="LSWDevices.cpp" />
|
||||
<ClCompile Include="pch.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="app.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="app.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="LSWDevices.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Resource.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="pch.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Device.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="LSWDevices.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="AssemblyInfo.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="pch.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Device.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="app.rc">
|
||||
<Filter>Resource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="app.ico">
|
||||
<Filter>Resource Files</Filter>
|
||||
</Image>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by app.rc
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 40 KiB |
Binary file not shown.
|
|
@ -1,5 +0,0 @@
|
|||
// pch.cpp: source file corresponding to the pre-compiled header
|
||||
|
||||
#include "pch.h"
|
||||
|
||||
// When you are using pre-compiled headers, this source file is necessary for compilation to succeed.
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
// pch.h: This is a precompiled header file.
|
||||
// Files listed below are compiled only once, improving build performance for future builds.
|
||||
// This also affects IntelliSense performance, including code completion and many code browsing features.
|
||||
// However, files listed here are ALL re-compiled if any one of them is updated between builds.
|
||||
// Do not add files here that you will be updating frequently as this negates the performance advantage.
|
||||
|
||||
#ifndef PCH_H
|
||||
#define PCH_H
|
||||
|
||||
// add headers that you want to pre-compile here
|
||||
|
||||
#endif //PCH_H
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
||||
<Product Id="*" Name="TestSched" Language="1033" Version="1.0.0.0" Manufacturer="LSW" UpgradeCode="61436dd3-dc9f-498e-bffa-403d8ed6b0ba">
|
||||
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
|
||||
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
|
||||
<MediaTemplate />
|
||||
<Feature Id="ProductFeature" Title="SetupProjectTestSched" Level="1">
|
||||
<ComponentGroupRef Id="ProductComponents" />
|
||||
</Feature>
|
||||
</Product>
|
||||
|
||||
<Fragment>
|
||||
<Directory Id="TARGETDIR" Name="SourceDir">
|
||||
<Directory Id="ProgramFilesFolder">
|
||||
<Directory Id="INSTALLFOLDER" Name="SetupProjectTestSched" />
|
||||
</Directory>
|
||||
</Directory>
|
||||
</Fragment>
|
||||
|
||||
<Fragment>
|
||||
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
|
||||
<!-- TODO: Remove the comments around this Component element and the ComponentRef below in order to add resources to this installer. -->
|
||||
<!-- <Component Id="ProductComponent"> -->
|
||||
<!-- TODO: Insert files, registry keys, and other resources here. -->
|
||||
<!-- </Component> -->
|
||||
</ComponentGroup>
|
||||
</Fragment>
|
||||
|
||||
<Fragment>
|
||||
<CustomAction Id="CreateScheduledTask" Return="check" Directory="eDosSyncFolder" Execute="deferred" Impersonate="no" ExeCommand=""[SystemFolder]SCHTASKS.EXE" /CREATE /TN "EDos Sync" /RU "eDosStation"/RP "Infopla+8" " />
|
||||
<CustomAction Id="DeleteScheduledTask" Return="check" Directory="eDosSyncFolder" Execute="deferred" Impersonate="no" ExeCommand=""[SystemFolder]SCHTASKS.EXE" /DELETE /TN "EDos Sync" /F" />
|
||||
|
||||
<InstallExecuteSequence>
|
||||
<Custom Action="CreateScheduledTask" After="InstallFiles" />
|
||||
<Custom Action="DeleteScheduledTask" Before="RemoveFiles" />
|
||||
</InstallExecuteSequence>
|
||||
|
||||
|
||||
</Fragment>
|
||||
|
||||
</Wix>
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" InitialTargets="EnsureWixToolsetInstalled" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<ProductVersion>3.10</ProductVersion>
|
||||
<ProjectGuid>bcf97910-cf22-486a-8d27-0a685fe83e4e</ProjectGuid>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<OutputName>SetupProjectTestSched</OutputName>
|
||||
<OutputType>Package</OutputType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<OutputPath>bin\$(Configuration)\</OutputPath>
|
||||
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
|
||||
<DefineConstants>Debug</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<OutputPath>bin\$(Configuration)\</OutputPath>
|
||||
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Product.wxs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != '' " />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets" Condition=" '$(WixTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets') " />
|
||||
<Target Name="EnsureWixToolsetInstalled" Condition=" '$(WixTargetsImported)' != 'true' ">
|
||||
<Error Text="The WiX Toolset v3.11 (or newer) build tools must be installed to build this project. To download the WiX Toolset, see http://wixtoolset.org/releases/" />
|
||||
</Target>
|
||||
<!--
|
||||
To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Wix.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
|
||||
</startup>
|
||||
</configuration>
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml;
|
||||
|
||||
namespace TestLSWDevice
|
||||
{
|
||||
internal class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
|
||||
// : (Standard port types) : ACPI\VEN_PNP&DEV_0501
|
||||
// STM32 Virtual COM Port : Microsoft : USB\VID_0483&PID_5740&REV_0400
|
||||
// TWN4/B1.08/NCF4.80/BMKR3.72 : Elatec : USB\VID_09D8&PID_0420&REV_0200
|
||||
// Desktop Reader : Thermo Fisher Scientific : USB\VID_0EBB&PID_0340&REV_0101&MI_00
|
||||
// Desktop Reader : Lantronix : *cprdevice
|
||||
|
||||
// YubiKey OTP+FIDO+CCID : Microsoft : USB\VID_1050&PID_0407&REV_0512&MI_02
|
||||
// ACR39U ICC Reader : Advanced Card Systems Ltd. : USB\VID_072F&PID_B100&REV_3009
|
||||
// Smart Card Reader USB : HID Global : USB\VID_076B&PID_5340&REV_0531
|
||||
|
||||
LSWDevices.cLSWDevices x = new LSWDevices.cLSWDevices();
|
||||
System.Collections.Generic.List<string> filters = new List<string>() { LSWDevices.cLSWDevices.fEdos, LSWDevices.cLSWDevices.fElatec };
|
||||
//System.Collections.Generic.List<string> filters = null;
|
||||
|
||||
x.Scan(0,filters);
|
||||
foreach (var d in x.DeviceList)
|
||||
{
|
||||
System.Diagnostics.Debug.WriteLine($"// {d.BusReportedDeviceDesc} : {d.Device_Manufacturer} : {d.Hardware_ID} ");
|
||||
}
|
||||
System.Diagnostics.Debug.WriteLine($"cnt={x.DeviceList.Count}");
|
||||
|
||||
for (int ix = 0; ix < filters.Count; ++ix)
|
||||
{
|
||||
System.Diagnostics.Debug.WriteLine($"{ix}: filter={filters[ix]} {x.DevicesFound[ix].Device_Manufacturer} {x.DevicesFound[ix].PortName}");
|
||||
}
|
||||
System.Diagnostics.Debug.WriteLine($"cnt={x.DevicesFound.Count}");
|
||||
|
||||
string edos , elatec, elatecfirmware;
|
||||
int r = LSWDevices.cLSWDevices.GetComPortEdosElatec( out edos, out elatec, out elatecfirmware);
|
||||
|
||||
|
||||
x.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("TestLSWDevice")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("TestLSWDevice")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2024")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("d8543650-6a65-4dbf-a389-c55b7745d0e8")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
|
|
@ -1,82 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<EnableUnmanagedDebugging>true</EnableUnmanagedDebugging>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{D8543650-6A65-4DBF-A389-C55B7745D0E8}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>TestLSWDevice</RootNamespace>
|
||||
<AssemblyName>TestLSWDevice</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include=".NETFramework,Version=v4.8">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Microsoft .NET Framework 4.8 %28x86 and x64%29</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
#ifndef common_epd_types_h
|
||||
#define common_epd_types_h
|
||||
enum class EpdGeneration
|
||||
{
|
||||
None,
|
||||
Mk2,
|
||||
Mk3
|
||||
};
|
||||
enum class EpdTypes : uint8_t
|
||||
{
|
||||
Mk2BetaGamma = 0,
|
||||
Mk2Neutron = 3,
|
||||
Mk3BetaGamma = 4,
|
||||
Mk3Neutron = 7,
|
||||
Mk2Gamma = 16,
|
||||
Mk3Gamma = 20
|
||||
};
|
||||
#pragma pack (push)
|
||||
#pragma pack (1)
|
||||
struct DiscoveryId
|
||||
{
|
||||
uint32_t Id;
|
||||
EpdGeneration Gen;
|
||||
uint32_t MaxBaud;
|
||||
bool operator==(const DiscoveryId &other) const
|
||||
{
|
||||
return (Id == other.Id) && (Gen == other.Gen);
|
||||
}
|
||||
bool operator !=(const DiscoveryId &other) const
|
||||
{
|
||||
return !(*this == other);
|
||||
}
|
||||
} ;
|
||||
typedef struct
|
||||
{
|
||||
uint16_t Address;
|
||||
uint8_t Length;
|
||||
} MemoryBlockDetails;
|
||||
typedef struct
|
||||
{
|
||||
MemoryBlockDetails BlockDetail;
|
||||
uint8_t Data[UINT8_MAX];
|
||||
} MemoryData;
|
||||
#pragma pack (pop)
|
||||
#endif
|
||||
|
|
@ -1,73 +0,0 @@
|
|||
#ifndef epd2_h
|
||||
#define epd2_h
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name : Reader3.DLL
|
||||
*
|
||||
* File Name : Epd3.h
|
||||
*
|
||||
* File Description : Public API For EPD MK3 Communication
|
||||
*
|
||||
* Authors: : T Banahan
|
||||
*
|
||||
******************************************************************************
|
||||
*
|
||||
* This is an unpublished work, the copyright of which vests in Thermo
|
||||
* Fisher Scientific. All rights reserved.
|
||||
*
|
||||
* The information contained herein is the property of Thermo Fisher
|
||||
* Scientific and is supplied without liability for errors or ommissions
|
||||
* and no part may be reproduced, used or disclosed except as authorised
|
||||
* by contract or other written permission. The copyright and the foregoing
|
||||
* restriction on reproduction, use and disclosure extends to all the media
|
||||
* in which this information may be embodied.
|
||||
*
|
||||
******************************************************************************/
|
||||
#ifndef WINAPI
|
||||
#define WINAPI __stdcall
|
||||
#endif
|
||||
#ifdef READER3_EXPORTS
|
||||
#define EPDDLL_API __declspec(dllexport) WINAPI
|
||||
#else
|
||||
#define EPDDLL_API __declspec(dllimport) WINAPI
|
||||
#endif
|
||||
#include <stdint.h>
|
||||
extern "C"
|
||||
{
|
||||
/********************************************************************************************************************************************
|
||||
*
|
||||
* Telemetry
|
||||
*
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginReadTelemetryMode_R2(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadTelemetryMode_R2(CommsHandle hComms, CompletionToken token, uint8_t *mode);
|
||||
CompletionToken EPDDLL_API BeginWriteTelemetryMode_R2(CommsHandle hComms, uint8_t mode, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteTelemetryMode_R2(CommsHandle hComms, CompletionToken token);
|
||||
/********************************************************************************************************************************************
|
||||
*
|
||||
* Calibration data
|
||||
*
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginReadCalibrationData_R2(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadCalibrationData_R2(CommsHandle hComms, CompletionToken token,
|
||||
uint16_t * HGSens10, uint16_t * SGSens10, uint16_t * HGSens07, uint16_t * SGSens07,
|
||||
uint16_t * FBSens07, uint16_t * BCSens07,
|
||||
uint16_t * SGthresh, uint16_t * BCthresh,
|
||||
uint16_t * FBthresh, uint16_t * HGthresh);
|
||||
CompletionToken EPDDLL_API BeginWriteDetectorThresholds_R2(CommsHandle hComms, CompletionCallback callback,
|
||||
uint16_t SGthresh, uint16_t BCthresh,
|
||||
uint16_t FBthresh, uint16_t HGthresh);
|
||||
int32_t EPDDLL_API EndWriteDetectorThresholds_R2(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginWriteSensitivities_R2(CommsHandle hComms, CompletionCallback callback,
|
||||
uint16_t HGSens10, uint16_t SGSens10, uint16_t HGSens07, uint16_t SGSens07,
|
||||
uint16_t FBSens07, uint16_t BCSens07);
|
||||
int32_t EPDDLL_API EndWriteSensitivities_R2(CommsHandle hComms, CompletionToken token);
|
||||
/********************************************************************************************************************************************
|
||||
*
|
||||
* Manufacturer Login
|
||||
*
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginMfrLogin_R2(CommsHandle hComms, uint32_t password, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndMfrLogin_R2(CommsHandle hComms, CompletionToken token);
|
||||
}
|
||||
#endif
|
||||
433
TestMK3/Epd3.h
433
TestMK3/Epd3.h
|
|
@ -1,433 +0,0 @@
|
|||
#ifndef epd3_h
|
||||
#define epd3_h
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name : Reader3.DLL
|
||||
*
|
||||
* File Name : Epd3.h
|
||||
*
|
||||
* File Description : Public API For EPD MK3 Communication
|
||||
*
|
||||
* Authors: : P Beeson
|
||||
*
|
||||
******************************************************************************
|
||||
*
|
||||
* This is an unpublished work, the copyright of which vests in Thermo
|
||||
* Fisher Scientific. All rights reserved.
|
||||
*
|
||||
* The information contained herein is the property of Thermo Fisher
|
||||
* Scientific and is supplied without liability for errors or ommissions
|
||||
* and no part may be reproduced, used or disclosed except as authorised
|
||||
* by contract or other written permission. The copyright and the foregoing
|
||||
* restriction on reproduction, use and disclosure extends to all the media
|
||||
* in which this information may be embodied.
|
||||
*
|
||||
******************************************************************************/
|
||||
#ifndef WINAPI
|
||||
#define WINAPI __stdcall
|
||||
#endif
|
||||
#ifdef READER3_EXPORTS
|
||||
#define EPDDLL_API __declspec(dllexport) WINAPI
|
||||
#else
|
||||
#define EPDDLL_API __declspec(dllimport) WINAPI
|
||||
#endif
|
||||
#include <stdint.h>
|
||||
#include "Mk3Types.h"
|
||||
extern "C"
|
||||
{
|
||||
/********************************************************************************************************************************************
|
||||
*
|
||||
* MK3 Specific Event Log
|
||||
*
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginWriteEventLogLevel_R3(CommsHandle hComms, uint8_t level, CompletionCallback callback = nullptr);
|
||||
int32_t EPDDLL_API EndWriteEventLogLevel_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadEventLogLevel_R3(CommsHandle hComms, CompletionCallback callback = nullptr);
|
||||
int32_t EPDDLL_API EndReadEventLogLevel_R3(CommsHandle hComms, CompletionToken token, uint8_t* level);
|
||||
/********************************************************************************************************************************************
|
||||
* MK3 Specific Counts Acquisition
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginReadFlashTestCounts_R3(CommsHandle hComms, uint8_t counterIds[], uint8_t length, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadFlashTestCounts_R3(CommsHandle hComms, CompletionToken token, Counter_t counts[], uint8_t length, uint8_t * numCounts, uint32_t * utc);
|
||||
/********************************************************************************************************************************************
|
||||
*
|
||||
* Triggered Dose
|
||||
*
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginReadTriggeredDoses_R3(CommsHandle hComms, uint8_t ids[], uint8_t length, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadTriggeredDoses_R3(CommsHandle hComms, CompletionToken token, MeasValue_t doses[], uint8_t length, uint8_t * numDoses, uint32_t * utc);
|
||||
CompletionToken EPDDLL_API BeginWriteTriggeredDoses_R3(CommsHandle hComms, MeasValue_t doses[], uint8_t length, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteTriggeredDoses_R3(CommsHandle hComms, CompletionToken token);
|
||||
/********************************************************************************************************************************************
|
||||
*
|
||||
* Real Time Clock
|
||||
*
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginWriteRTC_R3(CommsHandle hComms, uint32_t rtc, CompletionCallback callback = nullptr);
|
||||
int32_t EPDDLL_API EndWriteRTC_R3(CommsHandle hComms, CompletionToken token);
|
||||
/********************************************************************************************************************************************
|
||||
*
|
||||
* MK3 Specific Calibration
|
||||
*
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginReadDetectorThresholds_R3(CommsHandle hComms, uint8_t counterIds[], uint8_t length, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadDetectorThresholds_R3(CommsHandle hComms, CompletionToken token, DetectorThreshold_t thresholds[], uint8_t length, uint8_t * numThresholds);
|
||||
CompletionToken EPDDLL_API BeginWriteDetectorThresholds_R3(CommsHandle hComms, DetectorThreshold_t thresholds[], uint8_t length, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteDetectorThresholds_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadSensitivities_R3(CommsHandle hComms, uint8_t sensIds[], uint8_t length, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadSensitivities_R3(CommsHandle hComms, CompletionToken token, CalSensitivity_t sensitivities[], uint8_t length, uint8_t * numSensitivities);
|
||||
CompletionToken EPDDLL_API BeginWriteSensitivities_R3(CommsHandle hComms, CalSensitivity_t sensitivities[], uint8_t length, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteSensitivities_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadGains_R3(CommsHandle hComms, uint8_t sensIds[], uint8_t length, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadGains_R3(CommsHandle hComms, CompletionToken token, CalGain_t gains[], uint8_t length, uint8_t * numGains);
|
||||
CompletionToken EPDDLL_API BeginWriteGains_R3(CommsHandle hComms, CalGain_t gains[], uint8_t length, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteGains_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginWriteNotCalibratedFlag_R3(CommsHandle hComms, uint8_t notCalibrated, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteNotCalibratedFlag_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginWriteGainableFlag_R3(CommsHandle hComms, uint8_t gainable, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteGainableFlag_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginWriteLastCalibrationProcess_R3(CommsHandle hComms, CalProcess_t process, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteLastCalibrationProcess_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadLastCalibrationProcess_R3(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadLastCalibrationProcess_R3(CommsHandle hComms, CompletionToken token, CalProcess_t * process);
|
||||
CompletionToken EPDDLL_API BeginWriteCalibrationFacility_R3(CommsHandle hComms, CalFacility_t facility, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteCalibrationFacility_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadCalibrationFacility_R3(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadCalibrationFacility_R3(CommsHandle hComms, CompletionToken token, CalFacility_t * facility);
|
||||
CompletionToken EPDDLL_API BeginWriteCalReference_R3(CommsHandle hComms, uint32_t calRef, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteCalReference_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadCalReference_R3(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadCalReference_R3(CommsHandle hComms, CompletionToken token, uint32_t * calRef);
|
||||
CompletionToken EPDDLL_API BeginWriteCalDueDate_R3(CommsHandle hComms, uint32_t utc, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteCalDueDate_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadCalDueDate_R3(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadCalDueDate_R3(CommsHandle hComms, CompletionToken token, uint32_t* utc);
|
||||
CompletionToken EPDDLL_API BeginWriteGoldenFlag_R3(CommsHandle hComms, uint8_t onState, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteGoldenFlag_R3(CommsHandle hComms, CompletionToken token);
|
||||
// ***** MK3 Specific Detector Threshold Limits
|
||||
CompletionToken EPDDLL_API BeginReadDetectorThresholdLimits_R3(CommsHandle hComms, uint8_t counterIds[], uint8_t length, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadDetectorThresholdLimits_R3(CommsHandle hComms, CompletionToken token, DetectorThresholdLimit_t limits[], uint8_t length, uint8_t * numLimits);
|
||||
// * MK3 Specific Dead Time Factors
|
||||
CompletionToken EPDDLL_API BeginReadDeadTimeFactors_R3(CommsHandle hComms, uint8_t counterIds[], uint8_t length, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadDeadTimeFactors_R3(CommsHandle hComms, CompletionToken token, DeadTimeCoefficient_t thresholds[], uint8_t length, uint8_t * numFactors);
|
||||
CompletionToken EPDDLL_API BeginWriteDeadTimeFactors_R3(CommsHandle hComms, DeadTimeCoefficient_t factors[], uint8_t length, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteDeadTimeFactors_R3(CommsHandle hComms, CompletionToken token);
|
||||
/********************************************************************************************************************************************
|
||||
* End of Calibration methods
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginWriteDoseSaveInterval_R3(CommsHandle hComms, uint8_t intervalMins, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteDoseSaveInterval_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadDoseSaveInterval_R3(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadDoseSaveInterval_R3(CommsHandle hComms, CompletionToken token, uint8_t *intervalMins);
|
||||
CompletionToken EPDDLL_API BeginClearEEPROM_R3(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndClearEEPROM_R3(CommsHandle hComms, CompletionToken token);
|
||||
/********************************************************************************************************************************************
|
||||
* MK3 Specific Identities
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginReadPcbSerialNum_R3(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadPcbSerialNum_R3(CommsHandle hComms, CompletionToken token, uint32_t* pcbSerialNum);
|
||||
CompletionToken EPDDLL_API BeginWritePcbSerialNumber_R3(CommsHandle hComms, uint32_t serNum, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWritePcbSerialNumber_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadFemSerialNum_R3(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadFemSerialNum_R3(CommsHandle hComms, CompletionToken token, uint32_t* serialNum);
|
||||
CompletionToken EPDDLL_API BeginWriteFemSerialNumber_R3(CommsHandle hComms, uint32_t serNum, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteFemSerialNumber_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadEpdPartNumber_R3(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadEpdPartNumber_R3(CommsHandle hComms, CompletionToken token, PartNumber_t partNum);
|
||||
CompletionToken EPDDLL_API BeginWriteEpdPartNumber_R3(CommsHandle hComms, PartNumber_t partNum, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteEpdPartNumber_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadModelName_R3(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadModelName_R3(CommsHandle hComms, CompletionToken token, ModelName_t * name);
|
||||
CompletionToken EPDDLL_API BeginWriteModelName_R3(CommsHandle hComms, ModelName_t name, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteModelName_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginWriteCapabilities_R3(CommsHandle hComms, uint32_t capabilities, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteCapabilities_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginWriteMarkNumber_R3(CommsHandle hComms, MarkNumber_t markNumber, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteMarkNumber_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadFirmwarePartNumber_R3(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadFirmwarePartNumber_R3(CommsHandle hComms, CompletionToken token, FirmwarePartNumber_t partNum);
|
||||
CompletionToken EPDDLL_API BeginReadFpgaVersion_R3(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadFpgaVersion_R3(CommsHandle hComms, CompletionToken token, uint8_t *major, uint8_t *minor);
|
||||
CompletionToken EPDDLL_API BeginWritePcbRevision_R3(CommsHandle hComms, uint16_t rev, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWritePcbRevision_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadPcbRevision_R3(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadPcbRevision_R3(CommsHandle hComms, CompletionToken token, uint16_t* rev);
|
||||
CompletionToken EPDDLL_API BeginReadPcbPartNumber_R3(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadPcbPartNumber_R3(CommsHandle hComms, CompletionToken token, PcbPartNumber_t partNum);
|
||||
CompletionToken EPDDLL_API BeginWritePcbPartNumber_R3(CommsHandle hComms, PcbPartNumber_t partNum, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWritePcbPartNumber_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginWriteEpdRevision_R3(CommsHandle hComms, uint16_t rev, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteEpdRevision_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadEpdRevision_R3(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadEpdRevision_R3(CommsHandle hComms, CompletionToken token, uint16_t* rev);
|
||||
CompletionToken EPDDLL_API BeginReadRadioFirmwareVersion_R3(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadRadioFirmwareVersion_R3(CommsHandle hComms, CompletionToken token, VersionNumber_t * version);
|
||||
/********************************************************************************************************************************************
|
||||
* MK3 Detector Test Limits
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginReadDetectorTestLimits_R3(CommsHandle hComms, uint8_t counterIds[], uint8_t length, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadDetectorTestLimits_R3(CommsHandle hComms, CompletionToken token, DetectorTestLimit_t limits[], uint8_t length, uint8_t * numLimits);
|
||||
CompletionToken EPDDLL_API BeginWriteDetectorTestLimits_R3(CommsHandle hComms, DetectorTestLimit_t limits[], uint8_t length, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteDetectorTestLimits_R3(CommsHandle hComms, CompletionToken token);
|
||||
/********************************************************************************************************************************************
|
||||
* Pulse Mode
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginWritePulseModeEnable_R3(CommsHandle hComms, uint8_t enable, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWritePulseModeEnable_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadPulseModeEnable_R3(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadPulseModeEnable_R3(CommsHandle hComms, CompletionToken token, uint8_t * enabled);
|
||||
CompletionToken EPDDLL_API BeginWritePulseModeIndustrial_R3(CommsHandle hComms, uint8_t industrial, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWritePulseModeIndustrial_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadPulseModeIndustrial_R3(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadPulseModeIndustrial_R3(CommsHandle hComms, CompletionToken token, uint8_t * enabled);
|
||||
CompletionToken EPDDLL_API BeginWritePulseModeThreshold_R3(CommsHandle hComms, uint8_t counts, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWritePulseModeThreshold_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadPulseModeThreshold_R3(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadPulseModeThreshold_R3(CommsHandle hComms, CompletionToken token, uint8_t * counts);
|
||||
CompletionToken EPDDLL_API BeginReadPulsedModeOverrangeThreshold_R3(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadPulsedModeOverrangeThreshold_R3(CommsHandle hComms, CompletionToken token, float* threshold);
|
||||
CompletionToken EPDDLL_API BeginWritePulsedModeOverrangeThreshold_R3(CommsHandle hComms, float threshold, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWritePulsedModeOverrangeThreshold_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadChirpEnable_R3(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadChirpEnable_R3(CommsHandle hComms, CompletionToken token, uint8_t * enabled);
|
||||
CompletionToken EPDDLL_API BeginWriteChirpEnable_R3(CommsHandle hComms, uint8_t enable, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteChirpEnable_R3(CommsHandle hComms, CompletionToken token);
|
||||
/********************************************************************************************************************************************
|
||||
* MK3 Specific Wearer Identity
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginReadWearerDatabaseId_R3(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadWearerDatabaseId_R3(CommsHandle hComms, CompletionToken token, DatabaseId_t * dbid);
|
||||
CompletionToken EPDDLL_API BeginWriteWearerDatabaseId_R3(CommsHandle hComms, DatabaseId_t dbid, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteWearerDatabaseId_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadTaskId_R3(CommsHandle hComms, uint16_t type, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadTaskId_R3(CommsHandle hComms, CompletionToken token, IdString_t * taskId);
|
||||
CompletionToken EPDDLL_API BeginWriteTaskId_R3(CommsHandle hComms, IdString_t taskId, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteTaskId_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadTaskDatabaseId_R3(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadTaskDatabaseId_R3(CommsHandle hComms, CompletionToken token, DatabaseId_t * dbid);
|
||||
CompletionToken EPDDLL_API BeginWriteTaskDatabaseId_R3(CommsHandle hComms, DatabaseId_t dbid, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteTaskDatabaseId_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginClearWearerOrTaskId_R3(CommsHandle hComms, WearerAndTaskIdType_t ids[], uint8_t length, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndClearWearerOrTaskId_R3(CommsHandle hComms, CompletionToken token);
|
||||
/********************************************************************************************************************************************
|
||||
* MK3 Graphics
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginReadGraphicSize_R3(CommsHandle hComms, uint16_t graphicId, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadGraphicSize_R3(CommsHandle hComms, CompletionToken token, GraphicSize_t * size);
|
||||
CompletionToken EPDDLL_API BeginClearGraphic_R3(CommsHandle hComms, uint16_t graphicId, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndClearGraphic_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadGraphicData_R3(CommsHandle hComms, uint16_t graphicId, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadGraphicData_R3(CommsHandle hComms, CompletionToken token, GraphicBitmap_t * data);
|
||||
CompletionToken EPDDLL_API BeginWriteGraphicBitmap_R3(CommsHandle hComms, GraphicBitmap_t data, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteGraphicBitmap_R3(CommsHandle hComms, CompletionToken token);
|
||||
/********************************************************************************************************************************************
|
||||
* MK3 Snapshot Summary
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginReadSnapshotSummary_R3(CommsHandle hComms, uint8_t snapshotNum, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadSnapshotSummary_R3(CommsHandle hComms, CompletionToken token, Mk3SnapshotSummary_t * data);
|
||||
CompletionToken EPDDLL_API BeginReadSnapshotMeasurements_R3(CommsHandle hComms, uint8_t snapshotNum, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadSnapshotMeasurements_R3(CommsHandle hComms, CompletionToken token, Mk3SnapshotMeasurements_t * data);
|
||||
CompletionToken EPDDLL_API BeginReadSnapshotCounters_R3(CommsHandle hComms, uint8_t snapshotNum, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadSnapshotCounters_R3(CommsHandle hComms, CompletionToken token, Mk3SnapshotCounters_t * data);
|
||||
CompletionToken EPDDLL_API BeginReadSnapshotAlarmThresholds_R3(CommsHandle hComms, uint8_t snapshotNum, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadSnapshotAlarmThresholds_R3(CommsHandle hComms, CompletionToken token, Mk3SnapshotAlarmThresholds_t * data);
|
||||
/********************************************************************************************************************************************
|
||||
* MK3 Specific Dose Profile
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginWriteDoseProfileDoseIncrement_R3(CommsHandle hComms, float doseIncrement, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteDoseProfileDoseIncrement_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginWriteDoseProfileMeasurands_R3(CommsHandle hComms, uint8_t ids[], uint8_t length, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteDoseProfileMeasurands_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadDoseProfileByIndex_R3(CommsHandle hComms, uint16_t start, uint16_t numRequested, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadDoseProfileByIndex_R3(CommsHandle hComms, CompletionToken token, uint16_t * startIndex, DoseProfileRecord_t profile[], uint16_t length, uint16_t *count);
|
||||
CompletionToken EPDDLL_API BeginReadDoseProfileConfiguration_R3(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadDoseProfileConfiguration_R3(CommsHandle hComms, CompletionToken token, DoseProfileConfig_t * config);
|
||||
CompletionToken EPDDLL_API BeginClearDoseProfile_R3(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndClearDoseProfile_R3(CommsHandle hComms, CompletionToken token);
|
||||
/********************************************************************************************************************************************
|
||||
* Other MK3 Specific Functions
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginEnableDeepSleep_R3(CommsHandle hComms, uint8_t onState, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndEnableDeepSleep_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginEnableCovertMode_R3(CommsHandle hComms, uint8_t onState, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndEnableCovertMode_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginEnableManufacturerLockout_R3(CommsHandle hComms, uint8_t onState, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndEnableManufacturerLockout_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginEnableProtectedSession_R3(CommsHandle hComms, uint8_t onState, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndEnableProtectedSession_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginEnableResponderMode_R3(CommsHandle hComms, uint8_t onState, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndEnableResponderMode_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginTriggerResponderMode_R3(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndTriggerResponderMode_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadResponderTriggerUtc_R3(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadResponderTriggerUtc_R3(CommsHandle hComms, CompletionToken token, uint32_t *utc);
|
||||
CompletionToken EPDDLL_API BeginReadRunTime_R3(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadRunTime_R3(CommsHandle hComms, CompletionToken token, uint32_t *seconds);
|
||||
CompletionToken EPDDLL_API BeginWriteStayTime_R3(CommsHandle hComms, uint16_t minutes, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteStayTime_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadStayTime_R3(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadStayTime_R3(CommsHandle hComms, CompletionToken token, uint16_t* minutes);
|
||||
CompletionToken EPDDLL_API BeginWriteOffModeBatteryTestInterval_R3(CommsHandle hComms, uint16_t minutes, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteOffModeBatteryTestInterval_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadOffModeBatteryTestInterval_R3(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadOffModeBatteryTestInterval_R3(CommsHandle hComms, CompletionToken token, uint16_t* minutes);
|
||||
CompletionToken EPDDLL_API BeginWriteBatteryCriticalTiming_R3(CommsHandle hComms, uint16_t minutesToCritical, uint16_t minutesToShutdown, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteBatteryCriticalTiming_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadBatteryCriticalTiming_R3(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadBatteryCriticalTiming_R3(CommsHandle hComms, CompletionToken token, uint16_t *minutesToCritical, uint16_t *minutesToShutdown);
|
||||
CompletionToken EPDDLL_API BeginWriteBatteryTypeOverride_R3(CommsHandle hComms, int8_t batteryType, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteBatteryTypeOverride_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadBatteryTypeOverride_R3(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadBatteryTypeOverride_R3(CommsHandle hComms, CompletionToken token, int8_t *batteryType);
|
||||
CompletionToken EPDDLL_API BeginReadBatteryTypeFitted_R3(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadBatteryTypeFitted_R3(CommsHandle hComms, CompletionToken token, int8_t *batteryType);
|
||||
/********************************************************************************************************************************************
|
||||
* MK3 Specific Access Level Functions
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginReadAccessPermissionsForLevel_R3(CommsHandle hComms, AccessLevel_t level, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadAccessPermissionsForLevel_R3(CommsHandle hComms, uint16_t commandIds[], uint16_t length, uint16_t *numIds, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginWriteAccessPermissionsForLevel_R3(CommsHandle hComms, AccessLevel_t level, uint16_t commandIds[], uint16_t length, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteAccessPermissionsForLevel_R3(CommsHandle hComms, CompletionToken token);
|
||||
/********************************************************************************************************************************************
|
||||
*
|
||||
* Displays
|
||||
*
|
||||
********************************************************************************************************************************************/
|
||||
/********************************************************************************************************************************************
|
||||
*
|
||||
* Display Quick Access List
|
||||
*
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginReadQuickAccessDisplays_R3(CommsHandle hComms, uint8_t locationIndexes[], uint8_t length, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadQuickAccessDisplays_R3(CommsHandle hComms, CompletionToken token, QuickAccessDisplay_t displayIds[], uint8_t length, uint8_t * numDisplays);
|
||||
CompletionToken EPDDLL_API BeginWriteQuickAccessDisplays_R3(CommsHandle hComms, QuickAccessDisplay_t displayIds[], uint8_t length, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteQuickAccessDisplays_R3(CommsHandle hComms, CompletionToken token);
|
||||
/********************************************************************************************************************************************
|
||||
*
|
||||
* Display Enables
|
||||
*
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginReadDisplayEnables_R3(CommsHandle hComms, uint8_t menuIds[], uint8_t length, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadDisplayEnables_R3(CommsHandle hComms, CompletionToken token, DisplayAttributeMap_t enables[], uint8_t length, uint8_t * numItems);
|
||||
CompletionToken EPDDLL_API BeginWriteDisplayEnables_R3(CommsHandle hComms, DisplayAttributeMap_t enables[], uint8_t length, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteDisplayEnables_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadDisplayEnablePermissions_R3(CommsHandle hComms, AccessLevel_t level, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadDisplayEnablePermissions_R3(CommsHandle hComms, CompletionToken token, AccessLevel_t * level, uint16_t permissions[], uint8_t length, uint8_t * numMenus);
|
||||
CompletionToken EPDDLL_API BeginWriteDisplayEnablePermissions_R3(CommsHandle hComms, AccessLevel_t level, uint16_t enables[], uint8_t length, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteDisplayEnablePermissions_R3(CommsHandle hComms, CompletionToken token);
|
||||
/********************************************************************************************************************************************
|
||||
*
|
||||
* Display Capabilities
|
||||
*
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginReadDisplayCapability_R3(CommsHandle hComms, DisplayCapability_t capability, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadDisplayCapability_R3(CommsHandle hComms, CompletionToken token, DisplayCapability_t* capabilityRequested, DisplayAttributeMap_t displayMaps[], uint8_t length, uint8_t * numItems);
|
||||
/********************************************************************************************************************************************
|
||||
*
|
||||
* Off Mode Display
|
||||
*
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginWriteOffModeDisplay_R3(CommsHandle hComms, OffModeDutyCycle dutyCycle, OffModeDisplayId_t offModeDispId, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteOffModeDisplay_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadOffModeDisplay_R3(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadOffModeDisplay_R3(CommsHandle hComms, CompletionToken token, OffModeDutyCycle * dutyCycle, OffModeDisplayId_t * offModeDispId);
|
||||
/********************************************************************************************************************************************
|
||||
*
|
||||
* Backlight
|
||||
*
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginWriteBacklightEnable_R3(CommsHandle hComms, uint8_t enable, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteBacklightEnable_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadBacklightEnable_R3(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadBacklightEnable_R3(CommsHandle hComms, CompletionToken token, uint8_t * enabled);
|
||||
CompletionToken EPDDLL_API BeginTriggerBacklight_R3(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndTriggerBacklight_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginWriteSwitchOnFromButton_R3(CommsHandle hComms, uint8_t enable, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteSwitchOnFromButton_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadSwitchOnFromButton_R3(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadSwitchOnFromButton_R3(CommsHandle hComms, CompletionToken token, uint8_t * enabled);
|
||||
CompletionToken EPDDLL_API BeginWriteBacklightPeriod_R3(CommsHandle hComms, uint8_t seconds, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteBacklightPeriod_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadBacklightPeriod_R3(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadBacklightPeriod_R3(CommsHandle hComms, CompletionToken token, uint8_t * seconds);
|
||||
CompletionToken EPDDLL_API BeginWriteBacklightBrightness_R3(CommsHandle hComms, uint8_t level, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteBacklightBrightness_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadBacklightBrightness_R3(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadBacklightBrightness_R3(CommsHandle hComms, CompletionToken token, uint8_t* level);
|
||||
/********************************************************************************************************************************************
|
||||
*
|
||||
* Display Options
|
||||
*
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginWriteDisplayOptionsLock_R3(CommsHandle hComms, uint8_t value, uint8_t mask, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteDisplayOptionsLock_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadDisplayOptionsLock_R3(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadDisplayOptionsLock_R3(CommsHandle hComms, CompletionToken token, uint8_t * value);
|
||||
// end of display group
|
||||
/********************************************************************************************************************************************
|
||||
*
|
||||
* Alarm Configuration
|
||||
*
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginWriteAlarmConfiguration_R3(CommsHandle hComms, AlarmConfig_t alarmConfigs[], uint16_t length, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteAlarmConfiguration_R3(CommsHandle hComms, CompletionToken token);
|
||||
__declspec(deprecated("BeginReadAlarmConfiguration_R3 is now deprecated. Use BeginReadAlarmConfiguration instead"))
|
||||
CompletionToken EPDDLL_API BeginReadAlarmConfiguration_R3(CommsHandle hComms, AlarmConfigId alarmConfigIds[], uint16_t length, CompletionCallback callback);
|
||||
__declspec(deprecated("EndReadAlarmConfiguration_R3 is now deprecated. Use EndReadAlarmConfiguration instead"))
|
||||
int32_t EPDDLL_API EndReadAlarmConfiguration_R3(CommsHandle hComms, CompletionToken token, AlarmConfig_t alarmConfigs[], uint16_t length, uint16_t * numConfigs);
|
||||
CompletionToken EPDDLL_API BeginWriteAlarmConfigurationLock_R3(CommsHandle hComms, AlarmConfig_t alarmConfigLocks[], uint16_t length, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteAlarmConfigurationLock_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadAlarmConfigurationLock_R3(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadAlarmConfigurationLock_R3(CommsHandle hComms, CompletionToken token, AlarmConfig_t alarmConfigLocks[], uint16_t length, uint16_t * numConfigs);
|
||||
CompletionToken EPDDLL_API BeginReadMeasurandIds_R3(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadMeasurandIds_R3(CommsHandle hComms, CompletionToken token, MeasurementId ids[], uint8_t length, uint8_t * numIds);
|
||||
/********************************************************************************************************************************************
|
||||
*
|
||||
* Telemetry
|
||||
*
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginReadTelemetryEnable_R3(CommsHandle hComms, uint8_t mode, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadTelemetryEnable_R3(CommsHandle hComms, uint8_t *mode, uint8_t *enabled, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginWriteTelemetryEnable_R3(CommsHandle hComms, uint8_t mode, uint8_t enabled, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteTelemetryEnable_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadTelemetryTxPower_R3(CommsHandle hComms, uint8_t mode, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadTelemetryTxPower_R3(CommsHandle hComms, uint8_t *mode, int8_t *dBm, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginWriteTelemetryTxPower_R3(CommsHandle hComms, uint8_t mode, int8_t dBm, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteTelemetryTxPower_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadTelemetryAdvContent_R3(CommsHandle hComms, uint8_t mode, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadTelemetryAdvContent_R3(CommsHandle hComms, uint8_t *mode, uint8_t *advFlags, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginWriteTelemetryAdvContent_R3(CommsHandle hComms, uint8_t mode, uint8_t advFlags, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteTelemetryAdvContent_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadTelemetryAdvConfig_R3(CommsHandle hComms, uint8_t mode, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadTelemetryAdvConfig_R3(CommsHandle hComms, TeleAdvConfig_t *config, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginWriteTelemetryAdvConfig_R3(CommsHandle hComms, TeleAdvConfig_t *config, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteTelemetryAdvConfig_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadTelemetryCxnConfig_R3(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadTelemetryCxnConfig_R3(CommsHandle hComms, TeleCxnConfig_t *config, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginWriteTelemetryCxnConfig_R3(CommsHandle hComms, TeleCxnConfig_t *config, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteTelemetryCxnConfig_R3(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadTelemetryReportInterval_R3(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadTelemetryReportInterval_R3(CommsHandle hComms, uint8_t *interval, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginWriteTelemetryReportInterval_R3(CommsHandle hComms, uint8_t interval, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteTelemetryReportInterval_R3(CommsHandle hComms, CompletionToken token);
|
||||
/*Debug Registers*/
|
||||
CompletionToken EPDDLL_API BeginReadDebugRegister_R3(CommsHandle hComms, uint8_t registerId, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadDebugRegister_R3(CommsHandle hComms, uint8_t *registerId, uint32_t *value, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginWriteDebugRegister_R3(CommsHandle hComms, uint8_t registerId, uint32_t value, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteDebugRegister_R3(CommsHandle hComms, CompletionToken token);
|
||||
/********************************************************************************************************************************************
|
||||
*
|
||||
* MK3 Specific Zone Control
|
||||
*
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginValidateEpdOwnerKey_R3(CommsHandle hComms, uint8_t encData[], CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndValidateEpdOwnerKey_R3(CommsHandle hComms, uint8_t *decData, CompletionToken token);
|
||||
/********************************************************************************************************************************************
|
||||
*
|
||||
* MK3 Firmware Update
|
||||
*
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginInitiateFirmwareUpdate_R3(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndInitiateFirmwareUpdate_R3(CommsHandle hComms, CompletionToken token);
|
||||
}
|
||||
#endif
|
||||
|
|
@ -1,319 +0,0 @@
|
|||
#ifndef epd_common_h
|
||||
#define epd_common_h
|
||||
#ifndef WINAPI
|
||||
#define WINAPI __stdcall
|
||||
#endif
|
||||
#ifdef READER3_EXPORTS
|
||||
#define EPDDLL_API __declspec(dllexport) WINAPI
|
||||
#else
|
||||
#define EPDDLL_API __declspec(dllimport) WINAPI
|
||||
#endif
|
||||
#include <stdint.h>
|
||||
#include "Mk3Types.h"
|
||||
// Grouping for Doxygen comments and function descriptions
|
||||
// Documentation for method return codes
|
||||
extern "C"
|
||||
{
|
||||
const int r_OK = 0;
|
||||
const int r_UnknownError = -1;
|
||||
const int r_InvalidCommsHandle = -2;
|
||||
const int r_InvalidPortName = -3;
|
||||
const int r_PortAlreadyOpen = -4;
|
||||
const int r_PortClosed = -5;
|
||||
const int r_OperationFailed = -6;
|
||||
const int r_InvalidState = -7;
|
||||
const int r_InvalidCompletionToken = -8;
|
||||
const int r_OperationTimeout = -9;
|
||||
const int r_UnknownCmd = -100;
|
||||
const int r_InvalidParam = -101;
|
||||
const int r_InsufficientPriv = -102;
|
||||
const int r_UnsupportedOp = -103;
|
||||
const int r_FunctionFail = -104;
|
||||
const int r_InvalidOp = -105;
|
||||
const int r_IncompleteCommand = -106;
|
||||
const int r_ResponseTooBig = -107; //response exceeded single frame length
|
||||
const int r_ErrorBadStoredData = -108;
|
||||
const int r_InvalidResponseDataLength = -109;
|
||||
const int r_PayloadTooBig = -110;
|
||||
const int r_ParseFailure = -111;
|
||||
const int r_EEPROMWriteFailure = -112;
|
||||
const int r_Busy = -113;
|
||||
//These are Mk2 errors
|
||||
const int r_EEPROMReadFailure = -121;
|
||||
const int r_WearerNameMismatch = -122;
|
||||
const int r_DataTooLongForBuffer = -123;
|
||||
// Error codes generated within DLL
|
||||
const int r_ErrorUnexpectedResponse = -200;
|
||||
const int r_ErrorNotProcessed = -201; //command not processed due to previous failure
|
||||
const int r_ErrorNotConnected = -202;
|
||||
const int r_ErrorUserCancelled = -203;
|
||||
typedef void* CommsHandle;
|
||||
typedef void* CompletionToken;
|
||||
typedef void(WINAPI *DiscoveryCallback)(CommsHandle hComms, DiscoveryId const discovered[], int32_t count);
|
||||
typedef void(WINAPI *CompletionCallback)(CommsHandle hComms, CompletionToken token);
|
||||
typedef void(WINAPI *ConnectCallback)(CommsHandle hComms, DiscoveryId id);
|
||||
typedef void(WINAPI *DisconnectCallback)(CommsHandle hComms, DiscoveryId id);
|
||||
typedef void(WINAPI *RemovedCallback)(CommsHandle hComms, DiscoveryId id);
|
||||
/********************************************************************************************************************************************
|
||||
*
|
||||
* Interface Setup & Tear down
|
||||
*
|
||||
********************************************************************************************************************************************/
|
||||
CommsHandle EPDDLL_API CreateReaderInterface();
|
||||
int32_t EPDDLL_API DestroyReaderInterface(CommsHandle hComms);
|
||||
int32_t EPDDLL_API OpenReader(CommsHandle hComms, char* portName);
|
||||
int32_t EPDDLL_API CloseReader(CommsHandle hComms);
|
||||
/********************************************************************************************************************************************
|
||||
*
|
||||
* Interface configuration
|
||||
*
|
||||
********************************************************************************************************************************************/
|
||||
int32_t EPDDLL_API SetDllLogLevel(CommsHandle hComms, uint32_t level);
|
||||
int32_t EPDDLL_API GetDllLogLevel(CommsHandle hComms, uint32_t* level);
|
||||
int32_t EPDDLL_API SetResponseTimeout(CommsHandle hComms, uint32_t ms);
|
||||
int32_t EPDDLL_API GetResponseTimeout(CommsHandle hComms, uint32_t* ms);
|
||||
int32_t EPDDLL_API SetRetryCount(CommsHandle hComms, uint32_t retries);
|
||||
int32_t EPDDLL_API GetRetryCount(CommsHandle hComms, uint32_t* retries);
|
||||
int32_t EPDDLL_API SetMultipleDiscoveryMode(CommsHandle hComms, bool state);
|
||||
int32_t EPDDLL_API GetMultipleDiscoveryMode(CommsHandle hComms, bool *state);
|
||||
int32_t EPDDLL_API SetDiscoveryTimeslots(CommsHandle hComms, uint32_t slots);
|
||||
int32_t EPDDLL_API GetDiscoveryTimeslots(CommsHandle hComms, uint32_t *slots);
|
||||
int32_t EPDDLL_API SetDiscoveryCacheTimeout(CommsHandle hComms, uint32_t ms);
|
||||
int32_t EPDDLL_API GetDiscoveryTimeout(CommsHandle hComms, uint32_t *ms);
|
||||
/********************************************************************************************************************************************
|
||||
*
|
||||
* General Stack Operation, Discovery, Connection Management etc
|
||||
*
|
||||
********************************************************************************************************************************************/
|
||||
int32_t EPDDLL_API Commit(CommsHandle hComms);
|
||||
int32_t EPDDLL_API CommitAndWait(CommsHandle hComms);
|
||||
int32_t EPDDLL_API Cancel(CommsHandle hComms);
|
||||
int32_t EPDDLL_API StartDiscovery(CommsHandle hComms, DiscoveryCallback callback);
|
||||
int32_t EPDDLL_API StopDiscovery(CommsHandle hComms);
|
||||
int32_t EPDDLL_API GetDiscoveredEpds(CommsHandle hComms, DiscoveryId discovered[], uint32_t size, uint32_t* count);
|
||||
int32_t EPDDLL_API Connect(CommsHandle hComms, DiscoveryId epd, bool wait = false);
|
||||
int32_t EPDDLL_API Disconnect(CommsHandle hComms);
|
||||
int32_t EPDDLL_API DisconnectAndNotify(CommsHandle hComms, uint16_t alarmConfig, uint16_t duration);
|
||||
int32_t EPDDLL_API SetConnectCallback(CommsHandle hComms, ConnectCallback callback);
|
||||
int32_t EPDDLL_API SetDisconnectCallback(CommsHandle hComms, DisconnectCallback callback);
|
||||
int32_t EPDDLL_API AwaitRemoval(CommsHandle hComms, DiscoveryId epd, bool wait=false);
|
||||
int32_t EPDDLL_API SetRemovedCallback(CommsHandle hComms, RemovedCallback callback);
|
||||
int32_t EPDDLL_API GetErrorCode();
|
||||
/********************************************************************************************************************************************
|
||||
* Real Time Clock
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginReadRTC(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadRTC(CommsHandle hComms, CompletionToken token, uint32_t* rtc);
|
||||
/********************************************************************************************************************************************
|
||||
* Common Counts Acquisition
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginReadCounts(CommsHandle hComms, uint8_t counterIds[], uint8_t length, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadCounts(CommsHandle hComms, CompletionToken token, Counter_t counts[], uint8_t length, uint8_t * numCounts, uint32_t * utc, uint32_t * secondsSinceBaseline);
|
||||
CompletionToken EPDDLL_API BeginReadBaselineCounts(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadBaselineCounts(CommsHandle hComms, CompletionToken token, Counter_t counts[], uint8_t length, uint32_t * timestamp, uint8_t * numCounts);
|
||||
CompletionToken EPDDLL_API BeginSetBaselineCounters(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndSetBaselineCounters(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginStartDetectorTest(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndStartDetectorTest(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadSelfTestInterval(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadSelfTestInterval(CommsHandle hComms, CompletionToken token, uint16_t * minutes);
|
||||
CompletionToken EPDDLL_API BeginWriteSelfTestInterval(CommsHandle hComms, uint16_t minutes, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteSelfTestInterval(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginWriteChirpSensitivity(CommsHandle hComms, float sensitivity, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteChirpSensitivity(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadChirpSensitivity(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadChirpSensitivity(CommsHandle hComms, CompletionToken token, float * sensitivity);
|
||||
/********************************************************************************************************************************************
|
||||
*
|
||||
* Common Calibration
|
||||
*
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginWriteFactoryCalDate(CommsHandle hComms, uint32_t utc, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteFactoryCalDate(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadFactoryCalDate(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadFactoryCalDate(CommsHandle hComms, CompletionToken token, uint32_t* utc);
|
||||
CompletionToken EPDDLL_API BeginWriteCalDueDate(CommsHandle hComms, uint32_t utc, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteCalDueDate(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadCalDueDate(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadCalDueDate(CommsHandle hComms, CompletionToken token, uint32_t* utc);
|
||||
CompletionToken EPDDLL_API BeginReadSensitivities(CommsHandle hComms, uint8_t sensIds[], uint8_t length, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadSensitivities(CommsHandle hComms, CompletionToken token, CalSensitivity_t sensitivities[], uint8_t length, uint8_t * numSensitivities);
|
||||
CompletionToken EPDDLL_API BeginReadDetectorThresholds(CommsHandle hComms, uint8_t counterIds[], uint8_t length, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadDetectorThresholds(CommsHandle hComms, CompletionToken token, DetectorThreshold_t thresholds[], uint8_t length, uint8_t * numThresholds);
|
||||
CompletionToken EPDDLL_API BeginReadGains(CommsHandle hComms, uint8_t sensIds[], uint8_t length, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadGains(CommsHandle hComms, CompletionToken token, CalGain_t gains[], uint8_t length, uint8_t * numGains);
|
||||
/********************************************************************************************************************************************
|
||||
*
|
||||
* Common Dose Measurements
|
||||
*
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginReadDoses(CommsHandle hComms, uint8_t ids[], uint8_t length, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadDoses(CommsHandle hComms, CompletionToken token, MeasValue_t doses[], uint8_t length, uint8_t * numDoses, uint32_t * utc);
|
||||
CompletionToken EPDDLL_API BeginReadTotalDoses(CommsHandle hComms, uint8_t ids[], uint8_t length, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadTotalDoses(CommsHandle hComms, CompletionToken token, MeasValue_t doses[], uint8_t length, uint8_t * numDoses, uint32_t * utc);
|
||||
CompletionToken EPDDLL_API BeginClearDose(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndClearDose(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginClearTotalDose(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndClearTotalDose(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginClearPeakRates(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndClearPeakRates(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginWriteDoses(CommsHandle hComms, MeasValue_t doses[], uint8_t length, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteDoses(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginWriteTotalDoses(CommsHandle hComms, MeasValue_t doses[], uint8_t length, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteTotalDoses(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadRates(CommsHandle hComms, uint8_t ids[], uint8_t length, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadRates(CommsHandle hComms, CompletionToken token, MeasValue_t rates[], uint8_t length, uint8_t * numRates, uint32_t * utc);
|
||||
CompletionToken EPDDLL_API BeginReadPeakRates(CommsHandle hComms, uint8_t ids[], uint8_t length, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadPeakRates(CommsHandle hComms, CompletionToken token, PeakRate_t rates[], uint8_t length, uint8_t * numRates);
|
||||
CompletionToken EPDDLL_API BeginReadQualityData(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadQualityData(CommsHandle hComms, CompletionToken token, Mk3QualityData_t * quality);
|
||||
/********************************************************************************************************************************************
|
||||
* Common Alarm Thresholds
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginReadAlarmThresholds(CommsHandle hComms, uint8_t measurandId, uint8_t thresholdIds[], uint8_t numThresholds, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadAlarmThresholds(CommsHandle hComms, CompletionToken token, Mk3AlarmThresholds_t * thresholds);
|
||||
CompletionToken EPDDLL_API BeginWriteAlarmThresholds(CommsHandle hComms, uint8_t measurandId, uint8_t numThresholds, Mk3AlarmThreshold_t thresholds[], CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteAlarmThresholds(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadRateOffPercentage(CommsHandle hComms, uint8_t measurandIds[], uint8_t numThresholds, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadRateOffPercentage(CommsHandle hComms, CompletionToken token, Mk3RatePercentage_t offThresholds[], uint8_t length, uint8_t * numThresholds);
|
||||
CompletionToken EPDDLL_API BeginWriteRateOffPercentage(CommsHandle hComms, Mk3RatePercentage_t thresholds[], uint8_t length, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteRateOffPercentage(CommsHandle hComms, CompletionToken token);
|
||||
/********************************************************************************************************************************************
|
||||
* Common General Management
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginEpdOnOff(CommsHandle hComms, uint8_t onState, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndEpdOnOff(CommsHandle hComms, CompletionToken token);
|
||||
/********************************************************************************************************************************************
|
||||
* Common EPD Status
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginReadStatus(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadStatus(CommsHandle hComms, CompletionToken token, StatusData_t * status);
|
||||
CompletionToken EPDDLL_API BeginClearFaultStatus(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndClearFaultStatus(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginClearLatchedAlarms(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndClearLatchedAlarms(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginClearAllStatus(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndClearAllStatus(CommsHandle hComms, CompletionToken token);
|
||||
/********************************************************************************************************************************************
|
||||
* Common Wearer Identity
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginReadWearerId(CommsHandle hComms, uint16_t type, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadWearerId(CommsHandle hComms, CompletionToken token, IdString_t * wearerId);
|
||||
CompletionToken EPDDLL_API BeginWriteWearerId(CommsHandle hComms, IdString_t wearerId, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteWearerId(CommsHandle hComms, CompletionToken token);
|
||||
/********************************************************************************************************************************************
|
||||
* Common Issue & Return
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginIssueEPD(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndIssueEPD(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginDeissueEPD(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndDeissueEPD(CommsHandle hComms, CompletionToken token);
|
||||
/********************************************************************************************************************************************
|
||||
* Common Identities
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginReadEpdIdentities(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadEpdIdentities(CommsHandle hComms, CompletionToken token, uint32_t * epdId, EpdTypes * epdType, uint32_t * capabilities,
|
||||
MarkNumber_t * markNumber, VersionNumber_t * firmwareVersion, char* vcsRevBuf, uint32_t buflen);
|
||||
CompletionToken EPDDLL_API BeginWriteEpdSerialNumber(CommsHandle hComms, uint32_t epdId, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteEpdSerialNumber(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadEpdSerialNum(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadEpdSerialNum(CommsHandle hComms, CompletionToken token, uint32_t* epdSerialNum);
|
||||
CompletionToken EPDDLL_API BeginReadCapabilities(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadCapabilities(CommsHandle hComms, CompletionToken token, uint32_t* capabilities);
|
||||
CompletionToken EPDDLL_API BeginReadMarkNumber(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadMarkNumber(CommsHandle hComms, CompletionToken token, MarkNumber_t * markNumber);
|
||||
CompletionToken EPDDLL_API BeginReadEpdType(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadEpdType(CommsHandle hComms, CompletionToken token, EpdTypes * epdType);
|
||||
CompletionToken EPDDLL_API BeginReadFirmwareVersion(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadFirmwareVersion(CommsHandle hComms, CompletionToken token, VersionNumber_t * version);
|
||||
/********************************************************************************************************************************************
|
||||
* Common General Configuration
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginWriteDoseWritableFlag(CommsHandle hComms, uint8_t enabled, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteDoseWritableFlag(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginWriteClearDoseOnSwitchOn(CommsHandle hComms, uint8_t enable, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteClearDoseOnSwitchOn(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginWriteReturnForReadTime(CommsHandle hComms, uint32_t utc, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteReturnForReadTime(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadReturnForReadTime(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadReturnForReadTime(CommsHandle hComms, CompletionToken token, uint32_t* utc);
|
||||
CompletionToken EPDDLL_API BeginReadAlarmConfiguration(CommsHandle hComms, AlarmConfigId alarmConfigIds[], uint16_t length, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadAlarmConfiguration(CommsHandle hComms, CompletionToken token, AlarmConfig_t alarmConfigs[], uint16_t length, uint16_t * numConfigs);
|
||||
/********************************************************************************************************************************************
|
||||
* Common Dose Profile
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginWriteDoseProfileInterval(CommsHandle hComms, uint16_t interval, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteDoseProfileInterval(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadDoseProfileInterval(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadDoseProfileInterval(CommsHandle hComms, CompletionToken token, uint16_t * interval);
|
||||
CompletionToken EPDDLL_API BeginReadDoseProfileByTime(CommsHandle hComms, uint32_t startTime, uint32_t endTime, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadDoseProfileByTime(CommsHandle hComms, CompletionToken token, DoseProfileRecord_t * profile[], uint16_t *count);
|
||||
void EPDDLL_API CleanUpReadDoseProfile(DoseProfileRecord_t * profile);
|
||||
/********************************************************************************************************************************************
|
||||
* Common Event Log
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginReadEventsByIndex(CommsHandle hComms, uint8_t start, uint8_t requested, CompletionCallback callback = nullptr);
|
||||
int32_t EPDDLL_API EndReadEventsByIndex(CommsHandle hComms, CompletionToken token, EventLog * logs[], uint8_t *count);
|
||||
void EPDDLL_API CleanUpReadEventLog(EventLog * logs);
|
||||
/********************************************************************************************************************************************
|
||||
* Common Scratchpad
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginReadScratchPad(CommsHandle hComms, uint16_t startAddress, uint16_t length, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadScratchpad(CommsHandle hComms, CompletionToken token, uint16_t *address, uint8_t buffer[], uint16_t length, uint16_t* read);
|
||||
CompletionToken EPDDLL_API BeginWriteScratchPad(CommsHandle hComms, uint16_t startAddress, uint8_t buffer[], uint16_t length, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteScratchpad(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadScratchpadSize(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadScratchpadSize(CommsHandle hComms, CompletionToken token, uint16_t* size);
|
||||
CompletionToken EPDDLL_API BeginClearScratchPad(CommsHandle hComms, uint8_t fillChar, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndClearScratchpad(CommsHandle hComms, CompletionToken token);
|
||||
/********************************************************************************************************************************************
|
||||
* Common EEProm
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginReadEEProm(CommsHandle hComms, uint16_t startAddress, uint8_t length, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadEEProm(CommsHandle hComms, CompletionToken token, uint16_t *address, uint8_t buffer[], uint8_t length, uint8_t* read);
|
||||
CompletionToken EPDDLL_API BeginWriteEEProm(CommsHandle hComms, uint16_t startAddress, uint8_t buffer[], uint8_t length, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteEEProm(CommsHandle hComms, CompletionToken token);
|
||||
/********************************************************************************************************************************************
|
||||
* Common Access level
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginWriteAccessLevel(CommsHandle hComms, AccessLevel_t level, EncryptionKey key, uint8_t length, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteAccessLevel(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadCurrentAccessLevel(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadCurrentAccessLevel(CommsHandle hComms, CompletionToken token, AccessLevel_t * level);
|
||||
CompletionToken EPDDLL_API BeginWriteAccessKey(CommsHandle hComms, AccessLevel_t level, EncryptionKey key, int8_t length, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteAccessKey(CommsHandle hComms, CompletionToken token);
|
||||
/********************************************************************************************************************************************
|
||||
* Common Battery Management
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginWriteBatteryTestInterval(CommsHandle hComms, uint16_t minutes, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteBatteryTestInterval(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadBatteryTestInterval(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadBatteryTestInterval(CommsHandle hComms, CompletionToken token, uint16_t* minutes);
|
||||
CompletionToken EPDDLL_API BeginWriteBatteryLowThreshold(CommsHandle hComms, int8_t batteryType, uint16_t mV, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteBatteryLowThreshold(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadBatteryLowThreshold(CommsHandle hComms, int8_t batteryType, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadBatteryLowThreshold(CommsHandle hComms, CompletionToken token, int8_t* batteryType, uint16_t* mV );
|
||||
CompletionToken EPDDLL_API BeginReadVoltages(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadVoltages(CommsHandle hComms, CompletionToken token, uint16_t* vbat0, uint16_t* vbat1, uint16_t* vcpu);
|
||||
/********************************************************************************************************************************************
|
||||
* Common User Inteface
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginWriteDisplayOptions(CommsHandle hComms, uint8_t value, uint8_t mask, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteDisplayOptions(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadDisplayOptions(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadDisplayOptions(CommsHandle hComms, CompletionToken token, uint8_t * value);
|
||||
CompletionToken EPDDLL_API BeginWriteDisplayTimeout(CommsHandle hComms, uint8_t seconds, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteDisplayTimeout(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadDisplayTimeout(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadDisplayTimeout(CommsHandle hComms, CompletionToken token, uint8_t* seconds);
|
||||
/********************************************************************************************************************************************
|
||||
* Common Zone Control
|
||||
********************************************************************************************************************************************/
|
||||
CompletionToken EPDDLL_API BeginWriteZoneControlMap(CommsHandle hComms, uint8_t map[], uint8_t mask[], CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndWriteZoneControlMap(CommsHandle hComms, CompletionToken token);
|
||||
CompletionToken EPDDLL_API BeginReadZoneControlMap(CommsHandle hComms, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadZoneControlMap(CommsHandle hComms, CompletionToken token, uint8_t map[]);
|
||||
CompletionToken EPDDLL_API BeginReadZoneAccessPermitted(CommsHandle hComms, uint8_t zone, CompletionCallback callback);
|
||||
int32_t EPDDLL_API EndReadZoneAccessPermitted(CommsHandle hComms, CompletionToken token, bool *permitted);
|
||||
}
|
||||
#endif
|
||||
|
|
@ -1,582 +0,0 @@
|
|||
#ifndef Mk3Types_h
|
||||
#define Mk3Types_h
|
||||
#include <stdint.h>
|
||||
#include "CommonEpdTypes.h"
|
||||
#include <vector>
|
||||
#define MAX_COUNTERS 6
|
||||
// Mk3 Measurands
|
||||
#define MK3_MEAS_HP10 0
|
||||
#define MK3_MEAS_HP07 1
|
||||
#define MK3_MEAS_HP10G 2
|
||||
#define MK3_MEAS_HP10N 3
|
||||
enum class CounterType : uint16_t
|
||||
{
|
||||
Counter_Hg1 = 0, // MK2 HG
|
||||
Counter_Hg2 = 1,
|
||||
Counter_Sg1 = 2, // Mk2 SG
|
||||
Counter_Sg2 = 3, // Mk2 BC
|
||||
Counter_Sg3 = 4,
|
||||
Counter_Fb1 = 5, // Mk2 FB
|
||||
Counter_Fb2 = 6,
|
||||
Counter_An1 = 7,
|
||||
Counter_Fn2 = 8
|
||||
};
|
||||
#define MAX_DET_THRESHOLDS MAX_COUNTERS
|
||||
#pragma pack (push)
|
||||
#pragma pack (1)
|
||||
typedef struct
|
||||
{
|
||||
uint16_t eventId;
|
||||
uint16_t info;
|
||||
uint32_t timestamp;
|
||||
}EventLog;
|
||||
typedef struct
|
||||
{
|
||||
uint16_t type;
|
||||
uint32_t value;
|
||||
}Counter_t;
|
||||
typedef struct
|
||||
{
|
||||
uint16_t type;
|
||||
uint16_t value;
|
||||
}DetectorThreshold_t;
|
||||
typedef struct
|
||||
{
|
||||
CounterType id;
|
||||
uint16_t scaledDeadTime;
|
||||
uint16_t scaledCoefficient;
|
||||
}DeadTimeCoefficient_t;
|
||||
typedef struct
|
||||
{
|
||||
CounterType id;
|
||||
uint8_t value;
|
||||
}DetectorTestLimit_t;
|
||||
typedef struct
|
||||
{
|
||||
uint16_t type;
|
||||
uint16_t va;
|
||||
uint16_t vb;
|
||||
}DetectorThresholdLimit_t;
|
||||
enum class OffModeDutyCycle :uint8_t
|
||||
{
|
||||
Off = 0,
|
||||
On = 1,
|
||||
Pct50 = 2,
|
||||
Pct33 = 3,
|
||||
Pct25 = 4,
|
||||
Pct10 = 5,
|
||||
NoChange = 255
|
||||
};
|
||||
enum class SensitivityId
|
||||
{
|
||||
//Hp10 Gamma contributors
|
||||
Hg1Sens10G = 0, // Mk2 HGSens10 (K1)
|
||||
Hg2Sens10G = 1,
|
||||
Sg1Sens10G = 2, // Mk2 SGSens10 (K2)
|
||||
Sg2Sens10G = 3,
|
||||
Sg3Sens10G = 4,
|
||||
//Hp10 Neutron contributors
|
||||
//Hp07 Gamma contributors
|
||||
Hg1Sens07G = 5, // Mk2 HGSens07 (K3)
|
||||
Hg2Sens07G = 6,
|
||||
Sg1Sens07G = 7, // Mk2 SGSens07 (K4)
|
||||
Sg2Sens07G = 8,
|
||||
Sg3Sens07G = 9,
|
||||
//Hp07 Beta contributors
|
||||
Fb1Sens07B = 10, // Mk2 FBSens07 (K5)
|
||||
Fb2Sens07B = 11,
|
||||
Sg2Sens07B = 12, // Mk2 BCSens07 (K6)
|
||||
Sg3Sens07B = 13,
|
||||
MaxSensitivity
|
||||
};
|
||||
#define MAX_SENSITIVITIES ((uint16_t)SensitivityId::MaxSensitivity)
|
||||
#define LAST_SENSITIVITY (((uint16_t)SensitivityId::MaxSensitivity) - 1)
|
||||
enum class MeasurementId : uint16_t
|
||||
{
|
||||
Meas_Hp10,
|
||||
Meas_Hp07,
|
||||
Meas_Hp10G,
|
||||
Meas_Hp10N
|
||||
};
|
||||
#define MAX_MEASUREMENTS 4
|
||||
enum class ThresholdId
|
||||
{
|
||||
Thres_DoseAlarm = 0,
|
||||
Thres_DoseWarning = 1,
|
||||
Thres_RateAlarm = 2,
|
||||
Thres_RateWarning = 3
|
||||
};
|
||||
#define MAX_ALM_THRESHOLDS 4
|
||||
enum class WearerIdType
|
||||
{
|
||||
WearerId_Name,
|
||||
WearerId_Primary,
|
||||
WearerId_Id2,
|
||||
WearerId_Id3
|
||||
};
|
||||
#define MAX_WEARER_ID_TYPES 4
|
||||
enum class TaskIdType
|
||||
{
|
||||
Task_Name,
|
||||
Task_Primary
|
||||
};
|
||||
#define MAX_TASK_ID_TYPES 2
|
||||
enum class WearerAndTaskIdType_t : uint16_t
|
||||
{
|
||||
WearerId_Name,
|
||||
WearerId_Primary,
|
||||
WearerId_Id2,
|
||||
WearerId_Id3,
|
||||
TaskName,
|
||||
TaskID,
|
||||
WearerDBID,
|
||||
TaskDBID
|
||||
};
|
||||
#define MAX_WEARER_TASK_ID_TYPES 8
|
||||
typedef struct
|
||||
{
|
||||
uint8_t RecordType;
|
||||
uint8_t Measurand;
|
||||
int32_t TimeStamp;
|
||||
uint32_t Value;
|
||||
}DoseProfileRecord_t;
|
||||
typedef struct
|
||||
{
|
||||
float DoseIncrement;
|
||||
uint16_t Interval;
|
||||
uint16_t NumberOfMeasurands;
|
||||
MeasurementId Enables[MAX_MEASUREMENTS];
|
||||
}DoseProfileConfig_t;
|
||||
typedef struct
|
||||
{
|
||||
uint16_t id;
|
||||
float value;
|
||||
}CalSensitivity_t;
|
||||
typedef struct
|
||||
{
|
||||
uint16_t id;
|
||||
float value;
|
||||
}CalGain_t;
|
||||
typedef struct
|
||||
{
|
||||
uint16_t id;
|
||||
float value;
|
||||
}MeasValue_t;
|
||||
typedef struct
|
||||
{
|
||||
uint16_t id;
|
||||
float value;
|
||||
uint32_t timestamp;
|
||||
}PeakRate_t;
|
||||
typedef struct
|
||||
{
|
||||
uint32_t Utc;
|
||||
uint16_t NumberOfMeasurands;
|
||||
MeasValue_t Measurements[MAX_MEASUREMENTS];
|
||||
}MeasurandDoseOrRate_t;
|
||||
typedef struct
|
||||
{
|
||||
uint8_t Major;
|
||||
uint8_t Minor;
|
||||
uint8_t Patch;
|
||||
uint16_t Build;
|
||||
}VersionNumber_t;
|
||||
typedef struct MarkNumberTag
|
||||
{
|
||||
uint8_t Major;
|
||||
uint8_t Minor;
|
||||
uint8_t Revision;
|
||||
uint8_t Build;
|
||||
} MarkNumber_t;
|
||||
#define PART_NUM_LENGTH 10
|
||||
typedef uint8_t PartNumber_t[PART_NUM_LENGTH];
|
||||
#define PCB_PART_NUM_LENGTH 14
|
||||
typedef uint8_t PcbPartNumber_t[PCB_PART_NUM_LENGTH];
|
||||
#define FIRMWARE_PART_NUM_LENGTH 16
|
||||
typedef uint8_t FirmwarePartNumber_t[FIRMWARE_PART_NUM_LENGTH];
|
||||
#define MODEL_NAME_LENGTH 32
|
||||
typedef struct ModelNameTag
|
||||
{
|
||||
uint8_t Name[MODEL_NAME_LENGTH];
|
||||
} ModelName_t;
|
||||
#define CAL_PROCESS_LENGTH 12
|
||||
typedef struct CalProcessTag
|
||||
{
|
||||
uint8_t Process[CAL_PROCESS_LENGTH];
|
||||
} CalProcess_t;
|
||||
#define CAL_FACILITY_LENGTH 8
|
||||
typedef struct CalFacilityTag
|
||||
{
|
||||
uint8_t Name[CAL_FACILITY_LENGTH];
|
||||
} CalFacility_t;
|
||||
#define MAX_ID_STRING_LENGTH 64
|
||||
typedef struct IdStringTag
|
||||
{
|
||||
uint16_t IdType;
|
||||
uint16_t Length;
|
||||
uint8_t Utf8String[MAX_ID_STRING_LENGTH];
|
||||
} IdString_t;
|
||||
#define DB_ID_LENGTH 16
|
||||
typedef struct DbIdTag
|
||||
{
|
||||
uint8_t Id[DB_ID_LENGTH];
|
||||
} DatabaseId_t;
|
||||
#define MAX_GRAPHIC_WIDTH 112
|
||||
#define MAX_GRAPHIC_HEIGHT 24
|
||||
#define MAX_GRAPHIC_PIXELS (MAX_GRAPHIC_WIDTH * MAX_GRAPHIC_HEIGHT)
|
||||
#define MAX_GRAPHIC_ID 1
|
||||
#define MAX_GRAPHIC_BYTES ((MAX_GRAPHIC_PIXELS)/8)
|
||||
typedef struct GraphicSizeTag
|
||||
{
|
||||
uint16_t Id;
|
||||
uint16_t Height;
|
||||
uint16_t Width;
|
||||
} GraphicSize_t;
|
||||
typedef struct
|
||||
{
|
||||
GraphicSize_t Meta;
|
||||
uint16_t DataLength;
|
||||
uint8_t Data[MAX_GRAPHIC_BYTES];
|
||||
} GraphicBitmap_t;
|
||||
|
||||
enum class OpStatusFlags : uint32_t {
|
||||
EpdOn = 0x0001,
|
||||
EpdIssued = 0x0002,
|
||||
DetectorTestRequested = 0x0004,
|
||||
DetectorTestPassed = 0x0008,
|
||||
TelemetryOn = 0x0010,
|
||||
TelemetryConnected = 0x0020,
|
||||
CalibrationDue = 0x0040,
|
||||
CalibrationInProgress = 0x0080,
|
||||
GainAdjustable = 0x0100,
|
||||
GainAdjusted = 0x0200,
|
||||
ReducedRateOverrange = 0x0400,
|
||||
DoseWriteEnabled = 0x0800,
|
||||
ClearOnOnEnabled = 0x1000,
|
||||
Golden = 0x2000,
|
||||
ProtectedSession = 0x4000,
|
||||
//NotYetDefined = 0x8000,
|
||||
ResponderEnabled = 0x00010000,
|
||||
ResponderTriggered = 0x00020000,
|
||||
AlkalineFitted = 0x00040000,
|
||||
DeepSleep = 0x00080000,
|
||||
CovertMode = 0x00100000,
|
||||
PulsedModeEnabled = 0x00200000,
|
||||
PulsedModeActive = 0x00400000,
|
||||
PulsedModeIndustrial=0x00800000,
|
||||
};
|
||||
enum class FaultStatusFlags : uint32_t {
|
||||
NotInitialized = 0x0001,
|
||||
BadThreshold = 0x0002,
|
||||
BadSensitivities = 0x0004,
|
||||
DetectorTestFail = 0x0008,
|
||||
NotCalibrated = 0x0010,
|
||||
EepromFailure = 0x0020,
|
||||
ErrorLogged = 0x0040,
|
||||
EpdFaulty = 0x0080,
|
||||
TimeInvalid = 0x0100,
|
||||
EarlyCommsTermination = 0x0200,
|
||||
SounderFailure = 0x0400,
|
||||
ResetWhileIssued = 0x0800,
|
||||
};
|
||||
enum class AlarmStatusFlags : uint32_t {
|
||||
DoseWarning = 0x00000001,
|
||||
DoseAlarm = 0x00000002,
|
||||
DoseOverrange = 0x00000004,
|
||||
TotalDoseOverrange = 0x00000008,
|
||||
RateWarning = 0x00000010,
|
||||
RateAlarm = 0x00000020,
|
||||
RateOverrange = 0x00000040,
|
||||
PulseOverrange = 0x00000080,
|
||||
LatchedRateWarning = 0x00000100,
|
||||
LatchedRateAlarm = 0x00000200,
|
||||
LatchedRateOverrange = 0x00000400,
|
||||
LatchedPulseOverrange = 0x00000800,
|
||||
StayTimeExceeded = 0x00010000,
|
||||
ReturnForRead = 0x00020000,
|
||||
AbuseAlarm = 0x00040000,
|
||||
LowBattery = 0x00080000,
|
||||
TelemetryAlert = 0x00100000
|
||||
};
|
||||
enum class DoseAlarmFlags : uint32_t {
|
||||
DoseWarning = 0x0001,
|
||||
DoseAlarm = 0x0002,
|
||||
DoseOverrange = 0x0004,
|
||||
TotalDoseOverrange = 0x0008,
|
||||
RateWarning = 0x0010,
|
||||
RateAlarm = 0x0020,
|
||||
RateOverrange = 0x0040,
|
||||
LatchedRateWarning = 0x0100,
|
||||
LatchedRateAlarm = 0x0200,
|
||||
LatchedRateOverrange = 0x0400
|
||||
};
|
||||
enum class Mk2StatusFlags : uint32_t {
|
||||
ADSIssued = 0x0001,
|
||||
OneSecCountsProcessing = 0x0002,
|
||||
RadioBatteryLow = 0x0004
|
||||
};
|
||||
typedef struct
|
||||
{
|
||||
uint16_t Id;
|
||||
DoseAlarmFlags Status;
|
||||
}Mk3DoseStatus_t;
|
||||
typedef struct
|
||||
{
|
||||
OpStatusFlags OperatingStatus;
|
||||
FaultStatusFlags FaultStatus;
|
||||
AlarmStatusFlags AlarmStatus;
|
||||
uint16_t IssueCount;
|
||||
uint16_t FaultCode;
|
||||
uint32_t OtherBits;
|
||||
uint16_t NumberDoseAlarmWords;
|
||||
Mk3DoseStatus_t DoseAlarms[MAX_MEASUREMENTS];
|
||||
}StatusData_t;
|
||||
enum class QualityFlags
|
||||
{
|
||||
DoseOverrange = 0x0001,
|
||||
RateOverrange = 0x0002,
|
||||
AbuseWarning = 0x0004,
|
||||
CrcFailure = 0x0008,
|
||||
CounterOverrange = 0x0010,
|
||||
DetectorFail = 0x0040
|
||||
};
|
||||
typedef struct
|
||||
{
|
||||
uint16_t PowerCycles;
|
||||
uint16_t Knocks;
|
||||
QualityFlags Flags;
|
||||
}Mk3QualityData_t;
|
||||
typedef struct
|
||||
{
|
||||
uint16_t Id;
|
||||
float Value;
|
||||
}Mk3AlarmThreshold_t;
|
||||
typedef struct
|
||||
{
|
||||
uint16_t MeasId;
|
||||
uint16_t NumberThresholds;
|
||||
Mk3AlarmThreshold_t Thresholds[MAX_ALM_THRESHOLDS];
|
||||
}Mk3AlarmThresholds_t;
|
||||
typedef struct
|
||||
{
|
||||
uint16_t MeasId;
|
||||
std::vector<ThresholdId> Thresholds;
|
||||
}Mk3AlarmThresholdsRequest_t;
|
||||
typedef struct
|
||||
{
|
||||
uint16_t MeasId;
|
||||
uint16_t Value;
|
||||
}Mk3RatePercentage_t;
|
||||
typedef struct
|
||||
{
|
||||
uint16_t MeasId;
|
||||
uint16_t AlarmFlags;
|
||||
float Dose;
|
||||
}Mk3SnapshotDoseAndFlags_t;
|
||||
typedef struct
|
||||
{
|
||||
uint16_t SnapshotNumber;
|
||||
uint16_t IssueCount;
|
||||
uint32_t StartTime;
|
||||
uint32_t EndTime;
|
||||
DatabaseId_t WearerDbId;
|
||||
DatabaseId_t TaskDbId;
|
||||
uint32_t OperatingStatus;
|
||||
uint32_t FaultStatus;
|
||||
uint32_t AlarmStatus;
|
||||
uint16_t NumberOfMeasurands;
|
||||
Mk3SnapshotDoseAndFlags_t DoseAndFlags[MAX_MEASUREMENTS];
|
||||
}Mk3SnapshotSummary_t;
|
||||
typedef struct
|
||||
{
|
||||
uint16_t MeasId;
|
||||
uint16_t AlarmFlags;
|
||||
float Dose;
|
||||
float TriggeredDose;
|
||||
float TotalDose;
|
||||
float PeakRate;
|
||||
uint32_t PeakRateTime;
|
||||
}Mk3SnapshotMeasurement_t;
|
||||
typedef struct
|
||||
{
|
||||
uint16_t SnapshotNumber;
|
||||
uint16_t NumberOfMeasurands;
|
||||
Mk3SnapshotMeasurement_t DoseAndFlags[MAX_MEASUREMENTS];
|
||||
}Mk3SnapshotMeasurements_t;
|
||||
typedef struct
|
||||
{
|
||||
uint16_t CounterId;
|
||||
uint32_t StartCount;
|
||||
uint32_t EndCount;
|
||||
}Mk3SnapshotCount_t;
|
||||
typedef struct
|
||||
{
|
||||
uint16_t SnapshotNumber;
|
||||
uint16_t NumberOfCounters;
|
||||
uint32_t StartTime;
|
||||
uint32_t EndTime;
|
||||
Mk3SnapshotCount_t Counters[MAX_COUNTERS];
|
||||
}Mk3SnapshotCounters_t;
|
||||
typedef struct
|
||||
{
|
||||
float DoseWarning;
|
||||
float DoseAlarm;
|
||||
float RateWarning;
|
||||
float RateAlarm;
|
||||
uint16_t MeasId;
|
||||
}Mk3SnapshotAlarmThreshold_t;
|
||||
typedef struct
|
||||
{
|
||||
uint16_t SnapshotNumber;
|
||||
uint16_t NumberOfMeasurands;
|
||||
Mk3SnapshotAlarmThreshold_t Thresholds[MAX_MEASUREMENTS];
|
||||
}Mk3SnapshotAlarmThresholds_t;
|
||||
// ****************
|
||||
// Access Level
|
||||
//
|
||||
#define COMMAND_ID_MAP_SIZE 64
|
||||
#define ENCRYPT_IV_SIZE 16
|
||||
#define ENCRYPT_KEY_SIZE 32
|
||||
#define ENCRYPT_CIPHER_SIZE 16
|
||||
typedef uint8_t EncryptionKey[ENCRYPT_KEY_SIZE];
|
||||
typedef uint8_t EncryptionText[ENCRYPT_CIPHER_SIZE];
|
||||
typedef uint8_t PlainText[ENCRYPT_CIPHER_SIZE];
|
||||
enum class AccessLevel_t : uint8_t
|
||||
{
|
||||
Open = 0,
|
||||
Admin = 1,
|
||||
Regulator = 2,
|
||||
Manufacturer = 3
|
||||
};
|
||||
typedef struct SetAccessLevelRqTag
|
||||
{
|
||||
bool Granted;
|
||||
EncryptionText Code;
|
||||
EncryptionKey Key;
|
||||
AccessLevel_t Level;
|
||||
} SetAccessLevelRq_t;
|
||||
typedef struct SetAccessPasswordRqTag
|
||||
{
|
||||
EncryptionKey Key;
|
||||
AccessLevel_t Level;
|
||||
} SetAccessPasswordRq_t;
|
||||
typedef struct CommandIdPermissionsTag
|
||||
{
|
||||
AccessLevel_t Level;
|
||||
uint8_t CommandIdPermissions[COMMAND_ID_MAP_SIZE];
|
||||
}CommandIdPermissions_t;
|
||||
// ****************
|
||||
// UI Config
|
||||
//
|
||||
#define MAX_QUICK_ACCESS_DISPLAYS 6 /*5 + default display*/
|
||||
typedef struct QuickAccessDisplayTag
|
||||
{
|
||||
uint8_t Position;
|
||||
uint8_t DisplayId;
|
||||
}QuickAccessDisplay_t;
|
||||
typedef struct DisplayEnablesTag
|
||||
{
|
||||
uint8_t MenuId;
|
||||
uint16_t EnableMask;
|
||||
uint16_t Enables;
|
||||
}DisplayAttributeMap_t;
|
||||
#define MAX_MENUS 15
|
||||
typedef struct DisplayEnablePrivilegesTag
|
||||
{
|
||||
AccessLevel_t Level;
|
||||
uint8_t NumMenus;
|
||||
uint16_t Privileges[MAX_MENUS];
|
||||
} DisplayEnablePrivileges_t;
|
||||
enum class DisplayCapability_t :uint8_t
|
||||
{
|
||||
DefaultDisplay = 1,
|
||||
QuickDisplay = 2,
|
||||
};
|
||||
enum class OffModeDisplayId_t : uint8_t
|
||||
{
|
||||
Undefined = 0,
|
||||
OffText = 1,
|
||||
CalDueDate = 2,
|
||||
UserBitmap = 3,
|
||||
Manufacturer_PartnerLogo = 4,
|
||||
CustomerLogo = 5,
|
||||
ModelVersion=6
|
||||
};
|
||||
enum class AlarmIds : uint16_t
|
||||
{
|
||||
DoseAlarm = 0,
|
||||
DoseWarning = 1,
|
||||
RateWarning = 2,
|
||||
RateAlarm = 3,
|
||||
DoseOrRateOverRange = 4,
|
||||
FailureAlarm = 5,
|
||||
AbuseAlarm = 6,
|
||||
BatteryLow = 7,
|
||||
ReturnForRead = 8
|
||||
};
|
||||
#define MAX_OTHER_ALARMS 5
|
||||
typedef struct AlarmConfigTag
|
||||
{
|
||||
AlarmIds AlarmId;
|
||||
uint16_t MeasurandId;
|
||||
uint16_t AlarmConfigMask;
|
||||
uint16_t AlarmConfigBits;
|
||||
uint16_t Duration;
|
||||
}AlarmConfig_t;
|
||||
typedef struct AlarmConfigIdTag
|
||||
{
|
||||
AlarmIds AlarmId;
|
||||
uint16_t MeasurandId;
|
||||
}AlarmConfigId;
|
||||
// ****************
|
||||
// Telemetry
|
||||
//
|
||||
typedef struct TeleAdvConfigTag
|
||||
{
|
||||
uint8_t operatingMode;
|
||||
uint16_t undirectedInterval;
|
||||
uint16_t directedInterval;
|
||||
uint16_t directedTimeout;
|
||||
}TeleAdvConfig_t;
|
||||
typedef struct TeleCxnConfigTag
|
||||
{
|
||||
uint16_t minInterval;
|
||||
uint16_t maxInterval;
|
||||
uint16_t slaveLatency;
|
||||
uint16_t supervisoryTimeout;
|
||||
}TeleCxnConfig_t;
|
||||
// ****************
|
||||
// Debug Registers
|
||||
//
|
||||
typedef struct DebugRegisterValueTag
|
||||
{
|
||||
uint8_t registerId;
|
||||
uint32_t value;
|
||||
}DebugRegisterValue_t;
|
||||
// ****************
|
||||
// Battery Low Thesholds
|
||||
//
|
||||
typedef struct BatteryLowThresholdTag
|
||||
{
|
||||
uint8_t batteryType;
|
||||
uint16_t mv;
|
||||
}BatteryLowThreshold_t;
|
||||
// ****************
|
||||
// Battery Critical Timing
|
||||
//
|
||||
typedef struct BatteryCriticalTimingTag
|
||||
{
|
||||
uint16_t timeToCritical;
|
||||
uint16_t timeToShutdown;
|
||||
}BatteryCriticalTiming_t;
|
||||
// ****************
|
||||
// Battery Critical Timing
|
||||
//
|
||||
typedef struct MeasuredVoltagesTag
|
||||
{
|
||||
uint16_t vbat0;
|
||||
uint16_t vbat1;
|
||||
uint16_t vcpu;
|
||||
}MeasuredVoltages_t;
|
||||
#pragma pack (pop)
|
||||
#endif
|
||||
Binary file not shown.
Binary file not shown.
|
|
@ -1,269 +0,0 @@
|
|||
// TestMK3.cpp : This file contains the 'main' function. Program execution begins and ends there.
|
||||
//
|
||||
#include <wtypes.h>
|
||||
#include <synchapi.h>
|
||||
#include <chrono>
|
||||
#include <iostream>
|
||||
#include "EpdCommon.h"
|
||||
#include "Epd3.h"
|
||||
|
||||
#include "TimeFunctions.h"
|
||||
#include <cstdio> // if not already included
|
||||
|
||||
|
||||
|
||||
|
||||
char comPort[] = "COM3";
|
||||
CommsHandle epdComsHandle;
|
||||
uint32_t EpdID;
|
||||
EpdGeneration EpdGen;
|
||||
DiscoveryId Epd;
|
||||
int DeviceCount;
|
||||
|
||||
HANDLE Ev1 = INVALID_HANDLE_VALUE;
|
||||
CompletionToken token;
|
||||
StatusData_t status;
|
||||
MeasValue_t doses[4];
|
||||
uint8_t numDoses;
|
||||
uint32_t utc,utc2;
|
||||
uint8_t EC[]{ 0xE7 ,0xD3 ,0xE7 ,0x69 ,0xF3 ,0xF5 ,0x93 ,0xDA ,0xDC ,0xB8 ,0x63 ,0x4C ,0xC5 ,0xB0 ,0x9F ,0xC9 ,0x0D ,0xD3 ,0xA6 ,0x1C ,0x4A ,0x06 ,0xA7 ,0x9C ,0xB0 ,0x92 ,0x36 ,0x62 ,0xFE ,0x6F ,0xAE ,0x6B };
|
||||
|
||||
|
||||
|
||||
void WINAPI discovery2(CommsHandle hComms, DiscoveryId const discovered[], int32_t count)
|
||||
{
|
||||
EpdID = 0;
|
||||
DeviceCount = count;
|
||||
std::cout << "Discovered " << count << "\n";
|
||||
if (count > 0) {
|
||||
|
||||
EpdID = discovered[0].Id;
|
||||
EpdGen = discovered[0].Gen;
|
||||
memcpy(&Epd, &discovered[0], sizeof(DiscoveryId));
|
||||
}
|
||||
else {
|
||||
EpdID = 0;EpdGen = EpdGeneration::None;
|
||||
memset(&Epd, 0, sizeof(DiscoveryId));
|
||||
}
|
||||
SetEvent(Ev1);
|
||||
}
|
||||
|
||||
|
||||
void WINAPI discovery(CommsHandle hComms, DiscoveryId const discovered[], int32_t count)
|
||||
{
|
||||
EpdID = 0;
|
||||
DeviceCount = count;
|
||||
if (count > 0) {
|
||||
EpdID = discovered[0].Id;
|
||||
EpdGen = discovered[0].Gen;
|
||||
}
|
||||
memcpy(&Epd,&discovered[0],sizeof(DiscoveryId));
|
||||
SetEvent(Ev1);
|
||||
}
|
||||
|
||||
void WINAPI completion(CommsHandle hComms, CompletionToken token)
|
||||
{
|
||||
SetEvent(Ev1);
|
||||
}
|
||||
|
||||
|
||||
void ReadTime()
|
||||
{
|
||||
DWORD r;
|
||||
DWORD EpdClock;
|
||||
utc = 0;
|
||||
token = BeginReadRTC(epdComsHandle, nullptr);
|
||||
r = Commit(epdComsHandle);
|
||||
if (!r)
|
||||
r = EndReadRTC(epdComsHandle, token, &utc); //EpdClock for MK2
|
||||
EpdClock = utc;
|
||||
utc2 = TimeFunctions::NowToEpdTime(false);
|
||||
|
||||
}
|
||||
|
||||
int SetTime() //Only R3
|
||||
{
|
||||
int r = 0;
|
||||
if (Epd.Gen == EpdGeneration::Mk3)
|
||||
{
|
||||
|
||||
utc = TimeFunctions::NowToEpdTime(false);
|
||||
token = BeginWriteRTC_R3(epdComsHandle, utc, nullptr);
|
||||
r = Commit(epdComsHandle);
|
||||
if (!r)
|
||||
r = EndWriteRTC_R3(epdComsHandle, token); //EpdClock for MK2
|
||||
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
int startCom()
|
||||
{
|
||||
epdComsHandle = CreateReaderInterface();
|
||||
int r = OpenReader(epdComsHandle, comPort);
|
||||
Ev1 = CreateEvent(
|
||||
NULL, // default security attributes
|
||||
TRUE, // manual-reset event
|
||||
FALSE, // initial state is nonsignaled
|
||||
TEXT("WriteEvent") // object name
|
||||
);
|
||||
uint32_t ms1, ms, slots; bool state = true;
|
||||
GetResponseTimeout(epdComsHandle, &ms1);
|
||||
r = GetMultipleDiscoveryMode(epdComsHandle, &state);
|
||||
r = GetDiscoveryTimeslots(epdComsHandle, &slots);
|
||||
r = GetDiscoveryTimeout(epdComsHandle, &ms);
|
||||
|
||||
SetDiscoveryCacheTimeout(epdComsHandle, 2000);
|
||||
SetResponseTimeout(epdComsHandle, 500);
|
||||
return r;
|
||||
}
|
||||
|
||||
void endCom()
|
||||
{
|
||||
CloseHandle(Ev1);
|
||||
Ev1 = INVALID_HANDLE_VALUE;
|
||||
int r = CloseReader(epdComsHandle);
|
||||
r = DestroyReaderInterface(epdComsHandle);
|
||||
}
|
||||
|
||||
//void detectepd()
|
||||
//{
|
||||
// using std::chrono::high_resolution_clock;
|
||||
// using std::chrono::duration_cast;
|
||||
// using std::chrono::duration;
|
||||
// using std::chrono::milliseconds;
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// int r,r2;
|
||||
// int tries = 5; DeviceCount = 0;
|
||||
// ResetEvent(Ev1);
|
||||
//
|
||||
// while (tries-- > 0 && DeviceCount == 0)
|
||||
// {
|
||||
// auto t1 = high_resolution_clock::now();
|
||||
// //memset(DevceIDs, 0, sizeof(DeviceIDs));
|
||||
// r = StartDiscovery(epdComsHandle, discovery2);
|
||||
//
|
||||
// if (r == 0) {
|
||||
// r = WaitForSingleObject(Ev1, 10000);
|
||||
//
|
||||
// std::cout << "EPD " << EpdID << "\n";
|
||||
// }
|
||||
// else {
|
||||
// std::cout << "StartDiscovery failed " << r << "\n";
|
||||
// }
|
||||
// r2 = StopDiscovery(epdComsHandle);
|
||||
// auto t2 = high_resolution_clock::now();
|
||||
// auto elapsed = duration_cast<milliseconds>(t2 - t1);
|
||||
// std::cout << "Elapsed time: " << elapsed.count() << " ms\n";
|
||||
// }
|
||||
//
|
||||
//
|
||||
//
|
||||
// //std::cout << "wacht effen!\n";
|
||||
// //r = WaitForSingleObject(Ev1, 10000); // no time-out interval
|
||||
//
|
||||
// std::cout << "ok! r=" << r << ", r2=" << r2 << "\n";
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//}
|
||||
|
||||
void GetEPD()
|
||||
{
|
||||
//epdComsHandle = CreateReaderInterface();
|
||||
//int r = OpenReader(epdComsHandle, comPort);
|
||||
Ev1 = CreateEvent(
|
||||
NULL, // default security attributes
|
||||
TRUE, // manual-reset event
|
||||
FALSE, // initial state is nonsignaled
|
||||
TEXT("WriteEvent") // object name
|
||||
);
|
||||
if (!Ev1) return;
|
||||
|
||||
int r;
|
||||
int tries = 5; DeviceCount = 0;
|
||||
while (tries-- > 0 && DeviceCount == 0)
|
||||
{
|
||||
//memset(DevceIDs, 0, sizeof(DeviceIDs));
|
||||
r = StartDiscovery(epdComsHandle, discovery);
|
||||
if (r == 0)
|
||||
r = WaitForSingleObject(Ev1, 10000);
|
||||
}
|
||||
|
||||
|
||||
std::cout << "wacht discover!\n";
|
||||
r = WaitForSingleObject(Ev1, 10000); // no time-out interval
|
||||
|
||||
std::cout << "ok! connect\n";
|
||||
|
||||
|
||||
Sleep(1000);
|
||||
|
||||
|
||||
r = Connect(epdComsHandle,Epd, true);
|
||||
// -9 = r_OperationTimeout
|
||||
std::cout << "Connect rv " << r << "\n";
|
||||
|
||||
|
||||
|
||||
Sleep(1000);
|
||||
|
||||
|
||||
|
||||
std::cout << "get status\n";
|
||||
token = BeginReadStatus(epdComsHandle, completion);
|
||||
r = Commit(epdComsHandle);
|
||||
r = WaitForSingleObject(Ev1, 1000); // no time-out interval
|
||||
r = EndReadStatus(epdComsHandle, token, &status);
|
||||
std::cout << "got status "<<r<<"\n";
|
||||
|
||||
//ReadTime();
|
||||
//SetTime();
|
||||
//ReadTime();
|
||||
|
||||
////r = Connect(epdComsHandle, Epd, true);
|
||||
//token = BeginWriteAccessLevel(epdComsHandle, AccessLevel_t::Admin, EC, 32, nullptr);
|
||||
//r = Commit(epdComsHandle);
|
||||
////-7 r_InvalidState
|
||||
//r = EndWriteAccessLevel(epdComsHandle, token);
|
||||
//std::cout << "EndWriteAccessLevel rv " << r << "\n";
|
||||
|
||||
//numDoses = 0; utc = 0;
|
||||
//ResetEvent(Ev1);
|
||||
////token = BeginReadDoses(epdComsHandle, new uint8_t[]{ 0, 1 }, 2 , completion);
|
||||
//token = BeginReadDoses(epdComsHandle, nullptr, 0 , completion);
|
||||
//r = Commit(epdComsHandle);
|
||||
//r = WaitForSingleObject(Ev1, 10000); // no time-out interval
|
||||
//r = EndReadDoses(epdComsHandle, token, doses, 2, &numDoses, &utc);
|
||||
//std::cout << "got doses " << r << "\n";
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
startCom();
|
||||
//while (true)
|
||||
//detectepd();
|
||||
|
||||
GetEPD();
|
||||
endCom();
|
||||
(void)getchar();
|
||||
}
|
||||
|
||||
// Run program: Ctrl + F5 or Debug > Start Without Debugging menu
|
||||
// Debug program: F5 or Debug > Start Debugging menu
|
||||
//C:\Program Files (x86)\Thermo Scientific\Unmanaged HtmlFiles
|
||||
//
|
||||
// Tips for Getting Started:
|
||||
// 1. Use the Solution Explorer window to add/manage files
|
||||
// 2. Use the Team Explorer window to connect to source control
|
||||
// 3. Use the Output window to see build output and other messages
|
||||
// 4. Use the Error List window to view errors
|
||||
// 5. Go to Project > Add New Item to create new code files, or Project > Add Existing Item to add existing code files to the project
|
||||
// 6. In the future, to open this project again, go to File > Open > Project and select the .sln file
|
||||
|
|
@ -1,165 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>16.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{5af7d0d5-9a6d-4c41-8466-3dfba4f94d84}</ProjectGuid>
|
||||
<RootNamespace>TestMK3</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v145</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>$(ProjectDir)reader32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<DelayLoadDLLs>
|
||||
</DelayLoadDLLs>
|
||||
<ModuleDefinitionFile>
|
||||
</ModuleDefinitionFile>
|
||||
<AdditionalLibraryDirectories>$(MSBuildProjectDirectory);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>%(AdditionalDependencies);reader32.lib</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="TestMK3.cpp" />
|
||||
<ClCompile Include="TimeFunctions.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="CommonEpdTypes.h" />
|
||||
<ClInclude Include="Epd2.h" />
|
||||
<ClInclude Include="Epd3.h" />
|
||||
<ClInclude Include="EpdCommon.h" />
|
||||
<ClInclude Include="Mk3Types.h" />
|
||||
<ClInclude Include="TimeFunctions.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="TestMK3.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="TimeFunctions.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="CommonEpdTypes.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Epd2.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Epd3.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="EpdCommon.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Mk3Types.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="TimeFunctions.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
@ -1,97 +0,0 @@
|
|||
|
||||
#include "TimeFunctions.h"
|
||||
#pragma unmanaged
|
||||
|
||||
TimeFunctions::TimeFunctions()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
UINT32 FileTime_to_POSIX(FILETIME ft)
|
||||
{
|
||||
// takes the last modified date
|
||||
LARGE_INTEGER date, adjust;
|
||||
date.HighPart = ft.dwHighDateTime;
|
||||
date.LowPart = ft.dwLowDateTime;
|
||||
// 100-nanoseconds = milliseconds * 10000
|
||||
adjust.QuadPart = 11644473600000 * 10000;
|
||||
// removes the diff between 1970 and 1601
|
||||
date.QuadPart -= adjust.QuadPart;
|
||||
// converts back from 100-nanoseconds to seconds
|
||||
return (UINT32)(date.QuadPart / 10000000);
|
||||
}
|
||||
|
||||
UINT32 UnixTimeNow() {
|
||||
FILETIME ft;
|
||||
GetSystemTimeAsFileTime(&ft);
|
||||
return FileTime_to_POSIX(ft);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Filetime is 100nS since 1601 01 01 UTC Unix = seconds since 1970
|
||||
/// </summary>
|
||||
/// <param name="t"></param>
|
||||
/// <param name="pft"></param>
|
||||
void TimeFunctions::UnixTimeToFileTime(time_t t, LPFILETIME pft)
|
||||
{
|
||||
ULONG64 ll = ((ULONG64)t * (ULONG64)10000000) + (ULONG64)116444736000000000;
|
||||
pft->dwLowDateTime = (DWORD)ll;
|
||||
pft->dwHighDateTime = ll >> 32;
|
||||
}
|
||||
|
||||
void TimeFunctions::UnixTimeToSystemTime(time_t t, LPSYSTEMTIME pst)
|
||||
{
|
||||
FILETIME ft;
|
||||
UnixTimeToFileTime(t, &ft);
|
||||
FileTimeToSystemTime(&ft, pst);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// converts MK2/MK3 time to FileTime
|
||||
/// </summary>
|
||||
/// <param name="epdTime">UTC</param>
|
||||
/// <param name="pft">UTC</param>
|
||||
/// <param name="isMK2"></param>
|
||||
void TimeFunctions::EpdTimeToFileTime(UINT32 epdTime, LPFILETIME epdFileTime, bool isMK2) //MK3
|
||||
{
|
||||
ULONG64 ll = (ULONG64)epdTime * (ULONG64)10000000;
|
||||
if (isMK2) ll += (ULONG64) 116444736000000000; else ll += (ULONG64)125911584000000000; // 2000 base - 1601-1-1 (FT) Base
|
||||
epdFileTime->dwLowDateTime = (DWORD)(ll & 0xffffffff);
|
||||
epdFileTime->dwHighDateTime = ll >> 32;
|
||||
}
|
||||
|
||||
void TimeFunctions::FileTimeToEpdTime(FILETIME pft, INT32* t, bool isMK2)
|
||||
{
|
||||
ULONG64 offset;
|
||||
if (isMK2) offset = (ULONG64)116444736000000000; else offset = (ULONG64)125911584000000000;
|
||||
LONGLONG ll = ((((LONGLONG)pft.dwHighDateTime << 32) + pft.dwLowDateTime) - offset) / 10000000;
|
||||
*t = (DWORD)ll;
|
||||
}
|
||||
|
||||
UINT32 TimeFunctions::NowToEpdTime(bool isMK2)
|
||||
{
|
||||
ULONG64 offset;
|
||||
if (isMK2) offset = (ULONG64)116444736000000000; else offset = (ULONG64)125911584000000000;
|
||||
SYSTEMTIME t;
|
||||
GetSystemTime(&t); // is UTC !!
|
||||
FILETIME ft;
|
||||
SystemTimeToFileTime((const SYSTEMTIME*)&t, &ft);
|
||||
LONGLONG ll = ((((LONGLONG)ft.dwHighDateTime << 32U) + ft.dwLowDateTime) - offset) / 10000000;
|
||||
return (DWORD)ll;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void TimeFunctions::EPD2PeakTimeToFiletime(DWORD EpdClock, DWORD EpdPeakTime, FILETIME* PeakFileTime) {
|
||||
if (EpdPeakTime != 0xCDCDCDCD) {
|
||||
UINT32 tm = EpdClock - EpdPeakTime;
|
||||
GetSystemTimeAsFileTime(&lu.FT);
|
||||
lu.LL -= UInt32x32To64(tm, 10000000);
|
||||
*PeakFileTime = lu.FT;
|
||||
} else
|
||||
{
|
||||
(*PeakFileTime).dwLowDateTime = (*PeakFileTime).dwHighDateTime = 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
#pragma once
|
||||
#include <windows.h>
|
||||
#include <time.h>
|
||||
|
||||
class TimeFunctions
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
TimeFunctions();
|
||||
static void EpdTimeToFileTime(UINT32 epdTime, LPFILETIME epdFileTime, bool isMK2);
|
||||
void FileTimeToEpdTime(FILETIME pft, INT32* t, bool isMK2);
|
||||
static UINT32 NowToEpdTime(bool isMK2);
|
||||
static void UnixTimeToFileTime(time_t t, LPFILETIME pft);
|
||||
static void UnixTimeToSystemTime(time_t t, LPSYSTEMTIME pst);
|
||||
static void EPD2PeakTimeToFiletime(DWORD EpdClock, DWORD EpdPeakTime, FILETIME* PeakFileTime);
|
||||
};
|
||||
|
||||
static union {
|
||||
FILETIME FT; unsigned long long LL;
|
||||
} lu;
|
||||
static SYSTEMTIME ST;
|
||||
UINT32 FileTime_to_POSIX(FILETIME ft);
|
||||
UINT32 UnixTimeNow();
|
||||
Binary file not shown.
11630
TestMK3/x.txt
11630
TestMK3/x.txt
File diff suppressed because it is too large
Load diff
11630
TestMK3/x.yxy
11630
TestMK3/x.yxy
File diff suppressed because it is too large
Load diff
|
|
@ -1,85 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|ARM">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|ARM">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|ARM64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>ARM64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|ARM64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>ARM64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x86">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x86</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x86">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x86</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{ae34dac7-9f61-460f-80c1-220009737411}</ProjectGuid>
|
||||
<Keyword>Linux</Keyword>
|
||||
<RootNamespace>TestUSBreader</RootNamespace>
|
||||
<MinimumVisualStudioVersion>15.0</MinimumVisualStudioVersion>
|
||||
<ApplicationType>Linux</ApplicationType>
|
||||
<ApplicationTypeRevision>1.0</ApplicationTypeRevision>
|
||||
<TargetLinuxPlatform>Generic</TargetLinuxPlatform>
|
||||
<LinuxProjectType>{D51BCBC9-82E9-4017-911E-C93873C4EA2B}</LinuxProjectType>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x86'" Label="Configuration">
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x86'" Label="Configuration">
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings" />
|
||||
<ImportGroup Label="Shared" />
|
||||
<ImportGroup Label="PropertySheets" />
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<ItemGroup>
|
||||
<ClCompile Include="main.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
</ItemGroup>
|
||||
<ItemDefinitionGroup />
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets" />
|
||||
</Project>
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
#include <cstdio>
|
||||
|
||||
int main()
|
||||
{
|
||||
printf("hello from %s!\n", "TestUSBreader");
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
|
||||
</startup>
|
||||
</configuration>
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Testing
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
//2846034226
|
||||
TimeSpan ts0 = TimeSpan.FromSeconds(2846034226);
|
||||
|
||||
DateTime d1 = new DateTime(1601, 1, 1,0,0,0);
|
||||
DateTime d2 = new DateTime(1970, 1, 1);
|
||||
DateTime d3 = new DateTime(2000, 1, 1,0,0,0);
|
||||
TimeSpan ts1 = d2.Subtract(d1);
|
||||
TimeSpan ts2 = d3.Subtract(d1);
|
||||
|
||||
System.Diagnostics.Debug.WriteLine($" 1970 {ts1.TotalSeconds}");
|
||||
System.Diagnostics.Debug.WriteLine($" 2000 {ts2.TotalSeconds}");
|
||||
//125911584000000000
|
||||
|
||||
//DateTime d4 = new DateTime(2022, 02, 19,2,49,38);
|
||||
DateTime d4 = new DateTime(2000, 1, 1);
|
||||
DateTime d5 = d4.AddSeconds(703076180);
|
||||
DateTime d6 = d4.AddSeconds(-284603422);
|
||||
DateTime d7 = d4.AddSeconds(-28460342);
|
||||
DateTime d8 = d4.AddSeconds(-2846034);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Testing")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Testing")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2022")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("814e327a-4148-44d8-9eb0-a4190a454540")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{814E327A-4148-44D8-9EB0-A4190A454540}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>Testing</RootNamespace>
|
||||
<AssemblyName>Testing</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
Loading…
Add table
Reference in a new issue