[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.2,1.3 API_D
From: |
Manfred Morgner <address@hidden> |
Subject: |
[Moss-devel] CVS: moss/colpatik/include API_Applications.h,1.2,1.3 API_Device.h,1.2,1.3 Makefile.am,1.3,1.4 |
Date: |
Wed, 30 Oct 2002 18:35:55 -0500 |
Update of /cvsroot/moss//moss/colpatik/include
In directory subversions:/tmp/cvs-serv4779/include
Modified Files:
API_Applications.h API_Device.h Makefile.am
Log Message:
Check under and back-port to Win32
Index: API_Applications.h
===================================================================
RCS file: /cvsroot/moss//moss/colpatik/include/API_Applications.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** API_Applications.h 30 Oct 2002 01:48:47 -0000 1.2
--- API_Applications.h 30 Oct 2002 23:35:52 -0000 1.3
***************
*** 1,106 ****
! /***************************************************************************
! API_Applications.h
! ---------------------
! begin : Tue Apr 30 2002
! copyright : (C) 2002 by Manfred Morgner
! email : address@hidden
!
! Applications Interface for Colpatik
!
! ***************************************************************************/
!
! /***************************************************************************
! * *
! * This program is free software; you can redistribute it and/or modify *
! * it under the terms of the GNU General Public License as published by *
! * the Free Software Foundation; either version 2 of the License, or *
! * (at your option) any later version. *
! * *
! * This program is distributed in the hope that it will be useful, *
! * but WITHOUT ANY WARRANTY; without even the implied warranty of *
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
! * GNU General Public License for more details. *
! * *
! * You should have received a copy of the GNU General Public License *
! * along with this program; if not, write to the *
! * *
! * Free Software Foundation, Inc., *
! * 59 Temple Place Suite 330, *
! * Boston, MA 02111-1307, USA. *
! * *
! ***************************************************************************/
!
! #ifndef __API_APPLICATIONS_H
! #define __API_APPLICATIONS_H
!
! #if _MSC_VER >= 1000
! # pragma once
! # pragma warning (disable : 4786)
! # endif // _MSC_VER >= 1000
!
! #if __GNU__ >= 2
! # pragma interface
! #endif // #if __GNU__ >= 2
!
!
! namespace colpatik
! {
! // the data type for any entity
! typedef
! struct tagEntity
! {
! time_t tLocalTime;
! long nId;
! } TEntity, *PEntity;
!
! // the appropiate class definition
! class CEntity : public TEntity
! {
! private:
! typedef TEntity inherited;
!
! public:
! CEntity() {};
! virtual ~CEntity() {};
! }; // 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
! {
! time_t tLocalTime;
! long nData;
! long nInfo;
! PDeviceData pData;
! } TMessage, *PMessage;
!
! // the appropiate class definition
! class CMessage : public TMessage
! {
! private:
! typedef TMessage inherited;
!
! public:
! CMessage() {};
! virtual ~CMessage() {};
! }; // 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);
!
! } // namespace colpatik
!
! #endif // __API_APPLICATIONS_H
--- 1,106 ----
! /***************************************************************************
! API_Applications.h
! ---------------------
! begin : Tue Apr 30 2002
! copyright : (C) 2002 by Manfred Morgner
! email : address@hidden
!
! Applications Interface for Colpatik
!
! ***************************************************************************/
!
! /***************************************************************************
! * *
! * This program is free software; you can redistribute it and/or modify *
! * it under the terms of the GNU General Public License as published by *
! * the Free Software Foundation; either version 2 of the License, or *
! * (at your option) any later version. *
! * *
! * This program is distributed in the hope that it will be useful, *
! * but WITHOUT ANY WARRANTY; without even the implied warranty of *
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
! * GNU General Public License for more details. *
! * *
! * You should have received a copy of the GNU General Public License *
! * along with this program; if not, write to the *
! * *
! * Free Software Foundation, Inc., *
! * 59 Temple Place Suite 330, *
! * Boston, MA 02111-1307, USA. *
! * *
! ***************************************************************************/
!
! #ifndef __API_APPLICATIONS_H
! #define __API_APPLICATIONS_H
!
! #if _MSC_VER >= 1000
! # pragma once
! # pragma warning (disable : 4786)
! # endif // _MSC_VER >= 1000
!
! #if __GNU__ >= 2
! # pragma interface
! #endif // #if __GNU__ >= 2
!
!
! namespace colpatik
! {
! // the data type for any entity
! typedef
! struct tagEntity
! {
! time_t tLocalTime;
! long nId;
! } TEntity, *PEntity;
!
! // the appropiate class definition
! class CEntity : public TEntity
! {
! private:
! typedef TEntity inherited;
!
! public:
! CEntity() {};
! virtual ~CEntity() {};
! }; // 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
! {
! time_t tLocalTime;
! long nData;
! long nInfo;
! PDeviceData pData;
! } TMessage, *PMessage;
!
! // the appropiate class definition
! class CMessage : public TMessage
! {
! private:
! typedef TMessage inherited;
!
! public:
! CMessage() {};
! virtual ~CMessage() {};
! }; // 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);
!
! } // namespace colpatik
!
! #endif // __API_APPLICATIONS_H
Index: API_Device.h
===================================================================
RCS file: /cvsroot/moss//moss/colpatik/include/API_Device.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** API_Device.h 30 Oct 2002 01:48:47 -0000 1.2
--- API_Device.h 30 Oct 2002 23:35:52 -0000 1.3
***************
*** 1,182 ****
! /***************************************************************************
! API_Device.h - description
! -------------------
! begin : Tue Apr 30 2002
! copyright : (C) 2002 by Manfred Morgner
! email : address@hidden
!
! Device Interface for Colpatik
!
! ***************************************************************************/
!
! /***************************************************************************
! * *
! * This program is free software; you can redistribute it and/or modify *
! * it under the terms of the GNU General Public License as published by *
! * the Free Software Foundation; either version 2 of the License, or *
! * (at your option) any later version. *
! * *
! * This program is distributed in the hope that it will be useful, *
! * but WITHOUT ANY WARRANTY; without even the implied warranty of *
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
! * GNU General Public License for more details. *
! * *
! * You should have received a copy of the GNU General Public License *
! * along with this program; if not, write to the *
! * *
! * Free Software Foundation, Inc., *
! * 59 Temple Place Suite 330, *
! * Boston, MA 02111-1307, USA. *
! * *
! ***************************************************************************/
!
! #ifndef __API_DEVICE_H
! #define __API_DEVICE_H
!
! #if _MSC_VER >= 1000
! # pragma once
! # pragma warning (disable : 4786)
! # endif // _MSC_VER >= 1000
!
! #if __GNU__ >= 2
! # pragma interface
! # endif // #if __GNU__ >= 2
!
!
! #include <string>
!
! namespace colpatik
! {
! 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,
! long& rnType,
! long& rnCapabilities,
! long& rnFunctions);
!
! typedef
! struct tagDeviceData
! {
! time_t tLocalTime;
! long nPriority;
! long nClass;
! long nState;
! long nDataSize;
! char* pData;
! } TDeviceData, *PDeviceData;
!
! class CDeviceData : protected TDeviceData
! {
! private:
! typedef TDeviceData inherited;
!
! public:
! CDeviceData();
! CDeviceData(const TDeviceData& rstSrc);
! virtual ~CDeviceData();
!
! protected:
! virtual bool Grab( char* pData, long nSize);
! virtual bool Copy(const char* pData, long nSize);
!
! virtual long operator = ( long nData);
! 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,
! long nError = 0);
!
!
! // 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);
!
! } // namespace colpatik
!
! #endif // __API_DEVICE_H
--- 1,182 ----
! /***************************************************************************
! API_Device.h - description
! -------------------
! begin : Tue Apr 30 2002
! copyright : (C) 2002 by Manfred Morgner
! email : address@hidden
!
! Device Interface for Colpatik
!
! ***************************************************************************/
!
! /***************************************************************************
! * *
! * This program is free software; you can redistribute it and/or modify *
! * it under the terms of the GNU General Public License as published by *
! * the Free Software Foundation; either version 2 of the License, or *
! * (at your option) any later version. *
! * *
! * This program is distributed in the hope that it will be useful, *
! * but WITHOUT ANY WARRANTY; without even the implied warranty of *
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
! * GNU General Public License for more details. *
! * *
! * You should have received a copy of the GNU General Public License *
! * along with this program; if not, write to the *
! * *
! * Free Software Foundation, Inc., *
! * 59 Temple Place Suite 330, *
! * Boston, MA 02111-1307, USA. *
! * *
! ***************************************************************************/
!
! #ifndef __API_DEVICE_H
! #define __API_DEVICE_H
!
! #if _MSC_VER >= 1000
! # pragma once
! # pragma warning (disable : 4786)
! # endif // _MSC_VER >= 1000
!
! #if __GNU__ >= 2
! # pragma interface
! # endif // #if __GNU__ >= 2
!
!
! #include <string>
!
! namespace colpatik
! {
! 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,
! long& rnType,
! long& rnCapabilities,
! long& rnFunctions);
!
! typedef
! struct tagDeviceData
! {
! time_t tLocalTime;
! long nPriority;
! long nClass;
! long nState;
! long nDataSize;
! char* pData;
! } TDeviceData, *PDeviceData;
!
! class CDeviceData : protected TDeviceData
! {
! private:
! typedef TDeviceData inherited;
!
! public:
! CDeviceData();
! CDeviceData(const TDeviceData& rstSrc);
! virtual ~CDeviceData();
!
! protected:
! virtual bool Grab( char* pData, long nSize);
! virtual bool Copy(const char* pData, long nSize);
!
! virtual long operator = ( long nData);
! 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,
! long nError = 0);
!
!
! // 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);
!
! } // namespace colpatik
!
! #endif // __API_DEVICE_H
Index: Makefile.am
===================================================================
RCS file: /cvsroot/moss//moss/colpatik/include/Makefile.am,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** Makefile.am 28 Oct 2002 22:42:28 -0000 1.3
--- Makefile.am 30 Oct 2002 23:35:52 -0000 1.4
***************
*** 1,8 ****
! SUBDIRS =
!
! EXTRA_DIST = ColpatikDevice.h ColpatikInput.h Event.h Queue.h Device.h
DeviceQuery.h DevicePoll.h DeviceInterrupt.h
!
! install-data-local:
! $(mkinstalldirs) $(prefix)/include/3Dsia/
! $(INSTALL_DATA) API_Applications.h
$(prefix)/include/3Dsia/API_Applications.h
! $(INSTALL_DATA) API_Device.h $(prefix)/include/3Dsia/API_Device.h
--- 1,8 ----
! SUBDIRS =
!
! EXTRA_DIST = ColpatikDevice.h ColpatikInput.h Event.h Queue.h Device.h
DeviceQuery.h DevicePoll.h DeviceInterrupt.h
!
! install-data-local:
! $(mkinstalldirs) $(prefix)/include/3Dsia/
! $(INSTALL_DATA) API_Applications.h
$(prefix)/include/3Dsia/API_Applications.h
! $(INSTALL_DATA) API_Device.h $(prefix)/include/3Dsia/API_Device.h
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Moss-devel] CVS: moss/colpatik/include API_Applications.h,1.2,1.3 API_Device.h,1.2,1.3 Makefile.am,1.3,1.4,
Manfred Morgner <address@hidden> <=
- Prev by Date:
[Moss-devel] CVS: moss/colpatik/src/modules/filter Filter.cxx,1.4,1.5 Makefile.am,1.2,1.3
- Next by Date:
[Moss-devel] CVS: moss/colpatik/include/modules/input ColpatikDevice.h,1.3,1.4 ColpatikInput.h,1.2,1.3 Device.h,1.3,1.4 DeviceInterrupt.h,1.3,1.4 DevicePoll.h,1.2,1.3 DeviceQuery.h,1.2,1.3 Event.h,1.5,1.6 Makefile.am,1.2,1.3 Queue.h,1.3,1.4
- Previous by thread:
[Moss-devel] CVS: moss/colpatik/src/modules/filter Filter.cxx,1.4,1.5 Makefile.am,1.2,1.3
- Next by thread:
[Moss-devel] CVS: moss/colpatik/include/modules/input ColpatikDevice.h,1.3,1.4 ColpatikInput.h,1.2,1.3 Device.h,1.3,1.4 DeviceInterrupt.h,1.3,1.4 DevicePoll.h,1.2,1.3 DeviceQuery.h,1.2,1.3 Event.h,1.5,1.6 Makefile.am,1.2,1.3 Queue.h,1.3,1.4
- Index(es):