X-Git-Url: https://rtime.felk.cvut.cz/gitweb/CanFestival-3.git/blobdiff_plain/0ac574e186aa6369c40ba104d4492e1a5bded047..c18dbd4d157ef236c9aa771dd6f9000f2e2018e0:/include/nmtMaster.h diff --git a/include/nmtMaster.h b/include/nmtMaster.h index 6f36cd6..4a6865c 100644 --- a/include/nmtMaster.h +++ b/include/nmtMaster.h @@ -20,43 +20,64 @@ 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 networkmanagement Network Management + * @ingroup userapi + */ +/** @defgroup nmtmaster NMT Master + * @ingroup networkmanagement + */ + #ifndef __nmtMaster_h__ #define __nmtMaster_h__ #include "data.h" -/** Transmit a NMT message on the bus number bus_id +/** + * @ingroup nmtmaster + * @brief Transmit a NMT message on the bus number bus_id * to the slave whose node_id is ID + * * bus_id is hardware dependant * cs represents the order of state changement: - * cs = NMT_Start_Node // Put the node in operational mode - * cs = NMT_Stop_Node // Put the node in stopped mode - * cs = NMT_Enter_PreOperational // Put the node in pre_operational mode - * cs = NMT_Reset_Node // Put the node in initialization mode - * cs = NMT_Reset_Comunication // Put the node in initialization mode + * - cs = NMT_Start_Node // Put the node in operational mode + * - cs = NMT_Stop_Node // Put the node in stopped mode + * - cs = NMT_Enter_PreOperational // Put the node in pre_operational mode + * - cs = NMT_Reset_Node // Put the node in initialization mode + * - cs = NMT_Reset_Comunication // Put the node in initialization mode * The mode is changed according to the slave state machine mode : - * initialisation ---> pre-operational (Automatic transition) - * pre-operational <--> operational - * pre-operational <--> stopped - * pre-operational, operational, stopped -> initialisation - * - * return canSend(bus_id,&m) + * - initialisation ---> pre-operational (Automatic transition) + * - pre-operational <--> operational + * - pre-operational <--> stopped + * - pre-operational, operational, stopped -> initialisation + * @param *d Pointer on a CAN object data structure + * @param Node_ID Id of the slave node + * @param cs State changement + * @return canSend(bus_id,&m) */ UNS8 masterSendNMTstateChange (CO_Data* d, UNS8 Node_ID, UNS8 cs); -/** Transmit a Node_Guard message on the bus number bus_id +/** + * @ingroup nmtmaster + * @brief Transmit a Node_Guard message on the bus number bus_id * to the slave whose node_id is nodeId + * * bus_id is hardware dependant - * return canSend(bus_id,&m) + * @param *d Pointer on a CAN object data structure + * @param nodeId Id of the slave node + * @return canSend(bus_id,&m) */ UNS8 masterSendNMTnodeguard (CO_Data* d, UNS8 nodeId); - -/** Prepare a Node_Guard message transmission on the bus number bus_id +/** + * @ingroup nmtmaster + * @brief Prepare a Node_Guard message transmission on the bus number bus_id * to the slave whose node_id is nodeId + * * Put nodeId = 0 to send an NMT broadcast. * This message will ask for the slave, whose node_id is nodeId, its state * bus_id is hardware dependant + * @param *d Pointer on a CAN object data structure + * @param nodeId Id of the slave node */ void masterRequestNodeState (CO_Data* d, UNS8 nodeId);