]> rtime.felk.cvut.cz Git - CanFestival-3.git/blobdiff - include/states.h
Second time, Re-write doxygen tags in headers files to generate User API documentation
[CanFestival-3.git] / include / states.h
index bac7411ff74697c387c3cee97d8ea278fa6c0b44..4709e094f0b45d69b2362557d65c27b441b2b4b3 100644 (file)
@@ -20,6 +20,10 @@ License along with this library; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 
+/** @defgroup statemachine State Machine
+ *  @ingroup userapi
+ */
 #ifndef __states_h__
 #define __states_h__
 
@@ -47,59 +51,95 @@ typedef enum enum_nodeState e_nodeState;
 
 typedef struct
 {
-       UNS8 csBoot_Up;
-       UNS8 csSDO;
-       UNS8 csEmergency;
-       UNS8 csSYNC;
-       UNS8 csHeartbeat;
-       UNS8 csPDO;
+       INTEGER8 csBoot_Up;
+       INTEGER8 csSDO;
+       INTEGER8 csEmergency;
+       INTEGER8 csSYNC;
+       INTEGER8 csHeartbeat;
+       INTEGER8 csPDO;
+       INTEGER8 csLSS;
 } s_state_communication;
 
-/** Function that user app can overload
- * 
+/** 
+ * @brief Function that user app can overload
+ * @ingroup statemachine
+ */
+typedef void (*initialisation_t)(CO_Data*);
+typedef void (*preOperational_t)(CO_Data*);
+typedef void (*operational_t)(CO_Data*);
+typedef void (*stopped_t)(CO_Data*);
+
+/** 
+ * @brief Function that user app can overload
+ * @param *d Pointer on a CAN object data structure
+ */
+void _initialisation(CO_Data* d);
+
+/** 
+ * @brief Function that user app can overload
+ * @param *d Pointer on a CAN object data structure
+ */
+void _preOperational(CO_Data* d);
+
+/** 
+ * @brief Function that user app can overload
+ * @param *d Pointer on a CAN object data structure
  */
-typedef void (*initialisation_t)(void);
-typedef void (*preOperational_t)(void);
-typedef void (*operational_t)(void);
-typedef void (*stopped_t)(void);
+void _operational(CO_Data* d);
 
-void _initialisation(void);
-void _preOperational(void);
-void _operational(void);
-void _stopped(void);
+/** 
+ * @brief Function that user app can overload
+ * @param *d Pointer on a CAN object data structure
+ */
+void _stopped(CO_Data* d);
 
 #include "data.h"
 
 /************************* prototypes ******************************/
 
-/** Called by driver/app when receiving messages
-*/
+/** 
+ * @brief Called by driver/app when receiving messages
+ * @param *d Pointer on a CAN object data structure
+ * @param *m Pointer on a CAN message structure
+ */
 void canDispatch(CO_Data* d, Message *m);
 
-/** Returns the state of the node 
-*/
+/** 
+ * @ingroup statemachine
+ * @brief Returns the state of the node
+ * @param *d Pointer on a CAN object data structure
+ * @return The node state
+ */
 e_nodeState getState (CO_Data* d);
 
-/** Change the state of the node 
-*/
+/** 
+ * @ingroup statemachine
+ * @brief Change the state of the node 
+ * @param *d Pointer on a CAN object data structure
+ * @param newState The state to assign
+ * @return 
+ */
 UNS8 setState (CO_Data* d, e_nodeState newState);
 
-/** Returns the nodId 
-*/
+/**
+ * @ingroup statemachine 
+ * @brief Returns the nodId 
+ * @param *d Pointer on a CAN object data structure
+ * @return
+ */
 UNS8 getNodeId (CO_Data* d);
 
-/** Define the node ID. Initialize the object dictionary
-*/
-void setNodeId (CO_Data* d, UNS8 nodeId);
-
-/** Some stuff to do when the node enter in reset mode
- *
+/** 
+ * @ingroup statemachine
+ * @brief Define the node ID. Initialize the object dictionary
+ * @param *d Pointer on a CAN object data structure
+ * @param nodeId The node ID to assign
  */
-/* void initResetMode (CO_Data* d); */
-
+void setNodeId (CO_Data* d, UNS8 nodeId);
 
-/** Some stuff to do when the node enter in pre-operational mode
- *
+/** 
+ * @brief Some stuff to do when the node enter in pre-operational mode
+ * @param *d Pointer on a CAN object data structure
  */
 void initPreOperationalMode (CO_Data* d);