The KPAL plugin crate provides tools to write your own KPAL plugins.
See the examples folder for ideas on how to implement the datatypes and methods defined in this library.
Constants that indicate specific error codes that a plugin can return.
Creates the required symbols for a plugin library.
A single piece of information that partly determines the state of a plugin.
A Plugin combines the data that determines its state and with its functionality.
An opaque struct that contains the state of an individual plugin.
An error that is raised when a plugin is assumed to be in its run phase but it has not yet been initialized.
A table of function pointers that comprise the plugin API for the foreign function interface.
An error type that represents a failure to convert a Val to a Value.
Callback functions that communicate with the hardware when an attribute is read or set.
A wrapper type for transporting Values through the plugin API.
An owned value of an attribute.
Indicates that an attribute may not be set before plugin initialization.
Indicates that an attribute may be set before plugin initialization.
Indicates that the init phase callbacks should be used when interacting with a plugin.
Indicates that the run phase callbacks should be used when interacting with a plugin.
The set of functions that must be implemented by a plugin.
The set of functions that must be implemented by a plugin library's main error type.
Returns the number of attributes of the plugin.
Writes the plugin's attribute IDs to a buffer that is provided by the caller.
Writes the name of an attribute to a buffer that is provided by the caller.
Indicates whether an attribute may be set before initialization.
Writes the value of an attribute to a Value instance that is provided by the caller.
Copies a string of values of a primitive data type to a buffer.
Returns an error message to the daemon given an error code.
Frees the memory associated with the plugin's data.
Initializes a plugin.
Sets the value of an attribute.
The type signature of the collection of attributes that is owned by the plugin.
The type signature of the function that initializes a library.
The type signature of the function that returns a new plugin instance.
Determines which callbacks to use by indicating the current lifecycle phase of the plugin when getting and setting attributes.