[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Moss-devel] CVS: moss/colpatik/include API_Applications.h,1.3,1.4 API_D
From: |
Alexander Feder <address@hidden> |
Subject: |
[Moss-devel] CVS: moss/colpatik/include API_Applications.h,1.3,1.4 API_Device.h,1.3,1.4 |
Date: |
Wed, 04 Dec 2002 10:48:17 -0500 |
Update of /cvsroot/moss/moss/colpatik/include
In directory subversions:/tmp/cvs-serv19556/include
Modified Files:
API_Applications.h API_Device.h
Log Message:
added some doxygen stuff
Index: API_Applications.h
===================================================================
RCS file: /cvsroot/moss/moss/colpatik/include/API_Applications.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** API_Applications.h 30 Oct 2002 23:35:52 -0000 1.3
--- API_Applications.h 4 Dec 2002 15:48:14 -0000 1.4
***************
*** 34,37 ****
--- 34,43 ----
#define __API_APPLICATIONS_H
+ /**
+ * @file
+ * API_Applications.
+ */
+
+
#if _MSC_VER >= 1000
# pragma once
***************
*** 46,50 ****
namespace colpatik
{
! // the data type for any entity
typedef
struct tagEntity
--- 52,58 ----
namespace colpatik
{
! /**
! * the data type for any entity.
! */
typedef
struct tagEntity
***************
*** 55,58 ****
--- 63,69 ----
// the appropiate class definition
+ /**
+ * The Entity. TODO A detailed description for CEntity.
+ */
class CEntity : public TEntity
{
***************
*** 65,79 ****
}; // class CEntity
! // calls an entity from the server
CEntity EntityGet(long nId);
! // send an new entity to the server
CEntity& EntityAdd(const TEntity& rstEntity);
! // removes an exisiting entity from the server
long EntityRemove(const TEntity& rstEntity);
! // the data type for any message
typedef
struct tagMessage
--- 76,104 ----
}; // class CEntity
! /**
! * calls an entity from the server.
! * @return an Entity.
! * @param nID the Id of the entity to get.
! */
CEntity EntityGet(long nId);
! /**
! * send an new entity to the server.
! * @return a reference to the added entity?? TODO.
! * @param rstEntity the entity to add.
! */
CEntity& EntityAdd(const TEntity& rstEntity);
! /**
! * removes an exisiting entity from the server.
! * @return success?? TODO.
! * @param rstEntity the entity to be removed? TODO.
! */
long EntityRemove(const TEntity& rstEntity);
! /**
! * the data type for any message.
! */
typedef
struct tagMessage
***************
*** 86,89 ****
--- 111,117 ----
// the appropiate class definition
+ /**
+ * The CMessage Class. TODO detailed description.
+ */
class CMessage : public TMessage
{
***************
*** 96,103 ****
}; // CMessage
! // calls a message from the message queue
! // removes the message from the queue
CMessage* MessageGet();
! // sends a message to the message queue
CMessage* MessagePut(CMessage* poMessage);
--- 124,135 ----
}; // CMessage
! /**
! * calls a message from the message queue
! * removes the message from the queue.
! */
CMessage* MessageGet();
! /**
! * sends a message to the message queue.
! */
CMessage* MessagePut(CMessage* poMessage);
Index: API_Device.h
===================================================================
RCS file: /cvsroot/moss/moss/colpatik/include/API_Device.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** API_Device.h 30 Oct 2002 23:35:52 -0000 1.3
--- API_Device.h 4 Dec 2002 15:48:14 -0000 1.4
***************
*** 34,37 ****
--- 34,42 ----
#define __API_DEVICE_H
+ /**
+ * @file
+ * Api Device.
+ */
+
#if _MSC_VER >= 1000
# pragma once
***************
*** 50,106 ****
typedef long HDriver;
! // loads a driver
! // returns: 0 for error or other value for success
! // rnResult contains the error code if the functions returns with
error
HDriver DriverLoad(const std::string& rsDriver, long& rnResult);
! // return: the version of the loaded module
long DriverGetVersion(const HDriver& rhDriver);
! // the driver has a Query-Interface
#define DT_QUERY 0x00000001
! // the driver has a Interrupt-Interface
#define DT_INTERRUPT 0x00000002
! // the driver has a Polling-Interface
#define DT_POLL 0x00000004
! // returns: a bitfield, dependend on the interface(s)
! // the driver has
long DriverGetType(const HDriver& rhDriver);
! // returns the shortest polling intervall in microseconds
double DriverGetPollingIntervall(const HDriver& rhDriver);
// driver capabilities
! // device has data
#define DC_DATA 0x00000001
! // device has status information (like trigger or keyboard)
#define DC_STATUS 0x00000002
! // driver/device can give info text (like "USB devices")
#define DC_INFO_TEXT 0x00000004
! // driver can translate error numbers to text
#define DC_ERROR_TEXT 0x00000008
! // device/driver contains watchdog functionality
#define DC_WATCHDOG 0x00000010
! // device/driver is able to auto-wakeup
#define DC_WATCHDOG_AUTOWAKEUP 0x00000020
! // returns the capabilities of the driver
long DriverGetCapabilities(const HDriver& rhDriver);
! // driver has Query-Interface
#define FN_QUERY 0x00000000
! // driver can give Query answer as string
#define FN_QUERY_STRING 0x00000000
! // driver has changing info text
#define FN_INFO 0x00000000
! // driver wishes to call the colpatik API
#define FN_SET_CALLBACK 0x00000000
! // returns the functions of the driver as bit array
long DriverGetFunctions(const HDriver& rhDriver);
! // return all values of the previouse funcitons at ones
void DriverGetInfo(const HDriver& rhDriver,
long& rnVersion,
--- 55,167 ----
typedef long HDriver;
! /**
! * loads a driver.
! * @return 0 for error or other value for success.
! * @param rnResult contains the error code if the function returns with
error.
! */
HDriver DriverLoad(const std::string& rsDriver, long& rnResult);
! /**
! * Gets the Driver's Version.
! * @return the version of the loaded module.
! * @param rhDriver the driver whose version is in question.
! */
long DriverGetVersion(const HDriver& rhDriver);
! /**
! * the driver has a Query-Interface.
! */
#define DT_QUERY 0x00000001
! /**
! * the driver has a Interrupt-Interface.
! */
#define DT_INTERRUPT 0x00000002
! /**
! * the driver has a Polling-Interface.
! */
#define DT_POLL 0x00000004
!
! /**
! * Gets a driver's type.
! * @return a bitfield, dependend on the interface(s) the driver has.
! * @param rhDriver the driver whose type is in question.
! */
long DriverGetType(const HDriver& rhDriver);
! /**
! * Gets Polling Interval of a driver.
! * @return the shortest polling intervall in microseconds.
! * @param rhDriver the driver whose interval is in question.
! */
double DriverGetPollingIntervall(const HDriver& rhDriver);
// driver capabilities
! /**
! * device has data.
! */
#define DC_DATA 0x00000001
! /**
! * device has status information (like trigger or keyboard).
! */
#define DC_STATUS 0x00000002
! /**
! * driver/device can give info text (like "USB devices").
! */
#define DC_INFO_TEXT 0x00000004
! /**
! * driver can translate error numbers to text.
! */
#define DC_ERROR_TEXT 0x00000008
! /**
! * device/driver contains watchdog functionality.
! */
#define DC_WATCHDOG 0x00000010
! /**
! * device/driver is able to auto-wakeup.
! */
#define DC_WATCHDOG_AUTOWAKEUP 0x00000020
! /**
! * Gets the driver's capabilities.
! * @return the capabilities of the driver.
! * @param rhDriver the driver whose capabilities are in question.
! */
long DriverGetCapabilities(const HDriver& rhDriver);
! /**
! * driver has Query-Interface.
! */
#define FN_QUERY 0x00000000
! /**
! * driver can give Query answer as string.
! */
#define FN_QUERY_STRING 0x00000000
! /**
! * driver has changing info text.
! */
#define FN_INFO 0x00000000
! /**
! * driver wishes to call the colpatik API.
! */
#define FN_SET_CALLBACK 0x00000000
! /**
! * Get Driver Functions.
! * @return the functions of the driver as bit array.
! * @param rhDriver the driver to get the functions from.
! */
long DriverGetFunctions(const HDriver& rhDriver);
! /**
! * Get the Driver Information.
! * @return all values of the previouse funcitons at once.
! * @param rhDriver the driver to get the information from.
! * @param rnVersion its version.
! * @param rnType its type.
! * @param rnCapabilities its capabilities.
! * @param rnFunctions its functions.
! */
void DriverGetInfo(const HDriver& rhDriver,
long& rnVersion,
***************
*** 119,123 ****
char* pData;
} TDeviceData, *PDeviceData;
!
class CDeviceData : protected TDeviceData
{
--- 180,186 ----
char* pData;
} TDeviceData, *PDeviceData;
! /**
! * The CDeviceData Class. TODO a more detailed description.
! */
class CDeviceData : protected TDeviceData
{
***************
*** 131,135 ****
--- 194,210 ----
protected:
+ /**
+ * Grab what? TODO.
+ * @return success? TODO.
+ * @param pData Data to do what? TODO.
+ * @param nSize number of bytes? to Grab? TODO.
+ */
virtual bool Grab( char* pData, long nSize);
+ /**
+ * Copy what? TODO.
+ * @return success? TODO.
+ * @param pData Data to copy? TODO.
+ * @þaram nSize number of bytes to copy? TODO.
+ */
virtual bool Copy(const char* pData, long nSize);
***************
*** 137,156 ****
virtual double operator = ( double dData);
virtual const std::string& operator = (const std::string& rsData);
!
void InitBasics() {};
}; // class CDeviceData
! // calls the data from the driver
! // returns the state of the execution
! // 0 - success
! // not 0 - no success
long DriverDataGet(const HDriver& rhDriver,
TDeviceData& rstData);
! // returns the last error drom the driver
long DriverErrorLastGet(const HDriver& rhDriver);
! // gets an error text for an error number, if "nError" == 0,
! // the function returns the text for the last error
long DriverErrorTextGet(const HDriver& rhDriver,
std::string& rsError,
--- 212,245 ----
virtual double operator = ( double dData);
virtual const std::string& operator = (const std::string& rsData);
!
! /**
! * Initialize Basic WHAT? TODO.
! */
void InitBasics() {};
}; // class CDeviceData
! /**
! * calls the data from the driver.
! * @return the state of the execution @c 0 - success @c not 0 - no success.
! * @param rhDriver the driver to call the data from.
! * @param rstData Data to write get what? TODO.
! */
long DriverDataGet(const HDriver& rhDriver,
TDeviceData& rstData);
! /**
! * returns the last error from the driver.
! * @return the last error.
! * @param rhDriver driver of interest.
! */
long DriverErrorLastGet(const HDriver& rhDriver);
! /**
! * gets an error text for an error number.
! * @return what? TODO.
! * @param rsError if nError == 0, the text for the last error is stored
here.
! * @param nError defines the error number whose message is of interest?
TODO.
! * @param rhDriver the driver in question.
! */
long DriverErrorTextGet(const HDriver& rhDriver,
std::string& rsError,
***************
*** 158,179 ****
! // callback type definition (for interrupting devices))
typedef long (*pfnDeviceCallback)(const void* pData);
! // calback type declaration
#define CB_STATUS 'S'
#define CB_DATA 'D'
! // register the callback in the driver
bool DriverCallbackRegister(const HDriver& rhDriver,
const pfnDeviceCallback fnCallback,
char cType = CB_DATA);
! // inform the driver, that the given callback is dead now
void DriverCallbackFree (const HDriver& rhDriver,
const pfnDeviceCallback fnCallback);
! // callback prototypes
long DriverCallback4Data (const TDeviceData* pstData);
long DriverCallback4Status(const long* pnStatus);
--- 247,289 ----
! /**
! * callback type definition (for interrupting devices)).
! */
typedef long (*pfnDeviceCallback)(const void* pData);
! /**
! * calback type declaration.
! */
#define CB_STATUS 'S'
#define CB_DATA 'D'
! /**
! * register the callback in the driver.
! * @return success? TODO.
! * @param rhDriver the driver where the callbacks shall be registered.
! * @param fnCallback the Callback-fpn.
! * @param cType the type of the callbacks parameter? TODO.
! */
bool DriverCallbackRegister(const HDriver& rhDriver,
const pfnDeviceCallback fnCallback,
char cType = CB_DATA);
! /**
! * inform the driver, that the given callback is dead now.
! * @param rhDriver the driver to be informed.
! * @param fnCallback the dead callback? TODO.
! */
void DriverCallbackFree (const HDriver& rhDriver,
const pfnDeviceCallback fnCallback);
! /**
! * callback prototype for Data.
! * @param pstData devicedata TODO.
! */
long DriverCallback4Data (const TDeviceData* pstData);
+ /**
+ * callback prototype for Status.
+ * @param pnStatus status TODO.
+ */
long DriverCallback4Status(const long* pnStatus);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Moss-devel] CVS: moss/colpatik/include API_Applications.h,1.3,1.4 API_Device.h,1.3,1.4,
Alexander Feder <address@hidden> <=
- Prev by Date:
[Moss-devel] CVS: moss/colpatik/include/modules/input ColpatikDevice.h,1.4,1.5 ColpatikInput.h,1.3,1.4 Device.h,1.4,1.5 DeviceInterrupt.h,1.4,1.5 DevicePoll.h,1.3,1.4 DeviceQuery.h,1.3,1.4 Event.h,1.6,1.7 Queue.h,1.4,1.5
- Next by Date:
[Moss-devel] CVS: moss/colpatik/include/modules/filter Filter.h,1.4,1.5
- Previous by thread:
[Moss-devel] CVS: moss/colpatik/include/modules/input ColpatikDevice.h,1.4,1.5 ColpatikInput.h,1.3,1.4 Device.h,1.4,1.5 DeviceInterrupt.h,1.4,1.5 DevicePoll.h,1.3,1.4 DeviceQuery.h,1.3,1.4 Event.h,1.6,1.7 Queue.h,1.4,1.5
- Next by thread:
[Moss-devel] CVS: moss/colpatik/include/modules/filter Filter.h,1.4,1.5
- Index(es):