From 70596acbbe766045c95f64a65b411d4cd7584918 Mon Sep 17 00:00:00 2001 From: Justin Berger Date: Wed, 28 Mar 2018 16:34:33 -0600 Subject: Slight refactoring --- bindings/cs/.gitignore | 3 + bindings/cs/LibSurviveBinding.sln | 25 ++++++++ bindings/cs/LibSurviveBinding/Binding.cs | 33 ++++++++++ bindings/cs/LibSurviveBinding/Config_entry.cs | 31 +++++++++ .../cs/LibSurviveBinding/LibSurviveBinding.csproj | 18 ++++++ bindings/cs/LibSurviveBinding/LightcapElement.cs | 6 ++ bindings/cs/LibSurviveBinding/Program.cs | 62 ++++++++++++++++++ bindings/cs/LibSurviveBinding/SurviveContext.cs | 44 +++++++++++++ bindings/cs/LibSurviveBinding/SurviveObject.cs | 6 ++ bindings/cs/LibSurviveBinding/SurvivePose.cs | 6 ++ bindings/cs/LibSurviveBinding/config_group.cs | 14 ++++ csharp-binding/LibSurviveBinding.sln | 25 -------- csharp-binding/LibSurviveBinding/Binding.cs | 33 ---------- csharp-binding/LibSurviveBinding/Config_entry.cs | 31 --------- .../LibSurviveBinding/LibSurviveBinding.csproj | 14 ---- .../LibSurviveBinding/LightcapElement.cs | 6 -- csharp-binding/LibSurviveBinding/Program.cs | 71 --------------------- csharp-binding/LibSurviveBinding/SurviveContext.cs | 44 ------------- csharp-binding/LibSurviveBinding/SurviveObject.cs | 6 -- csharp-binding/LibSurviveBinding/SurvivePose.cs | 6 -- .../bin/Debug/netcoreapp2.0/LibSurviveBinding.dll | Bin 8192 -> 0 bytes .../bin/Debug/netcoreapp2.0/LibSurviveBinding.pdb | Bin 1044 -> 0 bytes .../bin/Debug/netcoreapp2.0/libsurvive.dll | Bin 365056 -> 0 bytes csharp-binding/LibSurviveBinding/config_group.cs | 14 ---- csharp-binding/LibSurviveBinding/libsurvive.dll | Bin 365056 -> 0 bytes .../LibSurviveBinding.AssemblyInfo.cs | 23 ------- .../LibSurviveBinding.AssemblyInfoInputs.cache | 1 - ...ibSurviveBinding.csproj.CoreCompileInputs.cache | 1 - .../LibSurviveBinding.csproj.FileListAbsolute.txt | 12 ---- ...iveBinding.csprojResolveAssemblyReference.cache | Bin 480497 -> 0 bytes .../obj/Debug/netcoreapp2.0/LibSurviveBinding.dll | Bin 8192 -> 0 bytes .../obj/Debug/netcoreapp2.0/LibSurviveBinding.pdb | Bin 1044 -> 0 bytes .../obj/LibSurviveBinding.csproj.nuget.cache | 5 -- .../obj/LibSurviveBinding.csproj.nuget.g.props | 18 ------ .../obj/LibSurviveBinding.csproj.nuget.g.targets | 10 --- 35 files changed, 248 insertions(+), 320 deletions(-) create mode 100644 bindings/cs/.gitignore create mode 100644 bindings/cs/LibSurviveBinding.sln create mode 100644 bindings/cs/LibSurviveBinding/Binding.cs create mode 100644 bindings/cs/LibSurviveBinding/Config_entry.cs create mode 100644 bindings/cs/LibSurviveBinding/LibSurviveBinding.csproj create mode 100644 bindings/cs/LibSurviveBinding/LightcapElement.cs create mode 100644 bindings/cs/LibSurviveBinding/Program.cs create mode 100644 bindings/cs/LibSurviveBinding/SurviveContext.cs create mode 100644 bindings/cs/LibSurviveBinding/SurviveObject.cs create mode 100644 bindings/cs/LibSurviveBinding/SurvivePose.cs create mode 100644 bindings/cs/LibSurviveBinding/config_group.cs delete mode 100644 csharp-binding/LibSurviveBinding.sln delete mode 100644 csharp-binding/LibSurviveBinding/Binding.cs delete mode 100644 csharp-binding/LibSurviveBinding/Config_entry.cs delete mode 100644 csharp-binding/LibSurviveBinding/LibSurviveBinding.csproj delete mode 100644 csharp-binding/LibSurviveBinding/LightcapElement.cs delete mode 100644 csharp-binding/LibSurviveBinding/Program.cs delete mode 100644 csharp-binding/LibSurviveBinding/SurviveContext.cs delete mode 100644 csharp-binding/LibSurviveBinding/SurviveObject.cs delete mode 100644 csharp-binding/LibSurviveBinding/SurvivePose.cs delete mode 100644 csharp-binding/LibSurviveBinding/bin/Debug/netcoreapp2.0/LibSurviveBinding.dll delete mode 100644 csharp-binding/LibSurviveBinding/bin/Debug/netcoreapp2.0/LibSurviveBinding.pdb delete mode 100644 csharp-binding/LibSurviveBinding/bin/Debug/netcoreapp2.0/libsurvive.dll delete mode 100644 csharp-binding/LibSurviveBinding/config_group.cs delete mode 100644 csharp-binding/LibSurviveBinding/libsurvive.dll delete mode 100644 csharp-binding/LibSurviveBinding/obj/Debug/netcoreapp2.0/LibSurviveBinding.AssemblyInfo.cs delete mode 100644 csharp-binding/LibSurviveBinding/obj/Debug/netcoreapp2.0/LibSurviveBinding.AssemblyInfoInputs.cache delete mode 100644 csharp-binding/LibSurviveBinding/obj/Debug/netcoreapp2.0/LibSurviveBinding.csproj.CoreCompileInputs.cache delete mode 100644 csharp-binding/LibSurviveBinding/obj/Debug/netcoreapp2.0/LibSurviveBinding.csproj.FileListAbsolute.txt delete mode 100644 csharp-binding/LibSurviveBinding/obj/Debug/netcoreapp2.0/LibSurviveBinding.csprojResolveAssemblyReference.cache delete mode 100644 csharp-binding/LibSurviveBinding/obj/Debug/netcoreapp2.0/LibSurviveBinding.dll delete mode 100644 csharp-binding/LibSurviveBinding/obj/Debug/netcoreapp2.0/LibSurviveBinding.pdb delete mode 100644 csharp-binding/LibSurviveBinding/obj/LibSurviveBinding.csproj.nuget.cache delete mode 100644 csharp-binding/LibSurviveBinding/obj/LibSurviveBinding.csproj.nuget.g.props delete mode 100644 csharp-binding/LibSurviveBinding/obj/LibSurviveBinding.csproj.nuget.g.targets diff --git a/bindings/cs/.gitignore b/bindings/cs/.gitignore new file mode 100644 index 0000000..6d14531 --- /dev/null +++ b/bindings/cs/.gitignore @@ -0,0 +1,3 @@ +*.dll +obj/ +bin/ \ No newline at end of file diff --git a/bindings/cs/LibSurviveBinding.sln b/bindings/cs/LibSurviveBinding.sln new file mode 100644 index 0000000..539470c --- /dev/null +++ b/bindings/cs/LibSurviveBinding.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.27428.2015 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibSurviveBinding", "LibSurviveBinding\LibSurviveBinding.csproj", "{3DEFC8F7-C61E-4BC2-B743-E39453C6BA10}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3DEFC8F7-C61E-4BC2-B743-E39453C6BA10}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3DEFC8F7-C61E-4BC2-B743-E39453C6BA10}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3DEFC8F7-C61E-4BC2-B743-E39453C6BA10}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3DEFC8F7-C61E-4BC2-B743-E39453C6BA10}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {CA47A8D6-3379-4ABA-927E-86BBDDE1D304} + EndGlobalSection +EndGlobal diff --git a/bindings/cs/LibSurviveBinding/Binding.cs b/bindings/cs/LibSurviveBinding/Binding.cs new file mode 100644 index 0000000..f4f0652 --- /dev/null +++ b/bindings/cs/LibSurviveBinding/Binding.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace LibSurviveBinding +{ + class Binding + { + /* + typedef int (* htc_config_func) (SurviveObject* so, char* ct0conf, int len); + typedef void (* text_feedback_func) (SurviveContext* ctx, const char* fault ); + typedef void (* light_process_func) (SurviveObject* so, int sensor_id, int acode, int timeinsweep, uint32_t timecode, uint32_t length, uint32_t lighthouse); + typedef void (* imu_process_func) (SurviveObject* so, int mask, FLT* accelgyro, uint32_t timecode, int id); + typedef void (* angle_process_func) (SurviveObject* so, int sensor_id, int acode, uint32_t timecode, FLT length, FLT angle, uint32_t lh); + typedef void (* button_process_func) (SurviveObject* so, uint8_t eventType, uint8_t buttonId, uint8_t axis1Id, uint16_t axis1Val, uint8_t axis2Id, uint16_t axis2Val); + typedef void (* raw_pose_func) (SurviveObject* so, uint8_t lighthouse, SurvivePose* pose); + typedef void (* lighthouse_pose_func) (SurviveContext* ctx, uint8_t lighthouse, SurvivePose* lighthouse_pose, + SurvivePose* object_pose); + */ + } + + public delegate int htc_config_func(IntPtr so, char ct0conf, int len); + public delegate void text_feedback_func(IntPtr ctx, string fault); + public delegate void light_process_func(IntPtr so, int sensor_id, int acode, int timeinsweep, UInt32 timecode, UInt32 length, UInt32 lighthouse); + public delegate void imu_process_func(IntPtr so, int mask, double accelgyro, UInt32 timecode, int id); + public delegate void angle_process_func(IntPtr so, int sensor_id, int acode, UInt32 timecode, double length, double angle, UInt32 lh); + public delegate void button_process_func(IntPtr so, byte eventType, byte buttonId, byte axis1Id, UInt16 axis1Val, byte axis2Id, UInt16 axis2Val); + public delegate void raw_pose_func(IntPtr so, byte lighthouse, IntPtr pose); + public delegate void lighthouse_pose_func(IntPtr ctx, byte lighthouse, IntPtr lighthouse_pose, + IntPtr object_pose); + public delegate void handle_lightcap_func (IntPtr so, IntPtr le); + +} diff --git a/bindings/cs/LibSurviveBinding/Config_entry.cs b/bindings/cs/LibSurviveBinding/Config_entry.cs new file mode 100644 index 0000000..85a6701 --- /dev/null +++ b/bindings/cs/LibSurviveBinding/Config_entry.cs @@ -0,0 +1,31 @@ +namespace LibSurviveBinding +{ + + // internal class Config_entry + // { + // char[] tag; + // cval_type type; + // /** + // union { + //uint32_t i; + // FLT f; + // } + + // numeric; + // **/ + // char* data; + // uint32_t elements; + + // } + + // public enum cval_type + // { + // CONFIG_UNKNOWN = 0, + // CONFIG_FLOAT = 1, + // CONFIG_UINT32 = 2, + // CONFIG_STRING = 3, + // CONFIG_FLOAT_ARRAY = 4, + // } + + +} \ No newline at end of file diff --git a/bindings/cs/LibSurviveBinding/LibSurviveBinding.csproj b/bindings/cs/LibSurviveBinding/LibSurviveBinding.csproj new file mode 100644 index 0000000..646c16d --- /dev/null +++ b/bindings/cs/LibSurviveBinding/LibSurviveBinding.csproj @@ -0,0 +1,18 @@ + + + + Exe + netcoreapp2.0 + + + + + Always + + + + + + + + diff --git a/bindings/cs/LibSurviveBinding/LightcapElement.cs b/bindings/cs/LibSurviveBinding/LightcapElement.cs new file mode 100644 index 0000000..ca51fb9 --- /dev/null +++ b/bindings/cs/LibSurviveBinding/LightcapElement.cs @@ -0,0 +1,6 @@ +namespace LibSurviveBinding +{ + public class LightcapElement + { + } +} \ No newline at end of file diff --git a/bindings/cs/LibSurviveBinding/Program.cs b/bindings/cs/LibSurviveBinding/Program.cs new file mode 100644 index 0000000..b6d0d8f --- /dev/null +++ b/bindings/cs/LibSurviveBinding/Program.cs @@ -0,0 +1,62 @@ +using System; +using System.Runtime.InteropServices; + +namespace LibSurVive +{ + class Program + { + [DllImport("libsurvive", CallingConvention = CallingConvention.StdCall)] + static extern IntPtr survive_init_internal(int argc, string[] args); + + public delegate void raw_pose_func(IntPtr so, byte lighthouse, IntPtr pose); + public delegate void lighthouse_pose_func(IntPtr ctx, byte lighthouse, IntPtr lighthouse_pose, IntPtr object_pose); + public delegate void light_process_func( IntPtr so, int sensor_id, int acode, int timeinsweep, + UInt32 timecode, UInt32 length, UInt32 lighthouse); + + [DllImport("libsurvive", CallingConvention = CallingConvention.StdCall)] + static extern void survive_install_raw_pose_fn(IntPtr ctx, raw_pose_func fbp); + [DllImport("libsurvive", CallingConvention = CallingConvention.StdCall)] + static extern void survive_install_lighthouse_pose_fn(IntPtr ctx, lighthouse_pose_func fbp); + + [DllImport("libsurvive", CallingConvention = CallingConvention.StdCall)] + static extern void survive_install_light_fn(IntPtr ctx, light_process_func fbp); + + [DllImport("libsurvive", CallingConvention = CallingConvention.StdCall)] + static extern int survive_startup(IntPtr ctx); + [DllImport("libsurvive", CallingConvention = CallingConvention.StdCall)] + static extern void survive_cal_install(IntPtr ctx); + + [DllImport("libsurvive", CallingConvention = CallingConvention.StdCall)] + static extern int survive_poll(IntPtr ctx); + + static void Main(string[] args) + { + IntPtr context = survive_init_internal(args.Length, args); + + survive_install_lighthouse_pose_fn(context, LighthousPos); + survive_install_raw_pose_fn(context, PositionUpdate); + survive_install_light_fn(context, LightUpdate); + + survive_startup(context); + survive_cal_install(context); + + while(survive_poll(context) == 0) {} + + } + + public static void LightUpdate( IntPtr so, int sensor_id, int acode, int timeinsweep, + UInt32 timecode, UInt32 length, UInt32 lighthouse) { + Console.WriteLine(timeinsweep); + } + + public static void PositionUpdate(IntPtr so, byte lighthouse, IntPtr pose) + { + Console.WriteLine(pose); + } + + public static void LighthousPos(IntPtr ctx, byte lighthouse, IntPtr lighthouse_pose, IntPtr object_pose) + { + + } + } +} diff --git a/bindings/cs/LibSurviveBinding/SurviveContext.cs b/bindings/cs/LibSurviveBinding/SurviveContext.cs new file mode 100644 index 0000000..2ba9b7c --- /dev/null +++ b/bindings/cs/LibSurviveBinding/SurviveContext.cs @@ -0,0 +1,44 @@ +namespace LibSurviveBinding +{ + /* + public struct SurviveContext + { + text_feedback_func faultfunction; + text_feedback_func notefunction; + light_process_func lightproc; + imu_process_func imuproc; + angle_process_func angleproc; + button_process_func buttonproc; + raw_pose_func rawposeproc; + lighthouse_pose_func lighthouseposeproc; + htc_config_func configfunction; + handle_lightcap_func lightcapfunction; + + Config_group global_config_values; + Config_group* lh_config; //lighthouse configs + Config_group* temporary_config_values; //Set per-session, from command-line. Not saved but override global_config_values + + //Calibration data: + int activeLighthouses; + BaseStationData bsd[NUM_LIGHTHOUSES]; + SurviveCalData* calptr; //If and only if the calibration subsystem is attached. + struct SurviveRecordingData *recptr; // Iff recording is attached + SurviveObject** objs; + int objs_ct; + + void** drivers; + DeviceDriverCb* driverpolls; + DeviceDriverCb* drivercloses; + DeviceDriverMagicCb* drivermagics; + int driver_ct; + + SurviveState state; + + void* buttonservicethread; + ButtonQueue buttonQueue; + + void* user_ptr; + + } + */ +} \ No newline at end of file diff --git a/bindings/cs/LibSurviveBinding/SurviveObject.cs b/bindings/cs/LibSurviveBinding/SurviveObject.cs new file mode 100644 index 0000000..bb9e3cd --- /dev/null +++ b/bindings/cs/LibSurviveBinding/SurviveObject.cs @@ -0,0 +1,6 @@ +namespace LibSurviveBinding +{ + public class SurviveObject + { + } +} \ No newline at end of file diff --git a/bindings/cs/LibSurviveBinding/SurvivePose.cs b/bindings/cs/LibSurviveBinding/SurvivePose.cs new file mode 100644 index 0000000..9808d89 --- /dev/null +++ b/bindings/cs/LibSurviveBinding/SurvivePose.cs @@ -0,0 +1,6 @@ +namespace LibSurviveBinding +{ + public class SurvivePose + { + } +} \ No newline at end of file diff --git a/bindings/cs/LibSurviveBinding/config_group.cs b/bindings/cs/LibSurviveBinding/config_group.cs new file mode 100644 index 0000000..8a2f00e --- /dev/null +++ b/bindings/cs/LibSurviveBinding/config_group.cs @@ -0,0 +1,14 @@ +using System; + +namespace LibSurviveBinding +{ + /* + internal class Config_group + { + Config_entry config_entries; + UInt16 used_entries; + UInt16 max_entries; + + } + */ +} \ No newline at end of file diff --git a/csharp-binding/LibSurviveBinding.sln b/csharp-binding/LibSurviveBinding.sln deleted file mode 100644 index 539470c..0000000 --- a/csharp-binding/LibSurviveBinding.sln +++ /dev/null @@ -1,25 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.27428.2015 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibSurviveBinding", "LibSurviveBinding\LibSurviveBinding.csproj", "{3DEFC8F7-C61E-4BC2-B743-E39453C6BA10}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {3DEFC8F7-C61E-4BC2-B743-E39453C6BA10}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3DEFC8F7-C61E-4BC2-B743-E39453C6BA10}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3DEFC8F7-C61E-4BC2-B743-E39453C6BA10}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3DEFC8F7-C61E-4BC2-B743-E39453C6BA10}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {CA47A8D6-3379-4ABA-927E-86BBDDE1D304} - EndGlobalSection -EndGlobal diff --git a/csharp-binding/LibSurviveBinding/Binding.cs b/csharp-binding/LibSurviveBinding/Binding.cs deleted file mode 100644 index f4f0652..0000000 --- a/csharp-binding/LibSurviveBinding/Binding.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace LibSurviveBinding -{ - class Binding - { - /* - typedef int (* htc_config_func) (SurviveObject* so, char* ct0conf, int len); - typedef void (* text_feedback_func) (SurviveContext* ctx, const char* fault ); - typedef void (* light_process_func) (SurviveObject* so, int sensor_id, int acode, int timeinsweep, uint32_t timecode, uint32_t length, uint32_t lighthouse); - typedef void (* imu_process_func) (SurviveObject* so, int mask, FLT* accelgyro, uint32_t timecode, int id); - typedef void (* angle_process_func) (SurviveObject* so, int sensor_id, int acode, uint32_t timecode, FLT length, FLT angle, uint32_t lh); - typedef void (* button_process_func) (SurviveObject* so, uint8_t eventType, uint8_t buttonId, uint8_t axis1Id, uint16_t axis1Val, uint8_t axis2Id, uint16_t axis2Val); - typedef void (* raw_pose_func) (SurviveObject* so, uint8_t lighthouse, SurvivePose* pose); - typedef void (* lighthouse_pose_func) (SurviveContext* ctx, uint8_t lighthouse, SurvivePose* lighthouse_pose, - SurvivePose* object_pose); - */ - } - - public delegate int htc_config_func(IntPtr so, char ct0conf, int len); - public delegate void text_feedback_func(IntPtr ctx, string fault); - public delegate void light_process_func(IntPtr so, int sensor_id, int acode, int timeinsweep, UInt32 timecode, UInt32 length, UInt32 lighthouse); - public delegate void imu_process_func(IntPtr so, int mask, double accelgyro, UInt32 timecode, int id); - public delegate void angle_process_func(IntPtr so, int sensor_id, int acode, UInt32 timecode, double length, double angle, UInt32 lh); - public delegate void button_process_func(IntPtr so, byte eventType, byte buttonId, byte axis1Id, UInt16 axis1Val, byte axis2Id, UInt16 axis2Val); - public delegate void raw_pose_func(IntPtr so, byte lighthouse, IntPtr pose); - public delegate void lighthouse_pose_func(IntPtr ctx, byte lighthouse, IntPtr lighthouse_pose, - IntPtr object_pose); - public delegate void handle_lightcap_func (IntPtr so, IntPtr le); - -} diff --git a/csharp-binding/LibSurviveBinding/Config_entry.cs b/csharp-binding/LibSurviveBinding/Config_entry.cs deleted file mode 100644 index 85a6701..0000000 --- a/csharp-binding/LibSurviveBinding/Config_entry.cs +++ /dev/null @@ -1,31 +0,0 @@ -namespace LibSurviveBinding -{ - - // internal class Config_entry - // { - // char[] tag; - // cval_type type; - // /** - // union { - //uint32_t i; - // FLT f; - // } - - // numeric; - // **/ - // char* data; - // uint32_t elements; - - // } - - // public enum cval_type - // { - // CONFIG_UNKNOWN = 0, - // CONFIG_FLOAT = 1, - // CONFIG_UINT32 = 2, - // CONFIG_STRING = 3, - // CONFIG_FLOAT_ARRAY = 4, - // } - - -} \ No newline at end of file diff --git a/csharp-binding/LibSurviveBinding/LibSurviveBinding.csproj b/csharp-binding/LibSurviveBinding/LibSurviveBinding.csproj deleted file mode 100644 index e3be07c..0000000 --- a/csharp-binding/LibSurviveBinding/LibSurviveBinding.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - Exe - netcoreapp2.0 - - - - - Always - - - - diff --git a/csharp-binding/LibSurviveBinding/LightcapElement.cs b/csharp-binding/LibSurviveBinding/LightcapElement.cs deleted file mode 100644 index ca51fb9..0000000 --- a/csharp-binding/LibSurviveBinding/LightcapElement.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace LibSurviveBinding -{ - public class LightcapElement - { - } -} \ No newline at end of file diff --git a/csharp-binding/LibSurviveBinding/Program.cs b/csharp-binding/LibSurviveBinding/Program.cs deleted file mode 100644 index 7ae8e76..0000000 --- a/csharp-binding/LibSurviveBinding/Program.cs +++ /dev/null @@ -1,71 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace LibSurVive -{ - class Program - { - [DllImport("libsurvive", CallingConvention = CallingConvention.StdCall)] - static extern IntPtr survive_init_internal(int argc, char[] args); - - public delegate void raw_pose_func(IntPtr so, byte lighthouse, IntPtr pose); - public delegate void lighthouse_pose_func(IntPtr ctx, byte lighthouse, IntPtr lighthouse_pose, IntPtr object_pose); - - [DllImport("libsurvive", CallingConvention = CallingConvention.StdCall)] - static extern void survive_install_raw_pose_fn(IntPtr ctx, raw_pose_func fbp); - [DllImport("libsurvive", CallingConvention = CallingConvention.StdCall)] - static extern void survive_install_lighthouse_pose_fn(IntPtr ctx, lighthouse_pose_func fbp); - - - [DllImport("libsurvive", CallingConvention = CallingConvention.StdCall)] - static extern int survive_startup(IntPtr ctx); - [DllImport("libsurvive", CallingConvention = CallingConvention.StdCall)] - static extern void survive_cal_install(IntPtr ctx); - - public static lighthouse_pose_func lighthouse_Pose_Func { get; private set; } - public static raw_pose_func raw_Pose_Func { get; private set; } - - static void Main(string[] args) - { - IntPtr context = survive_init_internal(0, null); - - lighthouse_Pose_Func = LighthousPos; - survive_install_lighthouse_pose_fn(context, lighthouse_Pose_Func); - raw_Pose_Func = PositionUpdate; - survive_install_raw_pose_fn(context, raw_Pose_Func); - - try - { - int a = survive_startup(context); - //survive_cal_install(context); - } - catch (Exception) - { - - throw; - } - - bool running = true; - - - - Console.WriteLine("Hello World!"); - - while (running) - { - Console.ReadLine(); - } - - } - - public static void PositionUpdate(IntPtr so, byte lighthouse, IntPtr pose) - { - //Console.WriteLine(pose); - } - - public static void LighthousPos(IntPtr ctx, byte lighthouse, IntPtr lighthouse_pose, IntPtr object_pose) - { - - } - } -} diff --git a/csharp-binding/LibSurviveBinding/SurviveContext.cs b/csharp-binding/LibSurviveBinding/SurviveContext.cs deleted file mode 100644 index 2ba9b7c..0000000 --- a/csharp-binding/LibSurviveBinding/SurviveContext.cs +++ /dev/null @@ -1,44 +0,0 @@ -namespace LibSurviveBinding -{ - /* - public struct SurviveContext - { - text_feedback_func faultfunction; - text_feedback_func notefunction; - light_process_func lightproc; - imu_process_func imuproc; - angle_process_func angleproc; - button_process_func buttonproc; - raw_pose_func rawposeproc; - lighthouse_pose_func lighthouseposeproc; - htc_config_func configfunction; - handle_lightcap_func lightcapfunction; - - Config_group global_config_values; - Config_group* lh_config; //lighthouse configs - Config_group* temporary_config_values; //Set per-session, from command-line. Not saved but override global_config_values - - //Calibration data: - int activeLighthouses; - BaseStationData bsd[NUM_LIGHTHOUSES]; - SurviveCalData* calptr; //If and only if the calibration subsystem is attached. - struct SurviveRecordingData *recptr; // Iff recording is attached - SurviveObject** objs; - int objs_ct; - - void** drivers; - DeviceDriverCb* driverpolls; - DeviceDriverCb* drivercloses; - DeviceDriverMagicCb* drivermagics; - int driver_ct; - - SurviveState state; - - void* buttonservicethread; - ButtonQueue buttonQueue; - - void* user_ptr; - - } - */ -} \ No newline at end of file diff --git a/csharp-binding/LibSurviveBinding/SurviveObject.cs b/csharp-binding/LibSurviveBinding/SurviveObject.cs deleted file mode 100644 index bb9e3cd..0000000 --- a/csharp-binding/LibSurviveBinding/SurviveObject.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace LibSurviveBinding -{ - public class SurviveObject - { - } -} \ No newline at end of file diff --git a/csharp-binding/LibSurviveBinding/SurvivePose.cs b/csharp-binding/LibSurviveBinding/SurvivePose.cs deleted file mode 100644 index 9808d89..0000000 --- a/csharp-binding/LibSurviveBinding/SurvivePose.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace LibSurviveBinding -{ - public class SurvivePose - { - } -} \ No newline at end of file diff --git a/csharp-binding/LibSurviveBinding/bin/Debug/netcoreapp2.0/LibSurviveBinding.dll b/csharp-binding/LibSurviveBinding/bin/Debug/netcoreapp2.0/LibSurviveBinding.dll deleted file mode 100644 index 08f1a10..0000000 Binary files a/csharp-binding/LibSurviveBinding/bin/Debug/netcoreapp2.0/LibSurviveBinding.dll and /dev/null differ diff --git a/csharp-binding/LibSurviveBinding/bin/Debug/netcoreapp2.0/LibSurviveBinding.pdb b/csharp-binding/LibSurviveBinding/bin/Debug/netcoreapp2.0/LibSurviveBinding.pdb deleted file mode 100644 index c8442a1..0000000 Binary files a/csharp-binding/LibSurviveBinding/bin/Debug/netcoreapp2.0/LibSurviveBinding.pdb and /dev/null differ diff --git a/csharp-binding/LibSurviveBinding/bin/Debug/netcoreapp2.0/libsurvive.dll b/csharp-binding/LibSurviveBinding/bin/Debug/netcoreapp2.0/libsurvive.dll deleted file mode 100644 index 09738c8..0000000 Binary files a/csharp-binding/LibSurviveBinding/bin/Debug/netcoreapp2.0/libsurvive.dll and /dev/null differ diff --git a/csharp-binding/LibSurviveBinding/config_group.cs b/csharp-binding/LibSurviveBinding/config_group.cs deleted file mode 100644 index 8a2f00e..0000000 --- a/csharp-binding/LibSurviveBinding/config_group.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; - -namespace LibSurviveBinding -{ - /* - internal class Config_group - { - Config_entry config_entries; - UInt16 used_entries; - UInt16 max_entries; - - } - */ -} \ No newline at end of file diff --git a/csharp-binding/LibSurviveBinding/libsurvive.dll b/csharp-binding/LibSurviveBinding/libsurvive.dll deleted file mode 100644 index 09738c8..0000000 Binary files a/csharp-binding/LibSurviveBinding/libsurvive.dll and /dev/null differ diff --git a/csharp-binding/LibSurviveBinding/obj/Debug/netcoreapp2.0/LibSurviveBinding.AssemblyInfo.cs b/csharp-binding/LibSurviveBinding/obj/Debug/netcoreapp2.0/LibSurviveBinding.AssemblyInfo.cs deleted file mode 100644 index 0c76a75..0000000 --- a/csharp-binding/LibSurviveBinding/obj/Debug/netcoreapp2.0/LibSurviveBinding.AssemblyInfo.cs +++ /dev/null @@ -1,23 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -using System; -using System.Reflection; - -[assembly: System.Reflection.AssemblyCompanyAttribute("LibSurviveBinding")] -[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] -[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] -[assembly: System.Reflection.AssemblyProductAttribute("LibSurviveBinding")] -[assembly: System.Reflection.AssemblyTitleAttribute("LibSurviveBinding")] -[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] - -// Generated by the MSBuild WriteCodeFragment class. - diff --git a/csharp-binding/LibSurviveBinding/obj/Debug/netcoreapp2.0/LibSurviveBinding.AssemblyInfoInputs.cache b/csharp-binding/LibSurviveBinding/obj/Debug/netcoreapp2.0/LibSurviveBinding.AssemblyInfoInputs.cache deleted file mode 100644 index 27570f7..0000000 --- a/csharp-binding/LibSurviveBinding/obj/Debug/netcoreapp2.0/LibSurviveBinding.AssemblyInfoInputs.cache +++ /dev/null @@ -1 +0,0 @@ -b297cfadb5fc15fdc85ac80d1db8dc47ecc7fa1f diff --git a/csharp-binding/LibSurviveBinding/obj/Debug/netcoreapp2.0/LibSurviveBinding.csproj.CoreCompileInputs.cache b/csharp-binding/LibSurviveBinding/obj/Debug/netcoreapp2.0/LibSurviveBinding.csproj.CoreCompileInputs.cache deleted file mode 100644 index d7b7e81..0000000 --- a/csharp-binding/LibSurviveBinding/obj/Debug/netcoreapp2.0/LibSurviveBinding.csproj.CoreCompileInputs.cache +++ /dev/null @@ -1 +0,0 @@ -e5ec51aa179849bdaf5ff16a14a375413f2f7a0b diff --git a/csharp-binding/LibSurviveBinding/obj/Debug/netcoreapp2.0/LibSurviveBinding.csproj.FileListAbsolute.txt b/csharp-binding/LibSurviveBinding/obj/Debug/netcoreapp2.0/LibSurviveBinding.csproj.FileListAbsolute.txt deleted file mode 100644 index a699d0e..0000000 --- a/csharp-binding/LibSurviveBinding/obj/Debug/netcoreapp2.0/LibSurviveBinding.csproj.FileListAbsolute.txt +++ /dev/null @@ -1,12 +0,0 @@ -P:\csharp\LibSurviveBinding\bin\Debug\netcoreapp2.0\LibSurviveBinding.deps.json -P:\csharp\LibSurviveBinding\bin\Debug\netcoreapp2.0\LibSurviveBinding.runtimeconfig.json -P:\csharp\LibSurviveBinding\bin\Debug\netcoreapp2.0\LibSurviveBinding.runtimeconfig.dev.json -P:\csharp\LibSurviveBinding\bin\Debug\netcoreapp2.0\LibSurviveBinding.dll -P:\csharp\LibSurviveBinding\bin\Debug\netcoreapp2.0\LibSurviveBinding.pdb -P:\csharp\LibSurviveBinding\obj\Debug\netcoreapp2.0\LibSurviveBinding.csprojResolveAssemblyReference.cache -P:\csharp\LibSurviveBinding\obj\Debug\netcoreapp2.0\LibSurviveBinding.csproj.CoreCompileInputs.cache -P:\csharp\LibSurviveBinding\obj\Debug\netcoreapp2.0\LibSurviveBinding.AssemblyInfoInputs.cache -P:\csharp\LibSurviveBinding\obj\Debug\netcoreapp2.0\LibSurviveBinding.AssemblyInfo.cs -P:\csharp\LibSurviveBinding\obj\Debug\netcoreapp2.0\LibSurviveBinding.dll -P:\csharp\LibSurviveBinding\obj\Debug\netcoreapp2.0\LibSurviveBinding.pdb -P:\csharp\LibSurviveBinding\bin\Debug\netcoreapp2.0\libsurvive.dll diff --git a/csharp-binding/LibSurviveBinding/obj/Debug/netcoreapp2.0/LibSurviveBinding.csprojResolveAssemblyReference.cache b/csharp-binding/LibSurviveBinding/obj/Debug/netcoreapp2.0/LibSurviveBinding.csprojResolveAssemblyReference.cache deleted file mode 100644 index 94b7814..0000000 Binary files a/csharp-binding/LibSurviveBinding/obj/Debug/netcoreapp2.0/LibSurviveBinding.csprojResolveAssemblyReference.cache and /dev/null differ diff --git a/csharp-binding/LibSurviveBinding/obj/Debug/netcoreapp2.0/LibSurviveBinding.dll b/csharp-binding/LibSurviveBinding/obj/Debug/netcoreapp2.0/LibSurviveBinding.dll deleted file mode 100644 index 08f1a10..0000000 Binary files a/csharp-binding/LibSurviveBinding/obj/Debug/netcoreapp2.0/LibSurviveBinding.dll and /dev/null differ diff --git a/csharp-binding/LibSurviveBinding/obj/Debug/netcoreapp2.0/LibSurviveBinding.pdb b/csharp-binding/LibSurviveBinding/obj/Debug/netcoreapp2.0/LibSurviveBinding.pdb deleted file mode 100644 index c8442a1..0000000 Binary files a/csharp-binding/LibSurviveBinding/obj/Debug/netcoreapp2.0/LibSurviveBinding.pdb and /dev/null differ diff --git a/csharp-binding/LibSurviveBinding/obj/LibSurviveBinding.csproj.nuget.cache b/csharp-binding/LibSurviveBinding/obj/LibSurviveBinding.csproj.nuget.cache deleted file mode 100644 index 55c49f2..0000000 --- a/csharp-binding/LibSurviveBinding/obj/LibSurviveBinding.csproj.nuget.cache +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 1, - "dgSpecHash": "WfCkKm3U/vtoEsgbYzrhLfrfUejWLQZtOI4PCmuZ/c/RM+JDSQotxYTHxQQ6Blgu3cg1aVoZ15gcgmVkgjRwSg==", - "success": true -} \ No newline at end of file diff --git a/csharp-binding/LibSurviveBinding/obj/LibSurviveBinding.csproj.nuget.g.props b/csharp-binding/LibSurviveBinding/obj/LibSurviveBinding.csproj.nuget.g.props deleted file mode 100644 index f4fbbaa..0000000 --- a/csharp-binding/LibSurviveBinding/obj/LibSurviveBinding.csproj.nuget.g.props +++ /dev/null @@ -1,18 +0,0 @@ - - - - True - NuGet - P:\csharp\LibSurviveBinding\obj\project.assets.json - $(UserProfile)\.nuget\packages\ - C:\Users\Peter\.nuget\packages\;C:\Program Files\dotnet\sdk\NuGetFallbackFolder - PackageReference - 4.6.1 - - - $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - - - - - \ No newline at end of file diff --git a/csharp-binding/LibSurviveBinding/obj/LibSurviveBinding.csproj.nuget.g.targets b/csharp-binding/LibSurviveBinding/obj/LibSurviveBinding.csproj.nuget.g.targets deleted file mode 100644 index 91fd1c9..0000000 --- a/csharp-binding/LibSurviveBinding/obj/LibSurviveBinding.csproj.nuget.g.targets +++ /dev/null @@ -1,10 +0,0 @@ - - - - $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - - - - - - \ No newline at end of file -- cgit v1.2.3