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 ¶
- Variables
- func GoDeclarationCompleteCallback(declaration C.guint, user_data unsafe.Pointer)
- func GoSubscriptionCallback(subscription C.guint, event *C.AXEvent, user_data unsafe.Pointer)
- type AXEvent
- type AXEventErrorCode
- type AXEventHandler
- func (eh *AXEventHandler) Declare(keyValueSet *AXEventKeyValueSet, stateless bool, ...) (declaration int, err error)
- func (eh *AXEventHandler) DeclareFromTemplate(template string, keyValueSet *AXEventKeyValueSet, ...) (int, error)
- func (eh *AXEventHandler) Free()
- func (eh *AXEventHandler) OnEvent(kvs *AXEventKeyValueSet, callback func(*Event)) (subscription int, err error)
- func (ev *AXEventHandler) SendEvent(declaration int, evt *AXEvent) error
- func (eh *AXEventHandler) Subscribe(kvs *AXEventKeyValueSet, callback SubscriptionCallback, userdata any) (subscription int, err error)
- func (evt *AXEventHandler) Undeclare(declaration int) error
- func (eh *AXEventHandler) Unsubscribe(subscription int) error
- type AXEventKeyValueSet
- func CameraApplicationPlatformDevice1Scenario1EventKvs(active *bool) *AXEventKeyValueSet
- func CameraApplicationPlatformDevice1ScenarioANYEventKvs(active *bool) *AXEventKeyValueSet
- func CameraApplicationPlatformXInternalDataEventKvs(svgFrame *string) *AXEventKeyValueSet
- func DeviceHardwareFailurePowerSupplyFailurePTZPowerFailureEventKvs(token *int, failed *bool) *AXEventKeyValueSet
- func DeviceIoOutputPortEventKvs(port *int, state *bool) *AXEventKeyValueSet
- func DeviceIoPortEventKvs(port *int, state *bool) *AXEventKeyValueSet
- func DeviceIoSupervisedPortEventKvs(port *int, tampered *bool, state *string) *AXEventKeyValueSet
- func DeviceIoVirtualInputEventKvs(port *int, active *bool) *AXEventKeyValueSet
- func DeviceIoVirtualPortEventKvs(port *int, state *bool) *AXEventKeyValueSet
- func DeviceLightStatusEventKvs(id *int, state *string) *AXEventKeyValueSet
- func DeviceRingPowerLimitExceededEventKvs(input *int, limitExceeded *bool) *AXEventKeyValueSet
- func DeviceSensorPIREventKvs(sensor *int, state *bool) *AXEventKeyValueSet
- func DeviceStatusSystemReadyEventKvs(ready *bool) *AXEventKeyValueSet
- func DeviceStatusTemperatureAboveEventKvs(sensor_level *bool) *AXEventKeyValueSet
- func DeviceStatusTemperatureAboveOrBelowEventKvs(sensor_level *bool) *AXEventKeyValueSet
- func DeviceStatusTemperatureBelowEventKvs(sensor_level *bool) *AXEventKeyValueSet
- func DeviceStatusTemperatureInsideEventKvs(sensor_level *bool) *AXEventKeyValueSet
- func DeviceTriggerDigitalInputEventKvs(inputToken *int, logicalState *bool) *AXEventKeyValueSet
- func DeviceTriggerRelayEventKvs(relayToken *int, logicalState *bool) *AXEventKeyValueSet
- func LightControlLightStatusChangedEventKvs(state *string) *AXEventKeyValueSet
- func MediaConfigurationChangedEventKvs(eventType *string, token *string) *AXEventKeyValueSet
- func MediaProfileChangedEventKvs(token *string) *AXEventKeyValueSet
- func NewAXEventKeyValueSet() *AXEventKeyValueSet
- func NewAXEventKeyValueSetFromEntries(entries []KeyValueEntrie) *AXEventKeyValueSet
- func PTZControllerPTZErrorEventKvs(channel *int, ptzError *string) *AXEventKeyValueSet
- func PTZControllerPTZReadyEventKvs(channel *int, ready *bool) *AXEventKeyValueSet
- func StorageAlertEventKvs(diskID *string, alert *bool, overallHealth *int, temperature *int, wear *int) *AXEventKeyValueSet
- func StorageDisruptionEventKvs(diskID *string, disruption *bool) *AXEventKeyValueSet
- func StorageRecordingEventKvs(recording *bool) *AXEventKeyValueSet
- func VideoSourceABREventKvs(videoSourceConfigurationToken *int, abrError *bool) *AXEventKeyValueSet
- func VideoSourceDayNightVisionEventKvs(videoSourceConfigurationToken *int, day *bool) *AXEventKeyValueSet
- func VideoSourceGlobalSceneChangeEventKvs(source *int, state *bool) *AXEventKeyValueSet
- func VideoSourceLiveStreamAccessedEventKvs(accessed *bool) *AXEventKeyValueSet
- func VideoSourceMotionAlarmEventKvs(source *int, state *bool) *AXEventKeyValueSet
- func VideoSourceTamperingEventKvs(channel *int, tampering *int) *AXEventKeyValueSet
- func (axEventKeyValueSet *AXEventKeyValueSet) AddKeyValue(key string, namespace *string, value interface{}, value_type AXEventValueType) error
- func (axEventKeyValueSet *AXEventKeyValueSet) AddNiceNames(key string, namespace *string, keyNiceName *string, valueNiceName *string) error
- func (axEventKeyValueSet *AXEventKeyValueSet) Free()
- func (axEventKeyValueSet *AXEventKeyValueSet) GetBoolean(key string, namespace *string) (bool, error)
- func (axEventKeyValueSet *AXEventKeyValueSet) GetDouble(key string, namespace *string) (float64, error)
- func (axEventKeyValueSet *AXEventKeyValueSet) GetInteger(key string, namespace *string) (int, error)
- func (axEventKeyValueSet *AXEventKeyValueSet) GetString(key string, namespace *string) (string, error)
- func (axEventKeyValueSet *AXEventKeyValueSet) GetValueType(key string, namespace *string) (AXEventValueType, error)
- func (axEventKeyValueSet *AXEventKeyValueSet) MarkAsData(key string, namespace *string) error
- func (axEventKeyValueSet *AXEventKeyValueSet) MarkAsSource(key string, namespace *string) error
- func (axEventKeyValueSet *AXEventKeyValueSet) MarkAsUserDefined(key string, namespace *string, userTag *string) error
- func (axEventKeyValueSet *AXEventKeyValueSet) RemoveKey(key string, namespace *string) error
- type AXEventValueType
- type AxEventKeyValueSetDataMark
- type AxEventKeyValueSetNiceNames
- type AxEventKeyValueSetSourceMark
- type AxEventKeyValueSetUserDefineMark
- type CameraApplicationPlatformDevice1Scenario1Event
- type CameraApplicationPlatformDevice1ScenarioANYEvent
- type CameraApplicationPlatformXInternalDataEvent
- type DeclarationCompleteCallback
- type DeviceHardwareFailurePowerSupplyFailurePTZPowerFailureEvent
- type DeviceIoOutputPortEvent
- type DeviceIoPortEvent
- type DeviceIoSupervisedPortEvent
- type DeviceIoVirtualInputEvent
- type DeviceIoVirtualPortEvent
- type DeviceLightStatusEvent
- type DeviceSensorPIREvent
- type DeviceStatusSystemReadyEvent
- type DeviceStatusTemperatureAboveEvent
- type DeviceStatusTemperatureAboveOrBelowEvent
- type DeviceStatusTemperatureBelowEvent
- type DeviceStatusTemperatureInsideEvent
- type DeviceTriggerDigitalInputEvent
- type DeviceTriggerRelayEvent
- type Event
- type EventError
- type KeyValueEntrie
- type LightControlLightStatusChangedEvent
- type MediaConfigurationChangedEvent
- type MediaProfileChangedEvent
- type PTZControllerPTZErrorEvent
- type PTZControllerPTZReadyEvent
- type RingPowerLimitExceededEvent
- type StorageAlertEvent
- type StorageDisruptionEvent
- type StorageRecordingEvent
- type Subcription
- type SubscriptionCallback
- type VideoSourceABREvent
- type VideoSourceDayNightVisionEvent
- type VideoSourceGlobalSceneChangeEvent
- type VideoSourceLiveStreamAccessedEvent
- type VideoSourceMotionAlarmEvent
- type VideoSourceTamperingEvent
Constants ¶
This section is empty.
Variables ¶
var ( OnfivNameSpaceTns1 string = "tns1" OnfivNameSpaceTnsAxis string = "tnsaxis" OnfivTagOnKeyValue string = "tag-on-key-value" )
Functions ¶
Types ¶
type AXEvent ¶
func NewAxEvent ¶
func NewAxEvent(axEventKeyValueSet *AXEventKeyValueSet, datetime *time.Time) *AXEvent
Creates a new AXEvent.
func (*AXEvent) GetKeyValueSet ¶
func (axEvent *AXEvent) GetKeyValueSet() *AXEventKeyValueSet
Get the AXEventKeyValueSet associated with the AXEvent.
func (*AXEvent) GetTimestamp ¶
Get the AXEventKeyValueSet associated with the AXEvent.
type AXEventErrorCode ¶
type AXEventErrorCode int
const ( AXEventErrorGeneric AXEventErrorCode = AXEventErrorCode(C.AX_EVENT_ERROR_GENERIC) AXEventErrorInvalidArgument AXEventErrorCode = AXEventErrorCode(C.AX_EVENT_ERROR_INVALID_ARGUMENT) AXEventErrorIncompatibleValue AXEventErrorCode = AXEventErrorCode(C.AX_EVENT_ERROR_INCOMPATIBLE_VALUE) AXEventErrorDeclaration AXEventErrorCode = AXEventErrorCode(C.AX_EVENT_ERROR_DECLARATION) AXEventErrorUndeclare AXEventErrorCode = AXEventErrorCode(C.AX_EVENT_ERROR_UNDECLARE) AXEventErrorSend AXEventErrorCode = AXEventErrorCode(C.AX_EVENT_ERROR_SEND) AXEventErrorSubscription AXEventErrorCode = AXEventErrorCode(C.AX_EVENT_ERROR_SUBSCRIPTION) AXEventErrorUnsubscribe AXEventErrorCode = AXEventErrorCode(C.AX_EVENT_ERROR_UNSUBSCRIBE) AXEventErrorKeyNotFound AXEventErrorCode = AXEventErrorCode(C.AX_EVENT_ERROR_KEY_NOT_FOUND) AXEventErrorEnd AXEventErrorCode = AXEventErrorCode(C.AX_EVENT_ERROR_END) )
func (AXEventErrorCode) ErrorName ¶
func (code AXEventErrorCode) ErrorName() string
ErrorName returns the string representation of the AxOverlayErrorCode.
type AXEventHandler ¶
type AXEventHandler struct {
Ptr *C.AXEventHandler
// contains filtered or unexported fields
}
func (*AXEventHandler) Declare ¶
func (eh *AXEventHandler) Declare(keyValueSet *AXEventKeyValueSet, stateless bool, callback DeclarationCompleteCallback, userdata any) (declaration int, err error)
Declares a new event.
func (*AXEventHandler) DeclareFromTemplate ¶
func (eh *AXEventHandler) DeclareFromTemplate(template string, keyValueSet *AXEventKeyValueSet, callback DeclarationCompleteCallback, userdata any) (int, error)
Declares a new event based upon an event template
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.
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) SendEvent ¶
func (ev *AXEventHandler) SendEvent(declaration int, evt *AXEvent) error
Sends an event.
func (*AXEventHandler) Subscribe ¶
func (eh *AXEventHandler) Subscribe(kvs *AXEventKeyValueSet, callback SubscriptionCallback, userdata any) (subscription int, err error)
Subscribes to an event or a set of events.
func (*AXEventHandler) Undeclare ¶
func (evt *AXEventHandler) Undeclare(declaration int) error
Undeclares an event. Any pending callbacks associated with the declaration will be cancelled.
func (*AXEventHandler) Unsubscribe ¶
func (eh *AXEventHandler) Unsubscribe(subscription int) error
Unsubscribes from an event or a set of events.
type AXEventKeyValueSet ¶
type AXEventKeyValueSet struct {
Ptr *C.AXEventKeyValueSet
}
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.
type AXEventValueType ¶
type AXEventValueType int
const ( AXValueTypeInt AXEventValueType = AXEventValueType(C.AX_VALUE_TYPE_INT) AXValueTypeBool AXEventValueType = AXEventValueType(C.AX_VALUE_TYPE_BOOL) AXValueTypeDouble AXEventValueType = AXEventValueType(C.AX_VALUE_TYPE_DOUBLE) AXValueTypeString AXEventValueType = AXEventValueType(C.AX_VALUE_TYPE_STRING) AXValueTypeElement AXEventValueType = AXEventValueType(C.AX_VALUE_TYPE_ELEMENT) )
type AxEventKeyValueSetDataMark ¶
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 ¶
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 ¶
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 ¶
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 DeviceIoOutputPortEvent ¶ added in v1.5.9
type DeviceIoPortEvent ¶ added in v1.5.9
type DeviceIoSupervisedPortEvent ¶ added in v1.5.9
type DeviceIoVirtualInputEvent ¶ added in v1.5.9
type DeviceIoVirtualPortEvent ¶ added in v1.5.9
type DeviceLightStatusEvent ¶ added in v1.5.9
type DeviceSensorPIREvent ¶ added in v1.5.9
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 DeviceTriggerRelayEvent ¶ added in v1.5.9
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 MediaProfileChangedEvent ¶ added in v1.5.9
type MediaProfileChangedEvent struct {
Token string `eventKey:"Token"`
}
type PTZControllerPTZErrorEvent ¶ added in v1.5.9
type PTZControllerPTZReadyEvent ¶ added in v1.5.9
type RingPowerLimitExceededEvent ¶ added in v1.5.9
type StorageAlertEvent ¶
type StorageDisruptionEvent ¶
type StorageRecordingEvent ¶
type StorageRecordingEvent struct {
Recording bool `eventKey:"recording"`
}
type Subcription ¶
type Subcription uint
type SubscriptionCallback ¶
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 VideoSourceDayNightVisionEvent ¶ added in v1.5.9
type VideoSourceGlobalSceneChangeEvent ¶ added in v1.5.9
type VideoSourceLiveStreamAccessedEvent ¶ added in v1.5.9
type VideoSourceLiveStreamAccessedEvent struct {
Accessed bool `eventKey:"accessed"`
}