No edit summary |
No edit summary |
||
| Line 24: | Line 24: | ||
</pre> | </pre> | ||
We have used this library to control Crazyflie drones via ProB: | |||
[[File:prob_drone.jpeg|| | [[File:prob_drone.jpeg||800px]] | ||
ProB contains external functions to read and write JSON data and to communicate via sockets using JSON:
LibraryJSON.mch defines a FREETYPE to represent JSON data in a type-safe way:
JsonValue = JsonNull,
JsonBoolean(BOOL),
JsonNumber(FLOAT),
JsonString(STRING),
JsonArray(seq(JsonValue)),
JsonObject(STRING +-> JsonValue)
Free Types are inductive data types. They are not standard B, but stem from Z and Rodin's theory plug-in.
LibraryZMQ_RPC.mch defines a FREETYPE to represent RPC in a type-safe way:
RpcResult = RpcSuccess(JsonValue), RpcError(STRING)
We have used this library to control Crazyflie drones via ProB: