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.
mitlib.pub/MITLIB/mcctrdll/OperationsTime.h

80 lines
2.0 KiB
C++

// OperationsTime.h: interface for the COperationsTime class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_OPERATIONSTIME_H__B7A78A65_4ED7_4A15_9542_23F3076ABC15__INCLUDED_)
#define AFX_OPERATIONSTIME_H__B7A78A65_4ED7_4A15_9542_23F3076ABC15__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "Uptime.h"
#include "Downtime.h"
/*
#ifdef BUILD_MCCTRDLL
#define MCCTRDLLCLASS __declspec(dllexport)
#else
#define MCCTRDLLCLASS __declspec(dllimport)
#endif
class MCCTRDLLCLASS COperationsTime*/
class MCCTRDLLCLASS COperationsTime
{
public:
// default constructor
COperationsTime();
// default destructor
virtual ~COperationsTime();
// read all equipment substate time span from file
void ReadTimeSpanFromFile();
// set uptime and downtime equipment state
void SetEquipState(int iEvt, int iState);
// get total uptime and down equipment state
LONGLONG GetTotalTime();
// get Uptime in counts
LONGLONG GetUptime();
// get engineering time in counts
LONGLONG GetEngineeringTime();
// get manufacturing time in counts
LONGLONG GetManufacturingTime();
// get productive time in counts
LONGLONG GetProductiveTime();
// get standby time in counts
LONGLONG GetStandbyTime();
// get downtime in counts
LONGLONG GetDowntime();
// get unscheduled downtime in counts
LONGLONG GetUnscheduledDowntime();
// get scheduled downtime in counts
LONGLONG GetScheduledDowntime();
// get equipment substate time
LONGLONG GetEquipSubStateTime(int iEvt);
// save equipment substate time periodically to file
void SaveTimeInfo();
// check is equipment Substate timer started
bool IsTimerStarted(int iEvt);
private:
CUptime m_uptime; // uptime
CDowntime m_downtime; // down time
};
#endif // !defined(AFX_OPERATIONSTIME_H__B7A78A65_4ED7_4A15_9542_23F3076ABC15__INCLUDED_)