| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- #ifndef LIBFRAMEWORK_UPS_H
- #define LIBFRAMEWORK_UPS_H
- #include "UpsClass.h"
- class CUps : public UpsClass
- {
- public:
- CUps(void);
- ~CUps(void);
- //
- // Device initialization.
- // Configure port input/output direction.
- //
- virtual ErrorCodeEnum DevOpen(DWORD dwPort,DWORD dwBaudRate);
- //
- // Get device status
- //
- virtual ErrorCodeEnum GetDevStatus(UpsStatusEnum &eStatus);
- //
- // Shutdown ups and restart it in minutes.
- // Arguments:
- // - dwShutTime:time to shutdown (in minutes)
- // - dwRestartTime:time to restart (in minutes)
- //
- virtual ErrorCodeEnum Shutdown(DWORD dwShutTime,DWORD dwRestartTime);
- //
- // Get category infomation about device.
- //
- virtual ErrorCodeEnum GetDevCategory(DevCategoryInfo &devCategory);
- //
- // Reset device.
- // Do the cleaning work and initialize device again in order to return to
- // the normal condition.
- virtual ErrorCodeEnum Reset();
- //
- // Close device and do the cleaning work.
- // ex. close connection,close port,release memery and so on
- virtual ErrorCodeEnum DevClose();
- //
- // Get last error the device issued.
- // Error message must include explanatory memorandum ,the original error
- // code and anything in favour of location problem.
- virtual ErrorCodeEnum GetLastErr(DevErrorInfo &devErrInfo);
- private:
- ErrorCodeEnum ErrParse(long lResult);
- DevErrorInfo m_DevErrorInfo;
- };
- #endif //LIBFRAMEWORK_CARDSWIPER_IMPL_H
|