comm_prot_register()

comm_prot_register()#

Registers a gclass with a specified communication protocol schema, allowing it to be retrieved later by schema name.

Prototype

int comm_prot_register(
    gclass_name_t gclass_name,
    const char *schema
);

Parameters

Key

Type

Description

gclass_name

gclass_name_t

The name of the gclass to be associated with the schema.

schema

const char *

The communication protocol schema to register with the gclass.


Return Value

Returns 0 on success, or -1 if memory allocation fails.

Notes

The function initializes the internal communication protocol registry if it has not been initialized yet. The schema is stored as a dynamically allocated string, which will be freed when the registry is cleared.

Prototype

// Not applicable in JS

Prototype

# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples