Files
diplomarbeit/Test_Item/SW/testapplication-0.0.1/ProtocolThread.h
T
Matthias 581bdc3e23 Renamed remotely
git-svn-id: file:///srv/dev-disk-by-uuid-17e88007-4d0c-45e0-8757-cacfcc458630/repositories/svn/Diplomarbeit@106 9fe90eed-be63-e94b-8204-d34ff4c2ff93
2009-01-12 08:24:18 +00:00

81 lines
3.1 KiB
C

/* ---------------------------------------------------------------------------
* ProtocolThread.h - v0.1 (c) 2008 Micro-key bv
* ---------------------------------------------------------------------------
* Micro-key bv
* Industrieweg 28, 9804 TG Noordhorn
* Postbus 92, 9800 AB Zuidhorn
* The Netherlands
* Tel: +31 594 503020
* Fax: +31 594 505825
* Email: support@microkey.nl
* Web: www.microkey.nl
* ---------------------------------------------------------------------------
* Description:
* ---------------------------------------------------------------------------
* Version(s): 0.1, Jan 29, 2008, FSc
* Creation.
* ---------------------------------------------------------------------------
*/
#ifndef __PROTOCOLTHREAD_H__
#define __PROTOCOLTHREAD_H__
/** \file ProtocolThread.h
\brief Thread which handles the messaging of the protocol.
*/
/* ---------------------------------------------------------------------------
* System include files.
* ---------------------------------------------------------------------------
*/
/* ---------------------------------------------------------------------------
* Application include files.
* ---------------------------------------------------------------------------
*/
#include "bus.h"
#include "BpMessageFormat.h"
#include "BusProtocol.h"
/* ---------------------------------------------------------------------------
* Constant and macro definitions.
* ---------------------------------------------------------------------------
*/
/* ---------------------------------------------------------------------------
* Type definitions.
* ---------------------------------------------------------------------------
*/
/* ---------------------------------------------------------------------------
* Variable declarations.
* ---------------------------------------------------------------------------
*/
/* ---------------------------------------------------------------------------
* Function declarations.
* ---------------------------------------------------------------------------
*/
/** \brief Starts the protocol handling thread */
int bpthreadStart( t_bus_devices bus, UINT8 deviceId, UINT8 highestDeviceId, int bpHandle, int mhqHandle );
/** \brief Stops the protocol handling thread */
void bpthreadStop( int handle );
/** \brief Indicates whether a message a device is received in the last 10 seconds
* Only used by the master
*/
BOOLEAN bpthreadDeviceIsDetected( int handle, UINT8 deviceId );
/** \brief Add a message to the tx-queue. Message will be send when its this device its turn */
void bpthreadAddMessage( int handle, t_bpmsg_message *message );
/** \brief Attaches a callback function to MyTurn-event, which notifies when it is this device its turn */
void bpthreadAttachMyTurn( int handle, t_bp_myturn_callback callback);
/** \brief Detaches the callback function to MyTurn-event */
void bpthreadDetachMyTurn( int handle, t_bp_myturn_callback callback);
#endif /* __PROTOCOLTHREAD_H__ */