Class MindsensorsBTSense


  • public class MindsensorsBTSense
    extends java.lang.Object
    Support for the Mindsensors BTSense application
    Author:
    Lawrie Griffiths
    • Constructor Summary

      Constructors 
      Constructor Description
      MindsensorsBTSense()
      Connection to the BTSense application and identify device as EV3
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getReply​(int offset)  
      SensorMode getSensorMode​(char sensorType)
      Get a SensorMode object for a specific sensor mode and request data from phone
      void processData()
      Process data from the phone application
      void sendCmd​(java.lang.String cmd)
      Send a command to the phone application, with a transaction id
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MindsensorsBTSense

        public MindsensorsBTSense()
                           throws java.io.IOException
        Connection to the BTSense application and identify device as EV3
        Throws:
        java.io.IOException
    • Method Detail

      • getSensorMode

        public SensorMode getSensorMode​(char sensorType)
                                 throws java.io.IOException,
                                        java.lang.InterruptedException
        Get a SensorMode object for a specific sensor mode and request data from phone
        Parameters:
        sensorType - the single character sensor mode identifier
        Returns:
        the SensorMode implementation
        Throws:
        java.io.IOException
        java.lang.InterruptedException
      • sendCmd

        public void sendCmd​(java.lang.String cmd)
                     throws java.io.IOException
        Send a command to the phone application, with a transaction id
        Parameters:
        cmd -
        Throws:
        java.io.IOException
      • getReply

        public int getReply​(int offset)
                     throws java.io.IOException
        Throws:
        java.io.IOException
      • processData

        public void processData()
                         throws java.io.IOException
        Process data from the phone application
        Throws:
        java.io.IOException