From 91f0cab811e983da63ea49f6e24afae283138a1c Mon Sep 17 00:00:00 2001 From: Justin Berger Date: Wed, 28 Mar 2018 20:36:05 -0600 Subject: Functional C# in windows --- 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 ----- 9 files changed, 220 deletions(-) delete mode 100644 bindings/cs/LibSurviveBinding/Binding.cs delete mode 100644 bindings/cs/LibSurviveBinding/Config_entry.cs delete mode 100644 bindings/cs/LibSurviveBinding/LibSurviveBinding.csproj delete mode 100644 bindings/cs/LibSurviveBinding/LightcapElement.cs delete mode 100644 bindings/cs/LibSurviveBinding/Program.cs delete mode 100644 bindings/cs/LibSurviveBinding/SurviveContext.cs delete mode 100644 bindings/cs/LibSurviveBinding/SurviveObject.cs delete mode 100644 bindings/cs/LibSurviveBinding/SurvivePose.cs delete mode 100644 bindings/cs/LibSurviveBinding/config_group.cs (limited to 'bindings/cs/LibSurviveBinding') diff --git a/bindings/cs/LibSurviveBinding/Binding.cs b/bindings/cs/LibSurviveBinding/Binding.cs deleted file mode 100644 index f4f0652..0000000 --- a/bindings/cs/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/bindings/cs/LibSurviveBinding/Config_entry.cs b/bindings/cs/LibSurviveBinding/Config_entry.cs deleted file mode 100644 index 85a6701..0000000 --- a/bindings/cs/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/bindings/cs/LibSurviveBinding/LibSurviveBinding.csproj b/bindings/cs/LibSurviveBinding/LibSurviveBinding.csproj deleted file mode 100644 index 646c16d..0000000 --- a/bindings/cs/LibSurviveBinding/LibSurviveBinding.csproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - Exe - netcoreapp2.0 - - - - - Always - - - - - - - - diff --git a/bindings/cs/LibSurviveBinding/LightcapElement.cs b/bindings/cs/LibSurviveBinding/LightcapElement.cs deleted file mode 100644 index ca51fb9..0000000 --- a/bindings/cs/LibSurviveBinding/LightcapElement.cs +++ /dev/null @@ -1,6 +0,0 @@ -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 deleted file mode 100644 index b6d0d8f..0000000 --- a/bindings/cs/LibSurviveBinding/Program.cs +++ /dev/null @@ -1,62 +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, 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 deleted file mode 100644 index 2ba9b7c..0000000 --- a/bindings/cs/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/bindings/cs/LibSurviveBinding/SurviveObject.cs b/bindings/cs/LibSurviveBinding/SurviveObject.cs deleted file mode 100644 index bb9e3cd..0000000 --- a/bindings/cs/LibSurviveBinding/SurviveObject.cs +++ /dev/null @@ -1,6 +0,0 @@ -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 deleted file mode 100644 index 9808d89..0000000 --- a/bindings/cs/LibSurviveBinding/SurvivePose.cs +++ /dev/null @@ -1,6 +0,0 @@ -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 deleted file mode 100644 index 8a2f00e..0000000 --- a/bindings/cs/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 -- cgit v1.2.3