WPILibC++ 2024.3.2
|
Functions | |
NT_Bool | NT_HasSchema (NT_Inst inst, const char *name) |
Returns whether there is a data schema already registered with the given name. More... | |
void | NT_AddSchema (NT_Inst inst, const char *name, const char *type, const uint8_t *schema, size_t schemaSize) |
Registers a data schema. More... | |
void NT_AddSchema | ( | NT_Inst | inst, |
const char * | name, | ||
const char * | type, | ||
const uint8_t * | schema, | ||
size_t | schemaSize | ||
) |
Registers a data schema.
Data schemas provide information for how a certain data type string can be decoded. The type string of a data schema indicates the type of the schema itself (e.g. "protobuf" for protobuf schemas, "struct" for struct schemas, etc). In NetworkTables, schemas are published just like normal topics, with the name being generated from the provided name: "/.schema/<name>". Duplicate calls to this function with the same name are silently ignored.
inst | instance |
name | Name (the string passed as the data type for topics using this schema) |
type | Type of schema (e.g. "protobuf", "struct", etc) |
schema | Schema data |
schemaSize | Size of schema data |
Returns whether there is a data schema already registered with the given name.
This does NOT perform a check as to whether the schema has already been published by another node on the network.
inst | instance |
name | Name (the string passed as the data type for topics using this schema) |