2017-02-09 7 views
0

cepheus cep Fiware 구성 요소를 사용하는 동안 문제가 발생했습니다. 들어오는 데이터를 처리하고 설정에서 미리 설정된 구조로 출력 데이터를 생성해야하는 Esper SQL 문은 물론 수신 및 결과 데이터의 구조를 설정하는 config.json 파일을 준비했습니다. 나는 누군가가 방에 들어 왔는지 (1 명을 보내 었는지) 누군가 방을 나갔다가 (-1을 보냈는) 센서 움직임 데이터로 Cepheus에 대한 최신 정보를 보내고 방 안에 들어있는 이전 사람들과 모션 수신 값을 합한 것을보고 싶다. 방에 사람들이 남아 있다면. 이것이 지금까지 만든 json 구성 파일입니다. 파일 쇼로설정 파일을 fiep cepheus cep에 전송하는 중 오류가 발생했습니다. GE

{ 
     "host":"http://localhost:8080", 
"in":[ 
    { 
     "id":"Lab.*", 
     "type":"Lab", 
     "isPattern": true, 
     "attributes":[ 
     { "name":"motion", "type":"integer","metadata": [ 
      { "name":"unit", "type":"string" } 
      ] } 
    , 

{ "name":"controller", "type":"string"}], 

     "providers":[ 
     "http://localhost:8081" 
     ] 
    } 
    ], 

"out":[ 
    { 
     "id":"ControllerX", 
     "type":"Controller", 
     "attributes":[ 

    { "name":"number", "type":"integer" 

     } 

] 
, 

     "brokers":[ 
     { 
      "url":"http://147.27.60.58:1026" 
     } 
     ] 
    } 
    ], 
"statements":[ "INSERT INTO Controller SELECT controller as id , motion prev(count(*)+number) as number From Lab.win:keepall() INNER JOIN Controller.win:keepall() ON controller = id  

" 

    ] 

는 문은 마지막 출력 이벤트에서 사람들의 이전 번호를 받고 모션 입력과 합계 (1 또는 -1) 새로운 사람들의 수를 얻을 후 출력 이벤트를 생성 출력 이벤트하지만 난이 config.json 파일을 보낼 때이 오류가 얻을 :

{"code":"400","reasonPhrase":"Failed to apply new configuration","details":"Error starting statement: Failed to validate select-clause expression 'motion+number': Implicit conversion from datatype 'Object' to numeric is not allowed [insert into Controller select controller as id, motion+number as number from Lab.win:keepall() inner outer join Controller.std:lastevent() on controller = id]"} 

이 오류는 정수 객체하지로 요약 값이 인식되는 것을 의미 하는가를? 그렇다면 어떻게 해결 될 수 있습니까?

답변

0

Cepheus CEP에서 지원하는 속성 유형을 사용하려고 했습니까?이 경우 int? string, int, long, float, double, boolean, dategeo:point :이 지원되는

유형의 속성.

+0

고마워 .. "int"와 "double"두 가지 유형으로 문제 테스트를 성공적으로 완료했습니다. – ahmad