You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
71 lines
1.8 KiB
C++
71 lines
1.8 KiB
C++
// Uptime.h: interface for the CUptime class.
|
|
//
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
#if !defined(AFX_UPTIME_H__7B2F2B08_DF63_4971_BDCD_FE0336E2719F__INCLUDED_)
|
|
#define AFX_UPTIME_H__7B2F2B08_DF63_4971_BDCD_FE0336E2719F__INCLUDED_
|
|
|
|
#if _MSC_VER > 1000
|
|
#pragma once
|
|
#endif // _MSC_VER > 1000
|
|
|
|
#include "EngineeringTime.h"
|
|
#include "ManufacturingTime.h"
|
|
|
|
/*
|
|
#ifdef BUILD_MCCTRDLL
|
|
#define MCCTRDLLCLASS __declspec(dllexport)
|
|
#else
|
|
#define MCCTRDLLCLASS __declspec(dllimport)
|
|
#endif
|
|
|
|
class MCCTRDLLCLASS CUptime*/
|
|
class CUptime
|
|
{
|
|
public:
|
|
// default constructor
|
|
CUptime();
|
|
|
|
// default destructor
|
|
virtual ~CUptime();
|
|
|
|
// read all equipment substate time span from file
|
|
void ReadTimeSpanFromFile();
|
|
|
|
// save equipment substate time periodically to file
|
|
void SaveTimeInfo();
|
|
|
|
// set engineering time and manufacturing time equipment state
|
|
void SetEquipState(int iEvt, int iState);
|
|
|
|
// get total engineering time and manufacturing time equipment state time
|
|
LONGLONG GetTotalTime();
|
|
|
|
// get Uptime
|
|
LONGLONG GetUptime();
|
|
|
|
// get engineering time
|
|
LONGLONG GetEngineeringTime();
|
|
|
|
// get manufacturing time
|
|
LONGLONG GetManufacturingTime();
|
|
|
|
// get productive time
|
|
LONGLONG GetProductiveTime();
|
|
|
|
// get standby time
|
|
LONGLONG GetStandbyTime();
|
|
|
|
// get equipment substate time
|
|
LONGLONG GetEquipSubStateTime(int iEvt);
|
|
|
|
// check is equipment Substate timer started
|
|
bool IsTimerStarted(int iEvt);
|
|
|
|
private:
|
|
CEngineeringTime m_engineeringTime; // engineering time
|
|
CManufacturingTime m_manufacturingTime; // manufacturing time
|
|
};
|
|
|
|
#endif // !defined(AFX_UPTIME_H__7B2F2B08_DF63_4971_BDCD_FE0336E2719F__INCLUDED_)
|