AvrIO  1.4.5
Bibliothèque C modulaire pour ATMEL AVR
idwarf/hub.h
1 
24 #ifndef _IDWARF_HUB_H_
25 #define _IDWARF_HUB_H_
26 
27 #include "idwarf.h"
28 #include "iprotocol.h"
29 #include "ihost.h"
30 
64 /* types ==================================================================== */
65 
72 typedef void (*CBSENSORPACKETRECEIVED)(PACKET_TYPES PacketType, U16 DeviceId, U8 UserDataCount, volatile U8 *buf);
73 
74 /* internal public functions ================================================ */
75 
93 void cbPacketReceived (PACKET_TYPES PacketType, U16 DeviceId,
94  U8 UserDataCount, volatile U8 *buf);
95 
96 
104 
112 void rfReset (void);
113 
122 
141 void rfStartBind (void);
142 
147 void rfStopBind (void);
148 
149 
162 
163 
178 U8 rfGetSensorMID (U16 DeviceId, MID * mid);
179 
192 U8 rfDeleteSensor (U16 DeviceId);
193 
194 
219 U8 rfSetBackchannelData (U16 DeviceId, U8 userData, U16 beaconTime, U8 *buf, U8 length);
220 
221 
230 U8 rfIsBackchannelFree (U16 DeviceId);
231 
232 
250 U8 rfConfigureNetwork (U8 pnCode, U8 nChannel, U32 *pMid);
251 
257 /* ========================================================================== */
258 #endif /* _IDWARF_HUB_H_ */
U8 rfGetSensorMID(U16 DeviceId, MID *mid)
Test de la validité et lecture du MID d'un capteur.
void(* CBSENSORPACKETRECEIVED)(PACKET_TYPES PacketType, U16 DeviceId, U8 UserDataCount, volatile U8 *buf)
Type de fonction de gestion de réception de paquets.
Definition: idwarf/hub.h:72
void rfStopBind(void)
Invalide le mode bind.
void cbPacketReceived(PACKET_TYPES PacketType, U16 DeviceId, U8 UserDataCount, volatile U8 *buf)
Exemple de fonction utilisateur de gestion de réception de paquets.
void rfStartBind(void)
Valide le mode bind.
uint32_t U32
Entier de 32 bits signé
Definition: itypes.h:82
uint8_t U8
Entier de 8 bits non signé (octet)
Definition: itypes.h:72
uint16_t U16
Entier de 16 bits non signé
Definition: itypes.h:77
PROTOCOL_STATUS rfGetProtocolStatus(void)
Renvoie la variable d'état interne du firmware du hub.
PACKET_TYPES
Type de paquets transmis sur le réseau.
Definition: iprotocol.h:67
U16 rfGetMaximumDeviceId(void)
Renvoie l'identifiant le plus élevé pouvant être géré par le hub.
U8 rfSetBackchannelData(U16 DeviceId, U8 userData, U16 beaconTime, U8 *buf, U8 length)
Mémorise les données à trasmettre à un capteur par la canal de réponse.
Definition: iprotocol.h:84
PROTOCOL_STATUS
Drapeaux d'état du réseau.
Definition: iprotocol.h:110
U8 rfIsBackchannelFree(U16 DeviceId)
Teste s'il est possible de mémoriser des données pour un capteur.
U8 rfConfigureNetwork(U8 pnCode, U8 nChannel, U32 *pMid)
Reconfiguration des paramètres du réseau.
void rfRegisterCBSensorDataReceived(CBSENSORPACKETRECEIVED cbSensor)
Enregistre la fonction de réception de paquets.
U8 rfDeleteSensor(U16 DeviceId)
Suppression d'un capteur.
void rfReset(void)
Effectue une réinitialisation logicielle du firmware et du processeur.