From 2e928b53eed70d0efdf3b44aae151303345481db Mon Sep 17 00:00:00 2001 From: wangpeng <1563129468@qq.com> Date: 星期三, 22 五月 2019 13:53:05 +0800 Subject: [PATCH] msg 增加 marsal --- protomsg.proto | 179 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 179 insertions(+), 0 deletions(-) diff --git a/protomsg.proto b/protomsg.proto index ce5d2c3..692d8a9 100644 --- a/protomsg.proto +++ b/protomsg.proto @@ -19,3 +19,182 @@ int32 height = 2; bytes data = 3; } + +//Area缁撴瀯浣� +message Area{ + int32 id = 1; + int32 parentid = 2; + string name = 3; +} + +//Camera缁撴瀯浣� +message Camera { + string id = 1; + string name = 2; + int32 type = 3; + string addr = 4; + int32 areaid = 5; + float longitude = 6; + float latitude = 7; + string rtsp = 8; + string ip = 9; + int32 port = 10; + string username = 11; + string password = 12; + string brand = 13; + string reserved = 14; +} + +//Task缁撴瀯浣� +message Task { + string taskid = 1; + string taskname = 2; + string create_at = 3; + string create_by = 4; + string update_at = 5; + bool enable = 6; + bool is_alarm = 7; + bool del_flag = 8; +} + +message TaskSdkInfo { + Task task = 1; + repeated Sdk sdks = 2; +} + +//鎽勫儚鏈轰换鍔� +message CameraTask { + string id = 1; + string camera_ids = 2;//鎽勫儚鏈篿d + string task_id = 3;//浠诲姟id + repeated DayCtl time_rule = 4;//甯冮槻鏃堕棿 + string react_rule = 5;//鑱斿姩鏂瑰紡 + string react_device = 6;//鑱斿姩璁惧 + bool del_flag = 7; //閫昏緫鍒犻櫎鏍囪 + bool update_flag = 8;//鏄惁鍙傛暟鏇存柊浜� + bool enable = 9; //鏄惁鍚敤 + int32 sort = 10; //浠诲姟鎺掑簭 + bool is_full = 11;//鍙傛暟鏄惁璁剧疆瀹屾暣 + string link_group_id = 12; +} + +//DayCtl struct 姣忓ぉ鐨勬椂闂存帶鍒惰鍒� +message DayCtl { + int32 day = 1;//1-7琛ㄧず鏄熸湡涓�鍒版槦鏈熸棩 + repeated TimeRange time_range = 2; +} + +//鏃堕棿璧峰鑼冨洿 +message TimeRange { + string start = 1;//寮�濮� + string end = 2;//缁撴潫 +} + +//Polygon struct +message Polygon { + string id = 1;//褰㈢姸id + string name = 2;//褰㈢姸鐨勫悕绉� + repeated Point points = 4;//鐐圭殑闆嗗悎 +} + +message CameraTaskArgs { + string id =1; + string camera_task_id =2; + string camera_id =3; + string polygon_id =4; + string sdk_id = 5; + string sdk_arg_alias = 6; + string operator = 7; + string operator_type = 8; + string sdk_arg_value = 9; + int32 sort = 10; + string rule_with_next = 11; + string group_id =12; + +} + +//Sdk struct +message Sdk { + string id = 1; + string sdk_type = 2;//绠楁硶绫诲瀷 + string sdk_name = 3;//sdk鍚嶇О + repeated SdkArg args = 4;//绠楁硶鍙傛暟 + string icon = 5;//绠楁硶鍥炬爣 + string url = 6;//绠楁硶涓嬭浇鍦板潃 + string create_time = 7; + string update_time = 8; + string create_by = 9; + string enabled = 10;//鏄惁鍚敤 + string del_flag = 11;//鏄惁鍒犻櫎 +} + +//SdkArg struct +message SdkArg { + string alias = 2;//鍙傛暟鍒悕 + string name = 3;//鍙傛暟鍚嶇О + string type = 4;//鍙傛暟绫诲瀷 + bool must = 5;//鍙傛暟鏄惁蹇呭~ + string range = 6;//鍙傛暟鐨勮寖鍥� + int32 sort = 7;//鍙傛暟鎺掑簭 +} + +// struct for sdk +message Point{ + int32 x = 1; + int32 y = 2; +} +message Rect{ + int32 left = 1; + int32 top = 2; + int32 right = 3; + int32 bottom = 4; +} +message FaceAngle{ + int32 yaw = 1; + int32 pitch =2; + int32 roll = 3; + float confidence =4; +} +message ThftResult{ + int32 gender = 1; + int32 age = 2; + int32 race = 3; + int32 beauty = 4; + int32 smile = 5; +} +message FacePos{ + Rect rcFace = 1; + Point ptLeftEye = 2; + Point ptRightEye = 3; + Point ptMouth = 4; + Point ptNose = 5; + FaceAngle fAngle = 6; + int32 quality = 7; + bytes facialData = 8; +} +message FaceInfo{ + Rect rcFace = 1; + Point ptLeftEye = 2; + Point ptRightEye = 3; + Point ptMouth = 4; + Point ptNose = 5; + FaceAngle fAngle = 6; + int32 quality = 7; + bytes facialData = 8; + int64 faceID = 9; +} +message ObjInfo{ + Rect rcObj = 1; + int32 typ = 2; + float prob = 3; +} +// sdk face property +message ParamFaceProperty{ + FacePos pos = 1; + Image img = 2; +} +// sdk face extract +message ParamFaceCompare{ + bytes feat1 = 1; + bytes feat2 = 2; +} -- Gitblit v1.8.0