gclass_create()#
Creates and registers a new gclass, defining its event types, states, methods, and attributes.
Prototype
hgclass gclass_create(
gclass_name_t gclass_name,
event_type_t *event_types,
states_t *states,
const GMETHODS *gmt,
const LMETHOD *lmt,
const sdata_desc_t *attrs_table,
size_t priv_size,
const sdata_desc_t *authz_table,
const sdata_desc_t *command_table,
const trace_level_t *s_user_trace_level,
gclass_flag_t gclass_flag
);
Parameters
Key |
Type |
Description |
|---|---|---|
|
The name of the |
|
|
A list of event types associated with the |
|
|
A list of states defining the finite state machine of the |
|
|
A pointer to the global methods table defining the behavior of the |
|
|
A pointer to the local methods table for internal method handling. |
|
|
A pointer to the attribute description table defining the attributes of the |
|
|
|
The size of the private data structure allocated for each instance of the |
|
A pointer to the authorization table defining access control rules. |
|
|
A pointer to the command table defining available commands for the |
|
|
A pointer to the trace level table defining user-defined trace levels. |
|
|
Flags defining special properties of the |
Return Value
Returns a handle to the newly created gclass, or NULL if an error occurs.
Notes
The gclass_name must be unique and cannot contain the characters . or ^.
If the gclass already exists, an error is logged and NULL is returned.
The function initializes the finite state machine (FSM) and event list for the gclass.
If the FSM is invalid, the gclass is unregistered and NULL is returned.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples