Implementation of IModules and client using Json RPC 2.0.
More...
#include <ClientJsonRpc.h>
Implementation of IModules and client using Json RPC 2.0.
The client connects to a running DAVID Enterprise Server.
- Examples:
- SimpleMeshComparison.cpp, SimpleShapeFusion.cpp, SimpleStructuredLightScanner.cpp, SimpleTurntable.cpp, and TimedScans.cpp.
Definition at line 47 of file ClientJsonRpc.h.
virtual void david::ClientJsonRpc::Disconnect |
( |
bool |
stopServer) | |
|
|
virtual |
Disconnect from server.
- Parameters
-
[in] | stopServer | Stop remote server? |
void david::ClientJsonRpc::ExecuteRpc |
( |
Json::Value & |
response, |
|
|
const Json::Value & |
rpc |
|
) |
| |
Execute a remote procedure call all via RPC channel.
- Parameters
-
[out] | response | Response from server. |
[in] | rpc | Remote procedure call. |
template<class T >
T david::ClientJsonRpc::ExtractJsonParam |
( |
const Json::Value & |
jsonParams, |
|
|
const std::string & |
paramName |
|
) |
| |
|
inline |
Extract a parameter value from Json value.
- Parameters
-
[in] | jsonParams | Subtree of Json values. |
[in] | paramName | Name of parameter to be extracted. |
- Returns
- Value of parameter.
- Exceptions
-
Definition at line 111 of file ClientJsonRpc.h.
template<class T >
void david::ClientJsonRpc::ExtractJsonParam |
( |
Optional< T > & |
optionalValue, |
|
|
const Json::Value & |
jsonParams, |
|
|
const std::string & |
paramName |
|
) |
| |
|
inline |
Extract a parameter value from Json value.
- Parameters
-
[out] | optionalValue | Gets the value, if one is available. |
[in] | jsonParams | Subtree of Json values. |
[in] | paramName | Name of parameter to be extracted. |
- Exceptions
-
Definition at line 139 of file ClientJsonRpc.h.
virtual IMainWindow& david::ClientJsonRpc::mainWindow |
( |
) | |
|
|
virtual |
Returns an interface to the 'Main Window' module.
- Returns
- Interface class for 'Main Window' functions.
Implements david::IModules.
virtual IMeasure& david::ClientJsonRpc::measure |
( |
) | |
|
|
virtual |
void david::ClientJsonRpc::PrepareRpc |
( |
Json::Value & |
rpc, |
|
|
const std::string |
method |
|
) |
| |
Prepare a remote procedure call.
This following variables are set:
rpc["jsonrpc"] = "2.0";
rpc["method"] = method;
rpc["id"] = newID;
- Parameters
-
[in,out] | rpc | Remote procedure call. |
[in] | method | Name of the method. |
void david::ClientJsonRpc::ReadBinaryData |
( |
void * |
buffer, |
|
|
size_t |
bufferSize |
|
) |
| |
Read binary data from binary channel into buffer.
- Parameters
-
[out] | buffer | Destination buffer for binary data. |
[in] | bufferSize | Size of buffer in bytes. |
virtual ITurntable& david::ClientJsonRpc::turntable |
( |
) | |
|
|
virtual |
The documentation for this class was generated from the following file: