|
|
@@ -103,19 +103,6 @@ class DeviceBaseClass
|
|
|
{
|
|
|
public:
|
|
|
|
|
|
-
|
|
|
-#if DEVICE_BASE_INTERFACE_FILE_VERSION == 2
|
|
|
-
|
|
|
- //
|
|
|
- // Open device.
|
|
|
- // argNum indicates counts of argument for open device.
|
|
|
- // argArray cotains the list of argument to open device need.
|
|
|
- // Such as: argNum=2 and argArray[0] = "port=3", argArray[1] = "baudrate=125600". etc
|
|
|
- //
|
|
|
- virtual ErrorCodeEnum DevOpen(int argNum, char* argArray) = 0;
|
|
|
-
|
|
|
-#endif
|
|
|
-
|
|
|
//
|
|
|
// Get category infomation about device.
|
|
|
//
|
|
|
@@ -136,38 +123,9 @@ public:
|
|
|
virtual ErrorCodeEnum GetLastErr(DevErrorInfo &devErrInfo) = 0;
|
|
|
};
|
|
|
|
|
|
-#if DEVICE_BASE_INTERFACE_FILE_VERSION == 1
|
|
|
-
|
|
|
DEVICEBASE_API ErrorCodeEnum CreateDevComponent(DeviceBaseClass*& baseObj);
|
|
|
DEVICEBASE_API ErrorCodeEnum ReleaseDevComponent(DeviceBaseClass*& pBaseObj);
|
|
|
|
|
|
-#elif DEVICE_BASE_INTERFACE_FILE_VERSION == 2
|
|
|
-
|
|
|
-/*!
|
|
|
- * @brief Create specified device adapter implement object
|
|
|
- * @param[in]
|
|
|
- * dwDevClassID: class ID defined each device module interfece file.
|
|
|
- * @param[out]
|
|
|
- * pOutDevAptObj: the device adapter object pointer created by vendor according with dwDevClassID, would be NULL normally.
|
|
|
- * @return :
|
|
|
- * if have not implement the device adapter object with dwDevClassID yet, return Error_NotSupport
|
|
|
- * if create device adapter object succefully, the pOutDevAptObj must have valid value, and return Error_Succeed
|
|
|
- */
|
|
|
-DEVICEBASE_API ErrorCodeEnum CreateDevComponent(DWORD dwDevClassID, DeviceBaseClass*& pOutDevAptObj);
|
|
|
-
|
|
|
-/*!
|
|
|
- * @brief Do clean job and free the device adapter implement object created by CreateDevComponent
|
|
|
- * @param[in]
|
|
|
- * dwDevClassID: if 0, ignore it, do some clean job and free pInDevAptObj
|
|
|
- * pInDevAptObj: the value equals with pOutDevAptObj at CreateDevComponent
|
|
|
- * @return :
|
|
|
- * if dwDevClassID is no-zero and cannot find the exist DeviceBaseClass object with dwDevClassID, return Error_NotExist.
|
|
|
- * else return Error_Succeed normally.
|
|
|
- */
|
|
|
-DEVICEBASE_API ErrorCodeEnum ReleaseDevComponent(DWORD dwDevClassID, DeviceBaseClass*& pInDevAptObj);
|
|
|
-
|
|
|
-#endif
|
|
|
-
|
|
|
#ifdef __cplusplus
|
|
|
}
|
|
|
#endif
|