65 lines
2.4 KiB
C
65 lines
2.4 KiB
C
|
|
/*********************************************************************
|
||
|
|
*
|
||
|
|
* file: FileJson.h
|
||
|
|
*
|
||
|
|
* copyright: Shanghai Baosight Software Co., Ltd.
|
||
|
|
*
|
||
|
|
* author: zoufuzhou
|
||
|
|
*********************************************************************/
|
||
|
|
#ifndef _H_FileJson_H
|
||
|
|
#define _H_FileJson_H
|
||
|
|
#include <zio/FileZone.h>
|
||
|
|
//#include <glob/ProxyMag.h>
|
||
|
|
#include <proxy/MessageICE.h>
|
||
|
|
#include <glob/BinaryTele.h>
|
||
|
|
#include<glob/ProxyMag.h>
|
||
|
|
|
||
|
|
class FileJson : public FileZone
|
||
|
|
{
|
||
|
|
public:
|
||
|
|
/*************
|
||
|
|
* rootdir:save root dir
|
||
|
|
* mode: 0:save by zone, 1:save by length precision 2:save to one file
|
||
|
|
**************/
|
||
|
|
FileJson(const std::string& rootdir,int mode = 0,bool iszip = true);
|
||
|
|
public:
|
||
|
|
virtual ~FileJson(void);
|
||
|
|
|
||
|
|
|
||
|
|
protected:
|
||
|
|
|
||
|
|
/*create file content by zone*/
|
||
|
|
virtual int fileContent(int zone,int zindex,int start,int end,const std::string& entId,const std::string& extId,Json::Value& jv_zone,Json::Value& jv_stat);
|
||
|
|
|
||
|
|
/*create file content by length precision*/
|
||
|
|
virtual int fileContent(const std::string& entId,const std::string& extId, Json::Value& jvalue,Json::Value& jv_stat);
|
||
|
|
|
||
|
|
/*create file content to one file */
|
||
|
|
virtual int totalContent(const std::string& entId,const std::string& extId, Json::Value& jvalue,Json::Value& jv_stat);
|
||
|
|
virtual int totalContent(const std::string& entId, Json::Value& jvalue,Json::Value& jv_stat);
|
||
|
|
|
||
|
|
virtual int readfile(const string& file,string& datastream);
|
||
|
|
|
||
|
|
public:
|
||
|
|
float getItemValue(string entId,string extId,string item);
|
||
|
|
int getModPdoL2Data(const string& extId,float& F1_WR_Diameter,float& F1_WR_CoilCnt,float (&myu_para)[5],float& width);
|
||
|
|
int Calstrength(const string& extId,map<string,Json::Value>& m_jv,Json::Value& jv_zone);
|
||
|
|
int deform_resist(float entThick, /* entry thickness unit:mm */
|
||
|
|
float delThick, /* delivery thickness unit:mm */
|
||
|
|
float rollforce, /* roll force unit:t */
|
||
|
|
float entTension, /* entry unit tension unit:t */
|
||
|
|
float delTension, /* entry unit tension unit:t */
|
||
|
|
float radius, /* WR roll radius unit:mm */
|
||
|
|
float v_strip, /* strip speed unit:mpm */
|
||
|
|
float rolled_number,/* rolled coil number unit:- */
|
||
|
|
float myu_para[5], /* friction parameter unit:- */
|
||
|
|
float width ); /* Strip width unit:mm */
|
||
|
|
private:
|
||
|
|
BinaryTele* p_tele;
|
||
|
|
// MessageICEPrx zdb_proxy;
|
||
|
|
// MessageICEPrx ztsdb_proxy;
|
||
|
|
// MessageICEPrx zstat_proxy;
|
||
|
|
};
|
||
|
|
|
||
|
|
#endif
|