axevent

package
v1.8.16 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2026 License: MIT Imports: 5 Imported by: 3

Documentation

Overview

Package axeventwrapper provides a Go wrapper around the axevent C library, facilitating the integration and manipulation of event systems within Axis devices.

Important:

This package relies on CGo for integration with the axevent C library and the GLib library, necessitating a running GMainLoop for proper operation.

Index

Constants

This section is empty.

Variables

View Source
var (
	OnfivNameSpaceTns1    string = "tns1"
	OnfivNameSpaceTnsAxis string = "tnsaxis"
	OnfivTagOnKeyValue    string = "tag-on-key-value"
)

Functions

func GoDeclarationCompleteCallback

func GoDeclarationCompleteCallback(declaration C.guint, user_data unsafe.Pointer)

func GoSubscriptionCallback

func GoSubscriptionCallback(subscription C.guint, event *C.AXEvent, user_data unsafe.Pointer)

Types

type AXEventHandler

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

https://axiscommunications.github.io/acap-documentation/docs/acap-sdk-version-3/api/src/api/axevent/html/ax__event__handler_8h.html#ae40c17762e9ed663356e34c5a9ea05fe

func (*AXEventHandler) Free

func (eh *AXEventHandler) Free()

Destroys an AXEventHandler an deallocates all associated declarations and subscriptions. Any pending callbacks associated with the AXEventHandler will be cancelled.

https://axiscommunications.github.io/acap-documentation/docs/acap-sdk-version-3/api/src/api/axevent/html/ax__event__handler_8h.html#ac8fa0ee5cba77fffffad4153833b040d

func (*AXEventHandler) OnEvent

func (eh *AXEventHandler) OnEvent(kvs *AXEventKeyValueSet, callback func(*Event)) (subscription int, err error)

OnEvent creates a subscription callback for the given event key value set.

func (*AXEventHandler) Undeclare

func (evt *AXEventHandler) Undeclare(declaration int) error

Undeclares an event. Any pending callbacks associated with the declaration will be cancelled.

https://axiscommunications.github.io/acap-documentation/docs/acap-sdk-version-3/api/src/api/axevent/html/ax__event__handler_8h.html#a61d4484571aacc5547f9e5bf524fd01d

type AXEventKeyValueSet

type AXEventKeyValueSet struct {
	Ptr *C.AXEventKeyValueSet
}

https://axiscommunications.github.io/acap-documentation/3.5/api/axevent/html/ax__event__key__value__set_8h.html

func CameraApplicationPlatformDevice1Scenario1EventKvs added in v1.5.9

func CameraApplicationPlatformDevice1Scenario1EventKvs(active *bool) *AXEventKeyValueSet

<tnsaxis:CameraApplicationPlatform>

<ObjectAnalytics>
	<Device1Scenario1 wstop:topic="true">
		<tt:MessageDescription IsProperty="true">
			<tt:Data>
				<tt:SimpleItemDescription Name="active" Type="xsd:boolean"></tt:SimpleItemDescription>
			</tt:Data>
		</tt:MessageDescription>
	</Device1Scenario1>
</ObjectAnalytics>

</tnsaxis:CameraApplicationPlatform>

func CameraApplicationPlatformDevice1ScenarioANYEventKvs added in v1.5.9

func CameraApplicationPlatformDevice1ScenarioANYEventKvs(active *bool) *AXEventKeyValueSet

<tnsaxis:CameraApplicationPlatform>

<ObjectAnalytics>
	<Device1ScenarioANY wstop:topic="true">
		<tt:MessageDescription IsProperty="true">
			<tt:Data>
				<tt:SimpleItemDescription Name="active" Type="xsd:boolean"></tt:SimpleItemDescription>
			</tt:Data>
		</tt:MessageDescription>
	</Device1ScenarioANY>
</ObjectAnalytics>

</tnsaxis:CameraApplicationPlatform>

func CameraApplicationPlatformXInternalDataEventKvs added in v1.5.9

func CameraApplicationPlatformXInternalDataEventKvs(svgFrame *string) *AXEventKeyValueSet

<tnsaxis:CameraApplicationPlatform>

<ObjectAnalytics>
	<xinternal_data wstop:topic="true">
		<tt:MessageDescription IsProperty="false">
			<tt:Data>
				<tt:SimpleItemDescription Name="svgframe" Type="xsd:string"></tt:SimpleItemDescription>
			</tt:Data>
		</tt:MessageDescription>
	</xinternal_data>
</ObjectAnalytics>

</tnsaxis:CameraApplicationPlatform>

func DeviceHardwareFailurePowerSupplyFailurePTZPowerFailureEventKvs added in v1.5.9

func DeviceHardwareFailurePowerSupplyFailurePTZPowerFailureEventKvs(token *int, failed *bool) *AXEventKeyValueSet

<tns1:Device>

