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.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
# pragma once
# include <string>
# include <vector>
# include <map>
# include <list>
# include "data/Data.h"
/*
* 结构类型数据
*BoltMode
*
*/
typedef struct
{
//unsigned char format; // 制式
std : : list < std : : string > diameterList ;
std : : list < std : : string > typeList ;
std : : list < int > torqueList ;
} BoltModeFormatParam_t ;
typedef struct
{
std : : string name ; // 名称
BoltModeFormatParam_t format [ 2 ] ; // 0-公制, 1-英制
} BoltModeParam_t ;
class BoltModeStructData : public Data
{
public :
BoltModeStructData ( ) ;
BoltModeStructData ( BoltModeParam_t * data ) ;
virtual ~ BoltModeStructData ( ) ;
Data * clone ( ) override ;
void copy ( Data * data ) override ;
void copy ( Data & data ) override ;
int length ( ) override ;
// 转换为字符串格式
virtual std : : string toStr ( ) override ;
// 转换为Byte字符串
virtual std : : string toByteStr ( ) override ;
// 转换为十六进制字符串
virtual std : : string toHexStr ( ) override ;
// 根据Byte字符串解析数据
virtual bool fromByteStr ( std : : string str = " " ) override ;
BoltModeParam_t * getData ( ) { return m_data ; }
void setData ( BoltModeParam_t * data ) ;
void copyData ( BoltModeParam_t * data ) ;
private :
BoltModeParam_t * m_data ;
} ;