Modified for compatibility with Rev.E. hardware

Fork of AkmSensor by AKM Development Platform

Revision:
34:1ea3357c8d9a
Parent:
29:b488d2c89fba
Parent:
23:50c98b286e41
Child:
39:3821886c902e
--- a/ak9752ctrl.h	Fri Apr 28 20:32:31 2017 +0000
+++ b/ak9752ctrl.h	Wed May 03 18:00:45 2017 +0000
@@ -5,6 +5,9 @@
 #include "akmsensor.h"
 #include "AK9752.h"
 
+/**
+ * Class for handling commands issued to the AK9752.
+ */
 class Ak9752Ctrl : public AkmSensor
 {
 
@@ -12,8 +15,11 @@
     
     typedef AkmSensor base;
 
+    /**
+     * Device Sub-ID
+     */
     typedef enum {
-        SUB_ID_AK9752              = 0x02
+        SUB_ID_AK9752              = 0x02       /**< AK9752: 02h */
     } SubIdAk9752;
 
     /**
@@ -27,12 +33,58 @@
      *
      */
     virtual ~Ak9752Ctrl();
+    
+    /**
+     * Process for intializing the selected sensor.
+     *
+     * @return Termination status type for debugging purposes.
+     */
     virtual AkmSensor::Status init(const uint8_t id, const uint8_t subid);
+    
+    /**
+     * Process abstraction for starting sensor operation.
+     *
+     * @return Termination status type for debugging purposes.
+     */
     virtual AkmSensor::Status startSensor();
+    
+    /**
+     * Process abstraction for starting sensor operation.
+     *
+     * @param sec Number of seconds of operation.
+     * @return Termination status type for debugging purposes.
+     */
     virtual AkmSensor::Status startSensor(const float sec);
+    
+    /**
+     * Process abstraction for stopping sensor operation.
+     *
+     * @return Termination status type for debugging purposes.
+     */
     virtual AkmSensor::Status stopSensor();
+    
+    /**
+     * Process abstraction for reading data from the sensor.
+     *
+     * @param msg Message object that will hold the sensor data.
+     * @return Termination status type for debugging purposes.
+     */
     virtual AkmSensor::Status readSensorData(Message* msg);
+
+    /**
+     * Primary process for interfacing a sensor with the AKDP.  When implemented
+     * in sensor class, it will transfer commands between the the sensor control
+     * class and AkmSensorManager. 
+     *
+     * @param in Command message to be processed by sensor.
+     * @param out Message returned from sensor.
+     * @return Termination status type for debugging purposes.
+     */
     virtual AkmSensor::Status requestCommand(Message* in, Message* out);
+    
+    /**
+     * Set event flag.
+     */
     virtual void setEvent();
 
 private: