| | |
| | | "time" |
| | | ) |
| | | |
| | | func Entrance (args *structure.SdkDatas,groupRule protomsg.GroupRule,lable *structure.Others,message *protomsg.SdkMessage) (bool,[]*structure.Arg,string,string){ |
| | | func Entrance (args *structure.SdkDatas,groupRule protomsg.GroupRule,lable *structure.Others,message *protomsg.SdkMessage) (bool,string,string){ |
| | | resultSplice := []*structure.LittleRuleResult{} |
| | | sdkNames := "" |
| | | polygonId := "" |
| | |
| | | } |
| | | // 个体静止 |
| | | for j := 0; j < len(groupRule.Rules); j++ { |
| | | if groupRule.Rules[j].SdkId == "个体静止" && groupRule.Rules[j].SdkArgAlias != "time_rule"{ |
| | | if groupRule.Rules[j].SdkId == "812b674b-2375-4589-919a-5c1c3278a977" && groupRule.Rules[j].SdkArgAlias != "time_rule"{ |
| | | for _, sdkData := range args.Sdkdata { |
| | | // 根据规则的sdkId查出其对应的ipcId,用ipcId去找该比对的数据 |
| | | sdk, err := cache.GetSdkById(groupRule.Rules[j].SdkId) |
| | |
| | | panic("规则有误,得到的数学公式不可解析") |
| | | } |
| | | result, _ := expression.Evaluate(nil) // 得到数学公式的结果 |
| | | return result.(bool),nil,sdkNames,polygonId |
| | | return result.(bool),sdkNames,polygonId |
| | | } else { |
| | | return false,nil,sdkNames,polygonId |
| | | return false,sdkNames,polygonId |
| | | } |
| | | } |
| | | |
| | |
| | | soName = "personUnsual.so" |
| | | } else if sdkId == "812b674b-2375-4589-919a-5c1c3278a972" { |
| | | soName = "faceCompare.so" |
| | | } else if sdkId == "个体静止" { |
| | | } else if sdkId == "812b674b-2375-4589-919a-5c1c3278a977" { |
| | | soName = "static.so" |
| | | } else if sdkId == "812b674b-2375-4589-919a-5c1c3278a978" { |
| | | soName = "car.so" |
| | | } |
| | | //soInfo,errr := cache.GetSoInfoById(sdkId) |
| | | //if errr != nil { |