You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am new to Scala, so please, excuse me in advance if this sounds like a silly issue.
I added this piece of code in the match case of ExampleServerTestApp.scala.
case req: HeartbeatReq => HeartbeatRes(currentTime = ZonedDateTime.now())
And I get this in response:
Received request HeartbeatReq from client ocppws [scala-execution-context-global-88] WARN com.thenewmotion.ocpp.json.api.CentralSystemOcpp1XConnectionComponent$CentralSystemOcpp1XConnection - Exception processing OCPP request Heartbeat: com.thenewmotion.ocpp.json.api.OcppException: com.thenewmotion.ocpp.json.PayloadErrorCode$NotImplemented$@72712127: Request type not implemented at com.thenewmotion.ocpp.json.api.OcppException$.apply(OcppConnectionComponent.scala:61) at com.thenewmotion.ocpp.json.example.ExampleServerTestApp$$anon$1.$anonfun$handleConnection$2(ExampleServerTestApp.scala:57) at com.thenewmotion.ocpp.json.api.RequestHandler$$anon$4.$anonfun$apply$4(RequestHandler.scala:68) at scala.concurrent.Future$.$anonfun$apply$1(Future.scala:659) at scala.util.Success.$anonfun$map$1(Try.scala:255) at scala.util.Success.map(Try.scala:213) at scala.concurrent.Future.$anonfun$map$1(Future.scala:292) at scala.concurrent.impl.Promise.liftedTree1$1(Promise.scala:33) at scala.concurrent.impl.Promise.$anonfun$transform$1(Promise.scala:33) at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64) at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1402) at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:175)
to a HeartBeat.Req [2,"1383653547","Heartbeat",{}]
Could you please tell me what is wrong with my code?
Hello,
I am new to Scala, so please, excuse me in advance if this sounds like a silly issue.
I added this piece of code in the match case of ExampleServerTestApp.scala.
case req: HeartbeatReq => HeartbeatRes(currentTime = ZonedDateTime.now())And I get this in response:
Received request HeartbeatReq from client ocppws [scala-execution-context-global-88] WARN com.thenewmotion.ocpp.json.api.CentralSystemOcpp1XConnectionComponent$CentralSystemOcpp1XConnection - Exception processing OCPP request Heartbeat: com.thenewmotion.ocpp.json.api.OcppException: com.thenewmotion.ocpp.json.PayloadErrorCode$NotImplemented$@72712127: Request type not implemented at com.thenewmotion.ocpp.json.api.OcppException$.apply(OcppConnectionComponent.scala:61) at com.thenewmotion.ocpp.json.example.ExampleServerTestApp$$anon$1.$anonfun$handleConnection$2(ExampleServerTestApp.scala:57) at com.thenewmotion.ocpp.json.api.RequestHandler$$anon$4.$anonfun$apply$4(RequestHandler.scala:68) at scala.concurrent.Future$.$anonfun$apply$1(Future.scala:659) at scala.util.Success.$anonfun$map$1(Try.scala:255) at scala.util.Success.map(Try.scala:213) at scala.concurrent.Future.$anonfun$map$1(Future.scala:292) at scala.concurrent.impl.Promise.liftedTree1$1(Promise.scala:33) at scala.concurrent.impl.Promise.$anonfun$transform$1(Promise.scala:33) at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64) at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1402) at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:175)to a HeartBeat.Req
[2,"1383653547","Heartbeat",{}]Could you please tell me what is wrong with my code?
Thank you in advance.