Beispiel #1
0
 public void SetFrameContent(byte content)
 {
     if (SenselLib.senselSetFrameContent(handle, content) != SenselStatus.SENSEL_OK)
     {
         throw SenselException();
     }
 }
Beispiel #2
0
 public void SetContactsEnableBlobMerge(byte val)
 {
     if (SenselLib.senselSetContactsEnableBlobMerge(handle, val) != SenselStatus.SENSEL_OK)
     {
         throw SenselException();
     }
 }
Beispiel #3
0
 public void StopScanning()
 {
     if (SenselLib.senselStopScanning(handle) != SenselStatus.SENSEL_OK)
     {
         throw SenselException();
     }
 }
Beispiel #4
0
 public void ReadSensor()
 {
     if (SenselLib.senselReadSensor(handle) != SenselStatus.SENSEL_OK)
     {
         throw SenselException();
     }
 }
Beispiel #5
0
 public void SetContactsMask(byte mask)
 {
     if (SenselLib.senselSetContactsMask(handle, mask) != SenselStatus.SENSEL_OK)
     {
         throw SenselException();
     }
 }
Beispiel #6
0
 public void SetScanDetail(SenselScanDetail detail)
 {
     if (SenselLib.senselSetScanDetail(handle, detail) != SenselStatus.SENSEL_OK)
     {
         throw SenselException();
     }
 }
Beispiel #7
0
 public void SoftReset()
 {
     if (SenselLib.senselSoftReset(handle) != SenselStatus.SENSEL_OK)
     {
         throw SenselException();
     }
 }
Beispiel #8
0
 public void SetLEDBrightness(byte led_id, UInt16 brightness)
 {
     if (SenselLib.senselSetLEDBrightness(handle, led_id, brightness) != SenselStatus.SENSEL_OK)
     {
         throw SenselException();
     }
 }
Beispiel #9
0
 public void Close()
 {
     if (SenselLib.senselClose(handle) != SenselStatus.SENSEL_OK)
     {
         throw SenselException();
     }
 }
Beispiel #10
0
        public static SenselDeviceList GetDeviceList()
        {
            SenselDeviceList list = new SenselDeviceList();

            list.num_devices = 0;
            SenselLib.senselGetDeviceList(ref list);
            return(list);
        }
Beispiel #11
0
 public SenselSensorInfo GetSensorInfo()
 {
     if (SenselLib.senselGetSensorInfo(handle, ref sensor_info) != SenselStatus.SENSEL_OK)
     {
         throw SenselException();
     }
     return(sensor_info);
 }
Beispiel #12
0
 public SenselFirmwareInfo GetFirmwareInfo()
 {
     if (SenselLib.senselGetFirmwareInfo(handle, ref fw_info) != SenselStatus.SENSEL_OK)
     {
         throw SenselException();
     }
     return(fw_info);
 }
Beispiel #13
0
 public SenselFrame GetFrame()
 {
     if (SenselLib.senselGetFrame(handle, frame_data) != SenselStatus.SENSEL_OK)
     {
         throw SenselException();
     }
     CopyFrameData();
     return(frame);
 }
Beispiel #14
0
 public void OpenDeviceByID(byte idx)
 {
     if (SenselLib.senselOpenDeviceByID(ref handle, idx) != SenselStatus.SENSEL_OK)
     {
         throw SenselException();
     }
     GetSensorInfo();
     AllocateFrameData();
 }
Beispiel #15
0
        public byte GetNumAvailableLEDs()
        {
            byte num_leds = 0;

            if (SenselLib.senselGetNumAvailableLEDs(handle, ref num_leds) != SenselStatus.SENSEL_OK)
            {
                throw SenselException();
            }
            return(num_leds);
        }
Beispiel #16
0
        public int GetNumAvailableFrames()
        {
            Int32 num_frames = 0;

            if (SenselLib.senselGetNumAvailableFrames(handle, ref num_frames) != SenselStatus.SENSEL_OK)
            {
                throw SenselException();
            }
            return((int)num_frames);
        }
Beispiel #17
0
        public SenselScanDetail GetScanDetail()
        {
            SenselScanDetail detail = 0;

            if (SenselLib.senselGetScanDetail(handle, ref detail) != SenselStatus.SENSEL_OK)
            {
                throw SenselException();
            }
            return(detail);
        }
Beispiel #18
0
        public byte GetMaxLEDBrightness()
        {
            byte max_brightness = 0;

            if (SenselLib.senselGetMaxLEDBrightness(handle, ref max_brightness) != SenselStatus.SENSEL_OK)
            {
                throw SenselException();
            }
            return(max_brightness);
        }
Beispiel #19
0
        public byte GetFrameContent()
        {
            byte content = 0;

            if (SenselLib.senselGetFrameContent(handle, ref content) != SenselStatus.SENSEL_OK)
            {
                throw SenselException();
            }
            return(content);
        }
Beispiel #20
0
        public UInt16 GetLEDBrightness(byte led_id)
        {
            UInt16 brightness = 0;

            if (SenselLib.senselGetLEDBrightness(handle, led_id, ref brightness) != SenselStatus.SENSEL_OK)
            {
                throw SenselException();
            }
            return(brightness);
        }
Beispiel #21
0
        public byte GetContactsMask()
        {
            byte val = 0;

            if (SenselLib.senselGetContactsMask(handle, ref val) != SenselStatus.SENSEL_OK)
            {
                throw SenselException();
            }
            return(val);
        }
Beispiel #22
0
 private void AllocateFrameData()
 {
     frame.contacts     = new List <SenselContact>();
     frame.force_array  = new float[sensor_info.num_rows * sensor_info.num_cols];
     frame.labels_array = new byte[sensor_info.num_rows * sensor_info.num_cols];
     frame.accel_data   = new SenselAccelData();
     if (SenselLib.senselAllocateFrameData(handle, ref frame_data) != SenselStatus.SENSEL_OK)
     {
         throw SenselException();
     }
 }