![]() |
VR-Forces Developer's Guide
|
Converts a DtSimTask, DtSetDataRequest, or DtReaderWriter to a JSON parameter object. This is the inverse of DtJsonTaskSetBuilder: the JSON it produces can be fed back into DtJsonTaskSetBuilder::buildTask() or buildSet() to reconstruct an equivalent task or set.
All methods are static — the class is stateless and requires no construction.
| unconvertedTypes | Optional out-parameter accepted by each public method. When non-null, the readerWriterType() string of every RW node that could not be converted is appended to the vector. This mirrors the unusedParams pattern in DtJsonTaskSetBuilder and is intended as a debugging aid. |
Static Public Member Functions | |
| static Json::Value | taskToJson (const DtSimTask &task, std::vector< std::string > *unconvertedTypes=nullptr) |
| static Json::Value | setToJson (const DtSetDataRequest &set, std::vector< std::string > *unconvertedTypes=nullptr) |
| static Json::Value | rwToJson (const DtReaderWriter *rw, std::vector< std::string > *unconvertedTypes=nullptr) |
| static Json::Value | currentTasksToJson (const DtCurrentTaskManager::EntityTaskInformation &tasks) |
Protected Types | |
| using | RwToJsonFcn = Json::Value(*)(const DtReaderWriter *rw) |
Static Protected Member Functions | |
| static const std::map < DtString, RwToJsonFcn > & | rwToJsonFcnMap () |
| static const std::set < std::string > & | theIgnoredTopLevelParams () |
| static Json::Value | registryToJson (const DtReaderWriterRegistry ®, std::vector< std::string > *unconvertedTypes, const std::set< std::string > &ignoredParams={}) |
| static Json::Value | templatedListToJson (const DtRwTemplatedListInterface *list, std::vector< std::string > *unconvertedTypes) |
| static Json::Value | stringToJson (const DtReaderWriter *rw) |
| static Json::Value | uuidToJson (const DtReaderWriter *rw) |
| static Json::Value | objectNameToJson (const DtReaderWriter *rw) |
| static Json::Value | intToJson (const DtReaderWriter *rw) |
| static Json::Value | doubleToJson (const DtReaderWriter *rw) |
| static Json::Value | boolToJson (const DtReaderWriter *rw) |
| static Json::Value | headingToJson (const DtReaderWriter *rw) |
| static Json::Value | vectorToJson (const DtReaderWriter *rw) |
| static Json::Value | locationReferenceToJson (const DtReaderWriter *rw) |
| static Json::Value | entityTypeToJson (const DtReaderWriter *rw) |
| static Json::Value | resourceTypeToJson (const DtReaderWriter *rw) |
| static Json::Value | stringListToJson (const DtReaderWriter *rw) |
| static Json::Value | nLengthStringVectorToJson (const DtReaderWriter *rw) |
| static Json::Value | nLengthUUIDVectorToJson (const DtReaderWriter *rw) |
| static Json::Value | vectorListToJson (const DtReaderWriter *rw) |
| static Json::Value | offsetVectorListToJson (const DtReaderWriter *rw) |
| static Json::Value | offsetVectorToJson (const DtReaderWriter *rw) |
| static Json::Value | taitBryanToJson (const DtReaderWriter *rw) |
| static Json::Value | intListToJson (const DtReaderWriter *rw) |
| static Json::Value | keyValueListToJson (const DtReaderWriter *rw) |
| static Json::Value | aggregateStateToJson (const DtReaderWriter *rw) |
| static Json::Value | forceTypeToJson (const DtReaderWriter *rw) |
| static Json::Value | postureToJson (const DtReaderWriter *rw) |
|
protected |
Function pointer type for per-RW-type serialisation handlers.
|
static |
Converts all registry parameters of task to a JSON object. Keys are parameter names; values are their JSON equivalents. Returns a Json::objectValue.
|
static |
Converts all registry parameters of set to a JSON object. Keys are parameter names; values are their JSON equivalents. Returns a Json::objectValue.
|
static |
Converts a single DtReaderWriter node to its JSON equivalent. Returns Json::nullValue when the type is not supported.
|
static |
Converts the current task list for one simulation object into a JSON array of {"CommandType": "...", "Parameters": {...}, "Text": "..."} objects. Entries whose TaskInformation has neither a task nor a set are silently skipped. Any RW parameter types that could not be converted are logged as a DtInfo warning.
| tasks | The EntityTaskInformation vector from DtCurrentTaskManager::tasksFor(). |
|
staticprotected |
Lazy-initialised dispatch map from readerWriterType() string to handler.
|
staticprotected |
Parameter names always skipped at the top level of taskToJson / setToJson. Analogous to the myParamsIgnored set in DtJsonTaskSetBuilder.
|
staticprotected |
Walks reg and returns a JSON object of { paramName: value } pairs. Keys that map to Json::nullValue are omitted.
| ignoredParams | Additional parameter names to skip at this level only. |
|
staticprotected |
Serialises a templated list RW to a JSON array of objects.
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |