Documentation ¶
Overview ¶
Package axparameter provides a Go interface to the AXParameter library, enabling the management of application-specific parameters on Axis devices.
Index ¶
- func GoParameterCallback(name *C.gchar, value *C.gchar, user_data unsafe.Pointer)
- type AXParameter
- func (axp *AXParameter) Add(name string, initialValue string, ptype string) error
- func (axp *AXParameter) Free()
- func (axp *AXParameter) Get(name string) (string, error)
- func (axp *AXParameter) GetAsFloat(name string) (float64, error)
- func (axp *AXParameter) GetAsInt(name string) (int, error)
- func (axp *AXParameter) List() ([]string, error)
- func (axp *AXParameter) OnAnyChange(callback func(*ParameterChangeEvent)) error
- func (axp *AXParameter) OnChange(param_name string, callback func(*ParameterChangeEvent)) error
- func (axp *AXParameter) RegisterCallback(name string, callback ParameterCallback, userdata any) error
- func (axp *AXParameter) Remove(name string) error
- func (axp *AXParameter) Set(name string, value string, doSync bool) error
- func (axp *AXParameter) UnregisterCallback(name string) error
- type GError
- type ParameterCallback
- type ParameterChangeEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AXParameter ¶
type AXParameter struct { Ptr *C.AXParameter // contains filtered or unexported fields }
func AXParameterNew ¶
func AXParameterNew(appName string) (*AXParameter, error)
Creates a new AXParameter.
func (*AXParameter) Add ¶
func (axp *AXParameter) Add(name string, initialValue string, ptype string) error
Adds a new parameter. Returns failure if the parameter already exists.
func (*AXParameter) Get ¶
func (axp *AXParameter) Get(name string) (string, error)
Retrieves the value of a parameter.
func (*AXParameter) GetAsFloat ¶
func (axp *AXParameter) GetAsFloat(name string) (float64, error)
func (*AXParameter) List ¶
func (axp *AXParameter) List() ([]string, error)
Lists all parameters for the application.
func (*AXParameter) OnAnyChange ¶
func (axp *AXParameter) OnAnyChange(callback func(*ParameterChangeEvent)) error
func (*AXParameter) OnChange ¶
func (axp *AXParameter) OnChange(param_name string, callback func(*ParameterChangeEvent)) error
func (*AXParameter) RegisterCallback ¶
func (axp *AXParameter) RegisterCallback(name string, callback ParameterCallback, userdata any) error
Registers a callback function to be run whenever the given named parameter is changed, eg value updated.
func (*AXParameter) Remove ¶
func (axp *AXParameter) Remove(name string) error
Removes a parameter. Returns FALSE if the parameter doesn't exist.
func (*AXParameter) Set ¶
func (axp *AXParameter) Set(name string, value string, doSync bool) error
Sets the value of a parameter.
func (*AXParameter) UnregisterCallback ¶
func (axp *AXParameter) UnregisterCallback(name string) error
Unregisters the parameter callback function.
type ParameterCallback ¶
The typedef for a callback function registered by ax_parameter_register_callback() https://axiscommunications.github.io/acap-documentation/docs/acap-sdk-version-3/api/src/api/axparameter/html/ax__parameter_8h.html#a82ba0fc58e5e8749b1313825b6a7a670