<HardwareFailure>
	<PowerSupplyFailure>
		<tnsaxis:PTZPowerFailure wstop:topic="true">
			<tt:MessageDescription IsProperty="true">
				<tt:Source>
					<tt:SimpleItemDescription Name="Token" Type="tt:ReferenceToken"></tt:SimpleItemDescription>
				</tt:Source>
				<tt:Data>
					<tt:SimpleItemDescription Name="Failed" Type="xsd:boolean"></tt:SimpleItemDescription>
				</tt:Data>
			</tt:MessageDescription>
		</tnsaxis:PTZPowerFailure>
	</PowerSupplyFailure>
</HardwareFailure>

</tns1:Device>

func DeviceIoOutputPortEventKvs added in v1.5.9

func DeviceIoOutputPortEventKvs(port *int, state *bool) *AXEventKeyValueSet

<tns1:Device>

<tnsaxis:IO>
	<OutputPort wstop:topic="true">
		<tt:MessageDescription IsProperty="true">
			<tt:Source>
				<tt:SimpleItemDescription Name="port" Type="xsd:int"></tt:SimpleItemDescription>
			</tt:Source>
			<tt:Data>
				<tt:SimpleItemDescription Name="state" Type="xsd:boolean"></tt:SimpleItemDescription>
			</tt:Data>
		</tt:MessageDescription>
	</OutputPort>
</tnsaxis:IO>

</tns1:Device>

func DeviceIoPortEventKvs added in v1.5.9

func DeviceIoPortEventKvs(port *int, state *bool) *AXEventKeyValueSet

<tns1:Device>

<tnsaxis:IO>
	<Port wstop:topic="true">
		<tt:MessageDescription IsProperty="true">
			<tt:Source>
				<tt:SimpleItemDescription Name="port" Type="xsd:int"></tt:SimpleItemDescription>
			</tt:Source>
			<tt:Data>
				<tt:SimpleItemDescription Name="state" Type="xsd:boolean"></tt:SimpleItemDescription>
			</tt:Data>
		</tt:MessageDescription>
	</Port>
</tnsaxis:IO>

</tns1:Device>

func DeviceIoSupervisedPortEventKvs added in v1.5.9

func DeviceIoSupervisedPortEventKvs(port *int, tampered *bool, state *string) *AXEventKeyValueSet

<tns1:Device>

<tnsaxis:IO>
	<SupervisedPort wstop:topic="true">
		<tt:MessageDescription IsProperty="true">
			<tt:Source>
				<tt:SimpleItemDescription Name="port" Type="xsd:int"></tt:SimpleItemDescription>
			</tt:Source>
			<tt:Data>
				<tt:SimpleItemDescription Name="state" Type="xsd:string"></tt:SimpleItemDescription>
				<tt:SimpleItemDescription Name="tampered" Type="xsd:boolean"></tt:SimpleItemDescription>
			</tt:Data>
		</tt:MessageDescription>
	</SupervisedPort>
</tnsaxis:IO>

</tns1:Device>

func DeviceIoVirtualInputEventKvs added in v1.5.9

func DeviceIoVirtualInputEventKvs(port *int, active *bool) *AXEventKeyValueSet

<tns1:Device>

<tnsaxis:IO>
	<VirtualInput wstop:topic="true">
		<tt:MessageDescription IsProperty="true">
			<tt:Source>
				<tt:SimpleItemDescription Name="port" Type="xsd:int"></tt:SimpleItemDescription>
			</tt:Source>
			<tt:Data>
				<tt:SimpleItemDescription Name="active" Type="xsd:boolean"></tt:SimpleItemDescription>
			</tt:Data>
		</tt:MessageDescription>
	</VirtualInput>
</tnsaxis:IO>

</tns1:Device>

func DeviceIoVirtualPortEventKvs added in v1.5.9

func DeviceIoVirtualPortEventKvs(port *int, state *bool) *AXEventKeyValueSet

<tns1:Device>

<tnsaxis:IO>
	<VirtualPort wstop:topic="true">
		<tt:MessageDescription IsProperty="true">
			<tt:Source>
				<tt:SimpleItemDescription Name="port" Type="xsd:int"></tt:SimpleItemDescription>
			</tt:Source>
			<tt:Data>
				<tt:SimpleItemDescription Name="state" Type="xsd:boolean"></tt:SimpleItemDescription>
			</tt:Data>
		</tt:MessageDescription>
	</VirtualPort>
</tnsaxis:IO>

</tns1:Device>

func DeviceLightStatusEventKvs added in v1.5.9

func DeviceLightStatusEventKvs(id *int, state *string) *AXEventKeyValueSet

<tns1:Device>

<tnsaxis:Light>
	<Status wstop:topic="true">
		<tt:MessageDescription IsProperty="true">
			<tt:Source>
				<tt:SimpleItemDescription Name="id" Type="xsd:int"></tt:SimpleItemDescription>
			</tt:Source>
			<tt:Data>
				<tt:SimpleItemDescription Name="state" Type="xsd:string"></tt:SimpleItemDescription>
			</tt:Data>
		</tt:MessageDescription>
	</Status>
</tnsaxis:Light>

</tns1:Device>

func DeviceRingPowerLimitExceededEventKvs added in v1.5.9

func DeviceRingPowerLimitExceededEventKvs(input *int, limitExceeded *bool) *AXEventKeyValueSet

<tns1:Device>

<tnsaxis:RingPowerLimitExceeded wstop:topic="true">
	<tt:MessageDescription IsProperty="true">
		<tt:Source>
			<tt:SimpleItemDescription Name="input" Type="xsd:int"></tt:SimpleItemDescription>
		</tt:Source>
		<tt:Data>
			<tt:SimpleItemDescription Name="limit_exceeded" Type="xsd:boolean"></tt:SimpleItemDescription>
		</tt:Data>
	</tt:MessageDescription>
</tnsaxis:RingPowerLimitExceeded>

</tns1:Device>

func DeviceSensorPIREventKvs added in v1.5.9

func DeviceSensorPIREventKvs(sensor *int, state *bool) *AXEventKeyValueSet

<tns1:Device>

<tnsaxis:Sensor>
	<PIR wstop:topic="true">
		<tt:MessageDescription IsProperty="true">
			<tt:Source>
				<tt:SimpleItemDescription Name="sensor" Type="xsd:int"></tt:SimpleItemDescription>
			</tt:Source>
			<tt:Data>
				<tt:SimpleItemDescription Name="state" Type="xsd:boolean"></tt:SimpleItemDescription>
			</tt:Data>
		</tt:MessageDescription>
	</PIR>
</tnsaxis:Sensor>

</tns1:Device>

func DeviceStatusSystemReadyEventKvs added in v1.5.9

func DeviceStatusSystemReadyEventKvs(ready *bool) *AXEventKeyValueSet

<tns1:Device>

<tnsaxis:Status>
	<SystemReady wstop:topic="true">
		<tt:MessageDescription IsProperty="true">
			<tt:Data>
				<tt:SimpleItemDescription Name="ready" Type="xsd:boolean"></tt:SimpleItemDescription>
			</tt:Data>
		</tt:MessageDescription>
	</SystemReady>
</tnsaxis:Status>

</tns1:Device>

func DeviceStatusTemperatureAboveEventKvs added in v1.5.9

func DeviceStatusTemperatureAboveEventKvs(sensor_level *bool) *AXEventKeyValueSet

<tns1:Device>

<tnsaxis:Status>
	<Temperature>
		<Above wstop:topic="true">
			<tt:MessageDescription IsProperty="true">
				<tt:Data>
					<tt:SimpleItemDescription Name="sensor_level" Type="xsd:boolean"></tt:SimpleItemDescription>
				</tt:Data>
			</tt:MessageDescription>
		</Above>
	</Temperature>
</tnsaxis:Status>

</tns1:Device>

func DeviceStatusTemperatureAboveOrBelowEventKvs added in v1.5.9

func DeviceStatusTemperatureAboveOrBelowEventKvs(sensor_level *bool) *AXEventKeyValueSet

<tns1:Device>

<tnsaxis:Status>
	<Temperature>
		<Above_or_below wstop:topic="true">
			<tt:MessageDescription IsProperty="true">
			<tt:Data>
				<tt:SimpleItemDescription Name="sensor_level" Type="xsd:boolean"></tt:SimpleItemDescription>
			</tt:Data>
			</tt:MessageDescription>
		</Above_or_below>
	</Temperature>
</tnsaxis:Status>

</tns1:Device>

func DeviceStatusTemperatureBelowEventKvs added in v1.5.9

func DeviceStatusTemperatureBelowEventKvs(sensor_level *bool) *AXEventKeyValueSet

<tns1:Device>

<tnsaxis:Status>
	<Temperature>
		<Below wstop:topic="true">
			<tt:MessageDescription IsProperty="true">
			<tt:Data>
				<tt:SimpleItemDescription Name="sensor_level" Type="xsd:boolean"></tt:SimpleItemDescription>
			</tt:Data>
			</tt:MessageDescription>
		</Above_or_below>
	</Temperature>
</tnsaxis:Status>

</tns1:Device>

func DeviceStatusTemperatureInsideEventKvs added in v1.5.9

func DeviceStatusTemperatureInsideEventKvs(sensor_level *bool) *AXEventKeyValueSet

<tns1:Device>

<tnsaxis:Status>
	<Temperature>
		<Inside wstop:topic="true">
			<tt:MessageDescription IsProperty="true">
				<tt:Data>
					<tt:SimpleItemDescription Name="sensor_level" Type="xsd:boolean"></tt:SimpleItemDescription>
				</tt:Data>
			</tt:MessageDescription>
		</Inside>
	</Temperature>
</tnsaxis:Status>

</tns1:Device>

func DeviceTriggerDigitalInputEventKvs added in v1.5.9

func DeviceTriggerDigitalInputEventKvs(inputToken *int, logicalState *bool) *AXEventKeyValueSet

<tns1:Device>

<Trigger>
	<DigitalInput wstop:topic="true">
		<tt:MessageDescription IsProperty="true">
			<tt:Source>
				<tt:SimpleItemDescription Name="InputToken" Type="tt:ReferenceToken"></tt:SimpleItemDescription>
			</tt:Source>
			<tt:Data>
				<tt:SimpleItemDescription Name="LogicalState" Type="xsd:boolean"></tt:SimpleItemDescription>
			</tt:Data>
		</tt:MessageDescription>
	</DigitalInput>
</Trigger>

</tns1:Device>

func DeviceTriggerRelayEventKvs added in v1.5.9

func DeviceTriggerRelayEventKvs(relayToken *int, logicalState *bool) *AXEventKeyValueSet

<tns1:Device>

<Trigger>
	<Relay wstop:topic="true">
		<tt:MessageDescription IsProperty="true">
		<tt:Source>
			<tt:SimpleItemDescription Name="RelayToken" Type="tt:ReferenceToken"></tt:SimpleItemDescription>
		</tt:Source>
		<tt:Data>
			<tt:SimpleItemDescription Name="LogicalState" Type="tt:RelayLogicalState"></tt:SimpleItemDescription>
		</tt:Data>
		</tt:MessageDescription>
	</Relay>
</Trigger>

</tns1:Device>

func LightControlLightStatusChangedEventKvs added in v1.5.9

func LightControlLightStatusChangedEventKvs(state *string) *AXEventKeyValueSet

<tns1:LightControl>

<tnsaxis:LightStatusChanged>
	<Status wstop:topic="true">
		<tt:MessageDescription IsProperty="true">
			<tt:Data>
				<tt:SimpleItemDescription Name="state" Type="xsd:string"></tt:SimpleItemDescription>
			</tt:Data>
		</tt:MessageDescription>
	</Status>
</tnsaxis:LightStatusChanged>

</tns1:LightControl>

func MediaConfigurationChangedEventKvs added in v1.5.9

func MediaConfigurationChangedEventKvs(eventType *string, token *string) *AXEventKeyValueSet

<tns1:Media>

<ConfigurationChanged wstop:topic="true">
	<tt:MessageDescription IsProperty="false">
		<tt:Source>
			<tt:SimpleItemDescription Name="Type" Type="xsd:string"></tt:SimpleItemDescription>
			<tt:SimpleItemDescription Name="Token" Type="tt:ReferenceToken"></tt:SimpleItemDescription>
		</tt:Source>
	</tt:MessageDescription>
</ConfigurationChanged>

</tns1:Media>

func MediaProfileChangedEventKvs added in v1.5.9

func MediaProfileChangedEventKvs(token *string) *AXEventKeyValueSet

<tns1:Media>

<ProfileChanged wstop:topic="true">
	<tt:MessageDescription IsProperty="false">
		<tt:Source>
			<tt:SimpleItemDescription Name="Token" Type="tt:ReferenceToken"></tt:SimpleItemDescription>
		</tt:Source>
	</tt:MessageDescription>
</ProfileChanged>

</tns1:Media>

func NewAXEventKeyValueSet

func NewAXEventKeyValueSet() *AXEventKeyValueSet

Creates a new AXEventKeyValueSet

func NewAXEventKeyValueSetFromEntries

func NewAXEventKeyValueSetFromEntries(entries []KeyValueEntrie) *AXEventKeyValueSet

Creates a new AXEventKeyValueSet from a list of KeyValueEntries

func PTZControllerPTZErrorEventKvs added in v1.5.9

func PTZControllerPTZErrorEventKvs(channel *int, ptzError *string) *AXEventKeyValueSet

<tns1:PTZController>

<tnsaxis:PTZError wstop:topic="true">
	<tt:MessageDescription IsProperty="false">
		<tt:Source>
			<tt:SimpleItemDescription Name="channel" Type="xsd:int"></tt:SimpleItemDescription>
		</tt:Source>
		<tt:Data>
			<tt:SimpleItemDescription Name="ptz_error" Type="xsd:string"></tt:SimpleItemDescription>
		</tt:Data>
	</tt:MessageDescription>
</tnsaxis:PTZError>

</tns1:PTZController>

func PTZControllerPTZReadyEventKvs added in v1.5.9

func PTZControllerPTZReadyEventKvs(channel *int, ready *bool) *AXEventKeyValueSet

<tns1:PTZController>

<tnsaxis:PTZReady wstop:topic="true">
	<tt:MessageDescription IsProperty="true">
		<tt:Source>
			<tt:SimpleItemDescription Name="channel" Type="xsd:int"></tt:SimpleItemDescription>
		</tt:Source>
		<tt:Data>
			<tt:SimpleItemDescription Name="ready" Type="xsd:boolean"></tt:SimpleItemDescription>
		</tt:Data>
	</tt:MessageDescription>
</tnsaxis:PTZReady>

</tns1:PTZController>

func StorageAlertEventKvs

func StorageAlertEventKvs(diskID *string, alert *bool, overallHealth *int, temperature *int, wear *int) *AXEventKeyValueSet

<tnsaxis:Storage>

<Alert wstop:topic="true">
	<tt:MessageDescription IsProperty="true">
		<tt:Source>
			<tt:SimpleItemDescription Name="disk_id" Type="xsd:string"></tt:SimpleItemDescription>
		</tt:Source>
		<tt:Data>
			<tt:SimpleItemDescription Name="alert" Type="xsd:boolean"></tt:SimpleItemDescription>
			<tt:SimpleItemDescription Name="overall_health" Type="xsd:int"></tt:SimpleItemDescription>
			<tt:SimpleItemDescription Name="temperature" Type="xsd:int"></tt:SimpleItemDescription>
			<tt:SimpleItemDescription Name="wear" Type="xsd:int"></tt:SimpleItemDescription>
		</tt:Data>
	</tt:MessageDescription>
</Alert>

</tnsaxis:Storage>

func StorageDisruptionEventKvs

func StorageDisruptionEventKvs(diskID *string, disruption *bool) *AXEventKeyValueSet

<tnsaxis:Storage>

<Disruption wstop:topic="true">
	<tt:MessageDescription IsProperty="true">
		<tt:Source>
			<tt:SimpleItemDescription Name="disk_id" Type="xsd:string"></tt:SimpleItemDescription>
		</tt:Source>
		<tt:Data>
			<tt:SimpleItemDescription Name="disruption" Type="xsd:boolean"></tt:SimpleItemDescription>
		</tt:Data>
	</tt:MessageDescription>
</Disruption>

</tnsaxis:Storage>

func StorageRecordingEventKvs

func StorageRecordingEventKvs(recording *bool) *AXEventKeyValueSet

<tnsaxis:Storage>

<Recording wstop:topic="true">
	<tt:MessageDescription IsProperty="true">
		<tt:Data>
			<tt:SimpleItemDescription Name="recording" Type="xsd:boolean"></tt:SimpleItemDescription>
		</tt:Data>
	</tt:MessageDescription>
</Recording>

</tnsaxis:Storage>

func VideoSourceABREventKvs added in v1.5.9

func VideoSourceABREventKvs(videoSourceConfigurationToken *int, abrError *bool) *AXEventKeyValueSet

<tns1:VideoSource>

<tnsaxis:ABR wstop:topic="true">
	<tt:MessageDescription IsProperty="true">
		<tt:Source>
			<tt:SimpleItemDescription Name="VideoSourceConfigurationToken" Type="xsd:int"></tt:SimpleItemDescription>
		</tt:Source>
		<tt:Data>
			<tt:SimpleItemDescription Name="abr_error" Type="xsd:boolean"></tt:SimpleItemDescription>
		</tt:Data>
	</tt:MessageDescription>
</tnsaxis:ABR>

</tns1:VideoSource>

func VideoSourceDayNightVisionEventKvs added in v1.5.9

func VideoSourceDayNightVisionEventKvs(videoSourceConfigurationToken *int, day *bool) *AXEventKeyValueSet

<tns1:VideoSource>

<tnsaxis:DayNightVision wstop:topic="true">
	<tt:MessageDescription IsProperty="true">
		<tt:Source>
			<tt:SimpleItemDescription Name="VideoSourceConfigurationToken" Type="xsd:int"></tt:SimpleItemDescription>
		</tt:Source>
		<tt:Data>
			<tt:SimpleItemDescription Name="day" Type="xsd:boolean"></tt:SimpleItemDescription>
		</tt:Data>
	</tt:MessageDescription>
</tnsaxis:DayNightVision>

</tns1:VideoSource>

func VideoSourceGlobalSceneChangeEventKvs added in v1.5.9

func VideoSourceGlobalSceneChangeEventKvs(source *int, state *bool) *AXEventKeyValueSet

<tns1:VideoSource>

<GlobalSceneChange>
	<ImagingService wstop:topic="true">
		<tt:MessageDescription IsProperty="true">
			<tt:Source>
				<tt:SimpleItemDescription Name="Source" Type="tt:ReferenceToken"></tt:SimpleItemDescription>
			</tt:Source>
			<tt:Data>
				<tt:SimpleItemDescription Name="State" Type="xsd:boolean"></tt:SimpleItemDescription>
			</tt:Data>
		</tt:MessageDescription>
	</ImagingService>
</GlobalSceneChange>

</tns1:VideoSource>

func VideoSourceLiveStreamAccessedEventKvs added in v1.5.9

func VideoSourceLiveStreamAccessedEventKvs(accessed *bool) *AXEventKeyValueSet

<tns1:VideoSource>

<tnsaxis:LiveStreamAccessed wstop:topic="true">
	<tt:MessageDescription IsProperty="true">
		<tt:Data>
			<tt:SimpleItemDescription Name="accessed" Type="xsd:boolean"></tt:SimpleItemDescription>
		</tt:Data>
	</tt:MessageDescription>
</tnsaxis:LiveStreamAccessed>

</tns1:VideoSource>

func VideoSourceMotionAlarmEventKvs added in v1.5.9

func VideoSourceMotionAlarmEventKvs(source *int, state *bool) *AXEventKeyValueSet

<tns1:VideoSource>

<MotionAlarm wstop:topic="true">
	<tt:MessageDescription IsProperty="true">
		<tt:Source>
			<tt:SimpleItemDescription Name="Source" Type="tt:ReferenceToken"></tt:SimpleItemDescription>
		</tt:Source>
		<tt:Data>
			<tt:SimpleItemDescription Name="State" Type="xsd:boolean"></tt:SimpleItemDescription>
		</tt:Data>
	</tt:MessageDescription>
</MotionAlarm>

</tns1:VideoSource>

func VideoSourceTamperingEventKvs added in v1.5.9

func VideoSourceTamperingEventKvs(channel *int, tampering *int) *AXEventKeyValueSet

<tns1:VideoSource>

<tnsaxis:Tampering wstop:topic="true">
	<tt:MessageDescription IsProperty="false">
		<tt:Source>
			<tt:SimpleItemDescription Name="channel" Type="xsd:int"></tt:SimpleItemDescription>
		</tt:Source>
		<tt:Data>
			<tt:SimpleItemDescription Name="tampering" Type="xsd:int"></tt:SimpleItemDescription>
		</tt:Data>
	</tt:MessageDescription>
</tnsaxis:Tampering>

</tns1:VideoSource>

func (*AXEventKeyValueSet) AddKeyValue

func (axEventKeyValueSet *AXEventKeyValueSet) AddKeyValue(key string, namespace *string, value interface{}, value_type AXEventValueType) error

Adds an key value to the event set

func (*AXEventKeyValueSet) AddNiceNames

func (axEventKeyValueSet *AXEventKeyValueSet) AddNiceNames(key string, namespace *string, keyNiceName *string, valueNiceName *string) error

AddNiceNames sets human-readable names for a key/value pair in an AXEventKeyValueSet.

func (*AXEventKeyValueSet) Free

func (axEventKeyValueSet *AXEventKeyValueSet) Free()

Frees an AXEventKeyValueSet.

func (*AXEventKeyValueSet) GetBoolean

func (axEventKeyValueSet *AXEventKeyValueSet) GetBoolean(key string, namespace *string) (bool, error)

Retrieve the boolean value associated with a key.

func (*AXEventKeyValueSet) GetDouble

func (axEventKeyValueSet *AXEventKeyValueSet) GetDouble(key string, namespace *string) (float64, error)

Retrieve the double value associated with a key.

func (*AXEventKeyValueSet) GetInteger

func (axEventKeyValueSet *AXEventKeyValueSet) GetInteger(key string, namespace *string) (int, error)

Retrieve the integer value associated with a key.

func (*AXEventKeyValueSet) GetString

func (axEventKeyValueSet *AXEventKeyValueSet) GetString(key string, namespace *string) (string, error)

Retrieve the value type of the value associated with a key.

func (*AXEventKeyValueSet) GetValueType

func (axEventKeyValueSet *AXEventKeyValueSet) GetValueType(key string, namespace *string) (AXEventValueType, error)

Retrieve the value type of the value associated with a key.

func (*AXEventKeyValueSet) MarkAsData

func (axEventKeyValueSet *AXEventKeyValueSet) MarkAsData(key string, namespace *string) error

Mark a key in the AXEventKeyValueSet as data. A data key is a key that represents the state of what the event represents. E.g. an event declaration that represents an I/O port should have a key marked as data which represents the state, high or low, of the port. Please note that although it is possible to mark more than one key as data, only events with one and only one data key can be used to trigger actions.

func (*AXEventKeyValueSet) MarkAsSource

func (axEventKeyValueSet *AXEventKeyValueSet) MarkAsSource(key string, namespace *string) error

Mark a key in the AXEventKeyValueSet as a source. A source key is an identifier used to distinguish between multiple instances of the same event declaration. E.g. if a device has multiple I/O ports then event declarations that represent the state of each port will have the same keys but different values. The key that represents which port the event represents should be marked as source and the key which represents the state should be marked as data. Please note that although it is possible to mark more than one key as a source, only events with zero or one source keys can be used to trigger actions.

func (*AXEventKeyValueSet) MarkAsUserDefined

func (axEventKeyValueSet *AXEventKeyValueSet) MarkAsUserDefined(key string, namespace *string, userTag *string) error

Mark a key in AXEventKeyValueSet with an user defined tag.

func (*AXEventKeyValueSet) RemoveKey

func (axEventKeyValueSet *AXEventKeyValueSet) RemoveKey(key string, namespace *string) error

Removes a key and its associated value from an AXEventKeyValueSet.

type AxEventKeyValueSetDataMark

type AxEventKeyValueSetDataMark struct {
	Key       string
	Namespace *string
}

Mark a key in the AXEventKeyValueSet as data. A data key is a key that represents the state of what the event represents. E.g. an event declaration that represents an I/O port should have a key marked as data which represents the state, high or low, of the port. Please note that although it is possible to mark more than one key as data, only events with one and only one data key can be used to trigger actions.

type AxEventKeyValueSetNiceNames

type AxEventKeyValueSetNiceNames struct {
	Key           string
	Namespace     *string
	KeyNiceName   *string
	ValueNiceName *string
}

Set the nice names of a key/value pair in the AXEventKeyValueSet. Nice names can be used to display human-readable information about the key/value pair.

type AxEventKeyValueSetSourceMark

type AxEventKeyValueSetSourceMark struct {
	Key       string
	Namespace *string
}

Mark a key in the AXEventKeyValueSet as a source. A source key is an identifier used to distinguish between multiple instances of the same event declaration. E.g. if a device has multiple I/O ports then event declarations that represent the state of each port will have the same keys but different values. The key that represents which port the event represents should be marked as source and the key which represents the state should be marked as data. Please note that although it is possible to mark more than one key as a source, only events with zero or one source keys can be used to trigger actions.

type AxEventKeyValueSetUserDefineMark

type AxEventKeyValueSetUserDefineMark struct {
	Key       string
	Namespace *string
	Tag       *string
}

Mark a key in AXEventKeyValueSet with an user defined tag.

type CameraApplicationPlatformDevice1Scenario1Event added in v1.5.9

type CameraApplicationPlatformDevice1Scenario1Event struct {
	Active bool `eventKey:"active"`
}

type CameraApplicationPlatformDevice1ScenarioANYEvent added in v1.5.9

type CameraApplicationPlatformDevice1ScenarioANYEvent struct {
	Active bool `eventKey:"active"`
}

type CameraApplicationPlatformXInternalDataEvent added in v1.5.9

type CameraApplicationPlatformXInternalDataEvent struct {
	SvgFrame string `eventKey:"svgframe"`
}

type DeclarationCompleteCallback

type DeclarationCompleteCallback func(subscription int, userdata any)

This is the prototype of the callback function called when a declaration has registered with the event system. https://axiscommunications.github.io/acap-documentation/docs/acap-sdk-version-3/api/src/api/axevent/html/ax__event__handler_8h.html#a16d563cbc9c8974b72f296f8dfbdff3a

type DeviceHardwareFailurePowerSupplyFailurePTZPowerFailureEvent added in v1.5.9

type DeviceHardwareFailurePowerSupplyFailurePTZPowerFailureEvent struct {
	Token  int  `eventKey:"Token"`
	Failed bool `eventKey:"Failed"`
}

type DeviceIoOutputPortEvent added in v1.5.9

type DeviceIoOutputPortEvent struct {
	Port  int  `eventKey:"port"`
	State bool `eventKey:"state"`
}

type DeviceIoPortEvent added in v1.5.9

type DeviceIoPortEvent struct {
	Port  int  `eventKey:"port"`
	State bool `eventKey:"state"`
}

type DeviceIoSupervisedPortEvent added in v1.5.9

type DeviceIoSupervisedPortEvent struct {
	Port     int    `eventKey:"port"`
	Tampered bool   `eventKey:"tampered"`
	State    string `eventKey:"state"`
}

type DeviceIoVirtualInputEvent added in v1.5.9

type DeviceIoVirtualInputEvent struct {
	Port   int  `eventKey:"port"`
	Active bool `eventKey:"active"`
}

type DeviceIoVirtualPortEvent added in v1.5.9

type DeviceIoVirtualPortEvent struct {
	Port  int  `eventKey:"port"`
	State bool `eventKey:"state"`
}

type DeviceLightStatusEvent added in v1.5.9

type DeviceLightStatusEvent struct {
	Id    int    `eventKey:"id"`
	State string `eventKey:"state"`
}

type DeviceSensorPIREvent added in v1.5.9

type DeviceSensorPIREvent struct {
	Sensor int  `eventKey:"sensor"`
	State  bool `eventKey:"state"`
}

type DeviceStatusSystemReadyEvent added in v1.5.9

type DeviceStatusSystemReadyEvent struct {
	Ready bool `eventKey:"ready"`
}

type DeviceStatusTemperatureAboveEvent added in v1.5.9

type DeviceStatusTemperatureAboveEvent struct {
	SensorLevel bool `eventKey:"sensor_level"`
}

type DeviceStatusTemperatureAboveOrBelowEvent added in v1.5.9

type DeviceStatusTemperatureAboveOrBelowEvent struct {
	SensorLevel bool `eventKey:"sensor_level"`
}

type DeviceStatusTemperatureBelowEvent added in v1.5.9

type DeviceStatusTemperatureBelowEvent struct {
	SensorLevel bool `eventKey:"sensor_level"`
}

type DeviceStatusTemperatureInsideEvent added in v1.5.9

type DeviceStatusTemperatureInsideEvent struct {
	SensorLevel bool `eventKey:"sensor_level"`
}

type DeviceTriggerDigitalInputEvent added in v1.5.9

type DeviceTriggerDigitalInputEvent struct {
	InputToken   int  `eventKey:"InputToken"`
	LogicalState bool `eventKey:"LogicalState"`
}

type DeviceTriggerRelayEvent added in v1.5.9

type DeviceTriggerRelayEvent struct {
	RelayToken   int  `eventKey:"RelayToken"`
	LogicalState bool `eventKey:"LogicalState"`
}

type Event

type Event struct {
	Kvs       *AXEventKeyValueSet
	Timestamp time.Time
}

type EventError

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

func (*EventError) Error

func (e *EventError) Error() string

type KeyValueEntrie

type KeyValueEntrie struct {
	Key       string
	Namespace *string
	Value     interface{}
	ValueType AXEventValueType
}

KeyValueEntrie is a key-value pair for an AXEventKeyValueSet.

func NewBoolKeyValueEntrie added in v1.5.9

func NewBoolKeyValueEntrie(key string, value *bool) KeyValueEntrie

func NewIntKeyValueEntrie added in v1.5.9

func NewIntKeyValueEntrie(key string, value *int) KeyValueEntrie

func NewStringKeyValueEntrie added in v1.5.9

func NewStringKeyValueEntrie(key string, value *string) KeyValueEntrie

func NewTopicKeyValueEntrie added in v1.5.9

func NewTopicKeyValueEntrie(topicIndex string, namespace *string, name string) KeyValueEntrie

type LightControlLightStatusChangedEvent added in v1.5.9

type LightControlLightStatusChangedEvent struct {
	State string `eventKey:"state"`
}

type MediaConfigurationChangedEvent added in v1.5.9

type MediaConfigurationChangedEvent struct {
	Type  string `eventKey:"Type"`
	Token string `eventKey:"Token"`
}

type MediaProfileChangedEvent added in v1.5.9

type MediaProfileChangedEvent struct {
	Token string `eventKey:"Token"`
}

type PTZControllerPTZErrorEvent added in v1.5.9

type PTZControllerPTZErrorEvent struct {
	Channel  int    `eventKey:"channel"`
	PTZError string `eventKey:"ptz_error"`
}

type PTZControllerPTZReadyEvent added in v1.5.9

type PTZControllerPTZReadyEvent struct {
	Channel int  `eventKey:"channel"`
	Ready   bool `eventKey:"ready"`
}

type RingPowerLimitExceededEvent added in v1.5.9

type RingPowerLimitExceededEvent struct {
	Input         int  `eventKey:"input"`
	LimitExceeded bool `eventKey:"limit_exceeded"`
}

type StorageAlertEvent

type StorageAlertEvent struct {
	DiskID        string `eventKey:"disk_id"`
	Alert         bool   `eventKey:"alert"`
	OverallHealth int    `eventKey:"overall_health"`
	Temperature   int    `eventKey:"temperature"`
	Wear          int    `eventKey:"wear"`
}

type StorageDisruptionEvent

type StorageDisruptionEvent struct {
	DiskID     string `eventKey:"disk_id"`
	Disruption bool   `eventKey:"disruption"`
}

type StorageRecordingEvent

type StorageRecordingEvent struct {
	Recording bool `eventKey:"recording"`
}

type Subcription

type Subcription uint

type SubscriptionCallback

type SubscriptionCallback func(subscription int, event *AXEvent, userdata any)

This is the prototype of the callback function called whenever an event matching a subscription is received. https://axiscommunications.github.io/acap-documentation/docs/acap-sdk-version-3/api/src/api/axevent/html/ax__event__handler_8h.html#ad1bb63bc12366aefb50139ea6a8b3904

type VideoSourceABREvent added in v1.5.9

type VideoSourceABREvent struct {
	VideoSourceConfigurationToken int  `eventKey:"VideoSourceConfigurationToken"`
	AbrError                      bool `eventKey:"abr_error"`
}

type VideoSourceDayNightVisionEvent added in v1.5.9

type VideoSourceDayNightVisionEvent struct {
	VideoSourceConfigurationToken int  `eventKey:"VideoSourceConfigurationToken"`
	Day                           bool `eventKey:"day"`
}

type VideoSourceGlobalSceneChangeEvent added in v1.5.9

type VideoSourceGlobalSceneChangeEvent struct {
	Source int  `eventKey:"Source"`
	State  bool `eventKey:"State"`
}

type VideoSourceLiveStreamAccessedEvent added in v1.5.9

type VideoSourceLiveStreamAccessedEvent struct {
	Accessed bool `eventKey:"accessed"`
}

type VideoSourceMotionAlarmEvent added in v1.5.9

type VideoSourceMotionAlarmEvent struct {
	Source int  `eventKey:"Source"`
	State  bool `eventKey:"State"`
}

type VideoSourceTamperingEvent added in v1.5.9

type VideoSourceTamperingEvent struct {
	Channel   int `eventKey:"channel"`
	Tampering int `eventKey:"tampering"`
}

Jump to

Keyboard shortcuts

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