2025-03-13 11:01:20 +08:00

62 lines
1.7 KiB
Protocol Buffer
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//========================================================================================
// @file Public.proto
// @brief ???????????????,VAR?????
// @author ???
//========================================================================================
syntax="proto2";
package iot_idl;
// Proto??????
//========================================================================================
enum DataType
{
CN_DATATYPE_BOOL = 1;
CN_DATATYPE_UINT32 = 2;
CN_DATATYPE_INT32 = 3;
CN_DATATYPE_UINT64 = 4;
CN_DATATYPE_INT64 = 5;
CN_DATATYPE_FLOAT = 6;
CN_DATATYPE_DOUBLE = 7;
CN_DATATYPE_STRING = 8;
CN_DATATYPE_BYTES = 9;
}
//??????
//========================================================================================
message SVariable
{
required DataType eDataType =1;
optional bool bValue =2;
optional uint32 uValue =3;
optional int32 nValue =4;
optional uint64 ulValue =5;
optional int64 lValue =6;
optional float fValue =7;
optional double dValue =8;
optional string strValue =9;
}
enum ENConditionLogic{
enumCondAnd = 0;
enumCondOr = 1;
}
enum ENConditionRelation{
enumCondEqual = 0;
enumCondLarge = 1;
enumCondSmall = 2;
enumCondLargeEqual = 3;
enumCondSmallEqual = 4;
enumCondNotEqual = 5;
}
// 括号,暂无需求,未实现。用于改变优先级,枚举值有:无,括号开始,括号结束
// 可嵌套
// enum ENConditionBracket{
// enumBracketNone = 0; // 无括号
// enumBracketStart = 1; // 括号开始等效于在SQL中生成一个左括号
// enumBracketEnd = 2; // 括号结束等效于在SQL中生成一个右括号 )
// }