Gateway C ABI
Loading...
Searching...
No Matches
sGCPluginInterface Struct Reference

The plugin interface. More...

#include <abi.h>

Data Fields

tPublishDatapointValue publishDatapointValueCallback
 Callback used to publish datapoint values.
 
tStoreDatapointValue storeDatapointValueCallback
 Callback used to store datapoint values.
 
tSystemLog logSystemCallback
 
tAuditLog logAuditCallback
 
tReleaseDatapointValue releaseDatapointValueCallback
 Callback used to release a datapoint value.
 
tGetLastDatapointValue getLastDatapointValueCallback
 Callback used to get the last value of a datapoint.
 
tGetEthernetInterface getEthernetInterfaceCallback
 Callback used to get ethernet interface configuration by name.
 
tGetSerialInterface getSerialInterfaceCallback
 Callback used to get serial interface configuration by name.
 
const GCPluginConfig config
 Configuration and related functions.
 
const GCCoreCtx ctx
 Core Context.
 
const GCLogLevel logLevel
 The log level set for this plugin instance.
 

Detailed Description

The plugin interface.

The interface that the core provides to the plugin, it contains all the callbacks that the plugin can use to interact with the core.

Field Documentation

◆ config

const GCPluginConfig sGCPluginInterface::config

Configuration and related functions.

◆ ctx

const GCCoreCtx sGCPluginInterface::ctx

Core Context.

The context state that the core provides to the plugin, it is required to call most of the core callbacks.

◆ getEthernetInterfaceCallback

tGetEthernetInterface sGCPluginInterface::getEthernetInterfaceCallback

Callback used to get ethernet interface configuration by name.

Retrieves the configuration for an ethernet interface by its logical name. This allows plugins to obtain the OS interface name configured for the runtime.

Parameters
ctxThe core context
nameThe logical name of the ethernet interface (e.g., "primary_eth")
outPointer to output structure (allocated by plugin)
Returns
true if the interface was found and output was filled, false otherwise
Note
This callback may be NULL if the core does not support device configuration (check before use).

◆ getLastDatapointValueCallback

tGetLastDatapointValue sGCPluginInterface::getLastDatapointValueCallback

Callback used to get the last value of a datapoint.

This callback is used to get the last value of a datapoint from the realtime database.

Parameters
ctxThe core context
identifierThe identifier of the datapoint to get the last value from
Returns
If the datapoint exists, a shared reference to the last value of the datapoint, otherwise null
Note
The plugin must call releaseDatapointValueCallback on the returned value if it is not null. Not doing so will result in a memory leak.

◆ getSerialInterfaceCallback

tGetSerialInterface sGCPluginInterface::getSerialInterfaceCallback

Callback used to get serial interface configuration by name.

Retrieves the configuration for a serial interface by its logical name. This allows plugins to obtain the OS device path and serial settings configured for the runtime.

Parameters
ctxThe core context
nameThe logical name of the serial interface (e.g., "moxa_port_1")
outPointer to output structure (allocated by plugin)
Returns
true if the interface was found and output was filled, false otherwise
Note
This callback may be NULL if the core does not support device configuration (check before use).

◆ logAuditCallback

tAuditLog sGCPluginInterface::logAuditCallback

This callback shouldn't be used, instead use the higher level gcSystemLog and gcAuditLog functions

◆ logLevel

const GCLogLevel sGCPluginInterface::logLevel

The log level set for this plugin instance.

The log level set for this plugin instance, higher values mean more verbose logging.

◆ logSystemCallback

tSystemLog sGCPluginInterface::logSystemCallback

This callback shouldn't be used, instead use the higher level gcSystemLog and gcAuditLog functions

◆ publishDatapointValueCallback

tPublishDatapointValue sGCPluginInterface::publishDatapointValueCallback

Callback used to publish datapoint values.

This callback is used to publish a new datapoint value to the core.

Parameters
ctxThe core context
valueThe datapoint value to be published, owned by the plugin
Returns
true if the value was published successfully, false if an error occurred while publishing the value

◆ releaseDatapointValueCallback

tReleaseDatapointValue sGCPluginInterface::releaseDatapointValueCallback

Callback used to release a datapoint value.

This callback is used to release a datapoint value that was previously returned by the core.

Parameters
valueThe datapoint value to be released
Returns
true if the value was released successfully, false if an error occurred while releasing the value

◆ storeDatapointValueCallback

tStoreDatapointValue sGCPluginInterface::storeDatapointValueCallback

Callback used to store datapoint values.

This callback is used to store a new datapoint value to the timeseries database.

Parameters
ctxThe core context
valueThe datapoint value to be stored, owned by the plugin

The documentation for this struct was generated from the following file: