axparameter

package
v1.5.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 26, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package axparameter provides a Go interface to the AXParameter library, enabling the management of application-specific parameters on Axis devices.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GoParameterCallback

func GoParameterCallback(name *C.gchar, value *C.gchar, user_data unsafe.Pointer)

Types

type AXParameter

type AXParameter struct {
	Ptr *C.AXParameter
	// contains filtered or unexported fields
}

https://axiscommunications.github.io/acap-documentation/docs/acap-sdk-version-3/api/src/api/axparameter/html/ax__parameter_8h.html#a454ef604d7741f45804e708a56f7bf24

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.

https://axiscommunications.github.io/acap-documentation/docs/acap-sdk-version-3/api/src/api/axparameter/html/ax__parameter_8h.html#a9069e0a2a3c64cacd7d50f1408a9f5fa

func (*AXParameter) GetAsFloat

func (axp *AXParameter) GetAsFloat(name string) (float64, error)

func (*AXParameter) GetAsInt

func (axp *AXParameter) GetAsInt(name string) (int, error)

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.

https://axiscommunications.github.io/acap-documentation/docs/acap-sdk-version-3/api/src/api/axparameter/html/ax__parameter_8h.html#a43ae8096bdcad55ff26bf13eadc3b781

type GError

type GError struct {
	Ptr      *C.GError
	Code     int
	Message  string
	Expected bool
}

func (*GError) Error

func (e *GError) Error() string

type ParameterCallback

type ParameterCallback func(name string, value string, userdata any)

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

type ParameterChangeEvent

type ParameterChangeEvent struct {
	Name  string
	Value string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL