aravis

package module
v0.0.0-...-7ddcfb2 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2019 License: BSD-3-Clause Imports: 6 Imported by: 4

README

Go Report Card

go-aravis

Go wrapper around libaravis

Quickstart

How to get the number of connected devices:

import aravis
import log

func main() {
    aravis.UpdateDeviceList()

    n, err := aravis.GetNumDevices()
    if err != nil {
        log.Fatal(err)
    }

    log.Println("Devices:", n)
}

Troubleshooting

GigE Vision cameras often use large packet sizes, well in excess of the typical MTU (maximum transmit unit) of most network interface cards, to save on packet overhead. Be sure to first set the MTU of the network interface(s) with GigE Vision cameras to 9000 bytes. For instance, if the network interface is enp2s0:

ip link set enp2s0 mtu 9000

Documentation

Index

Constants

View Source
const (
	BUFFER_STATUS_UNKNOWN         = C.ARV_BUFFER_STATUS_UNKNOWN
	BUFFER_STATUS_SUCCESS         = C.ARV_BUFFER_STATUS_SUCCESS
	BUFFER_STATUS_CLEARED         = C.ARV_BUFFER_STATUS_CLEARED
	BUFFER_STATUS_TIMEOUT         = C.ARV_BUFFER_STATUS_TIMEOUT
	BUFFER_STATUS_MISSING_PACKETS = C.ARV_BUFFER_STATUS_MISSING_PACKETS
	BUFFER_STATUS_WRONG_PACKET_ID = C.ARV_BUFFER_STATUS_WRONG_PACKET_ID
	BUFFER_STATUS_SIZE_MISMATCH   = C.ARV_BUFFER_STATUS_SIZE_MISMATCH
	BUFFER_STATUS_FILLING         = C.ARV_BUFFER_STATUS_FILLING
	BUFFER_STATUS_ABORTED         = C.ARV_BUFFER_STATUS_ABORTED
)
View Source
const (
	ACQUISITION_MODE_CONTINUOUS   = C.ARV_ACQUISITION_MODE_CONTINUOUS
	ACQUISITION_MODE_SINGLE_FRAME = C.ARV_ACQUISITION_MODE_SINGLE_FRAME
)
View Source
const (
	AUTO_OFF        = C.ARV_AUTO_OFF
	AUTO_ONCE       = C.ARV_AUTO_ONCE
	AUTO_CONTINUOUS = C.ARV_AUTO_CONTINUOUS
)

Variables

This section is empty.

Functions

func DisableInterface

func DisableInterface(id string)

func EnableInterface

func EnableInterface(id string)

func GetDeviceId

func GetDeviceId(index uint) (string, error)

func GetInterfaceId

func GetInterfaceId(index uint) (string, error)

func GetNumDevices

func GetNumDevices() (uint, error)

func GetNumInferface

func GetNumInferface() (uint, error)

func InterfaceGetDeviceAddress

func InterfaceGetDeviceAddress()

func InterfaceGetDeviceId

func InterfaceGetDeviceId()

func InterfaceGetDevicePhysicalId

func InterfaceGetDevicePhysicalId()

func InterfaceGetNumDevices

func InterfaceGetNumDevices()

func InterfaceOpenDevice

func InterfaceOpenDevice()

func OpenDevice

func OpenDevice()

func Shutdown

func Shutdown()

func UpdateDeviceList

func UpdateDeviceList()

Types

type BayerRG

type BayerRG struct {
	// Pix holds the image's pixels, in bayer order. The pixel at
	// (x, y) starts at Pix[(y-Rect.Min.Y)*Stride + (x-Rect.Min.X)].
	Pix []uint8
	// Stride is the Pix stride (in bytes) between vertically adjacent pixels.
	Stride int
	// Rect is the image's bounds.
	Rect image.Rectangle
}

func NewBayerRG

func NewBayerRG(r image.Rectangle) *BayerRG

func (*BayerRG) At

func (p *BayerRG) At(x, y int) color.Color

At returns an RGBA pixel with simple nearest-neighbor debayering

func (*BayerRG) Bounds

func (p *BayerRG) Bounds() image.Rectangle

func (*BayerRG) ColorModel

func (p *BayerRG) ColorModel() color.Model

type Buffer

type Buffer struct {
	// contains filtered or unexported fields
}

func NewBuffer

func NewBuffer(size uint) (Buffer, error)

func (*Buffer) GetData

func (b *Buffer) GetData() ([]byte, error)

func (*Buffer) GetStatus

func (b *Buffer) GetStatus() (int, error)

type Camera

type Camera struct {
	// contains filtered or unexported fields
}

func NewCamera

func NewCamera(name string) (Camera, error)

func (*Camera) AbortAcquisition

func (c *Camera) AbortAcquisition()

func (*Camera) Close

func (c *Camera) Close()

func (*Camera) CreateStream

func (c *Camera) CreateStream() (Stream, error)

func (*Camera) GVGetCurrentStreamChannel

func (c *Camera) GVGetCurrentStreamChannel() (int, error)

func (*Camera) GVGetNumStreamChannels

func (c *Camera) GVGetNumStreamChannels() (int, error)

func (*Camera) GVGetPacketDelay

func (c *Camera) GVGetPacketDelay() (int64, error)

func (*Camera) GVGetPacketSize

func (c *Camera) GVGetPacketSize() (int, error)

func (*Camera) GVSelectStreamChannels

func (c *Camera) GVSelectStreamChannels(id int)

func (*Camera) GVSetPacketDelay

func (c *Camera) GVSetPacketDelay(delay int64)

func (*Camera) GVSetPacketSize

func (c *Camera) GVSetPacketSize(size int)

func (*Camera) GetAvailablePixelFormats

func (c *Camera) GetAvailablePixelFormats()

func (*Camera) GetAvailablePixelFormatsAsDisplayNames

func (c *Camera) GetAvailablePixelFormatsAsDisplayNames()

func (*Camera) GetAvailablePixelFormatsAsStrings

func (c *Camera) GetAvailablePixelFormatsAsStrings()

func (*Camera) GetBinning

func (c *Camera) GetBinning() (int, int, error)

func (*Camera) GetChunkMode

func (c *Camera) GetChunkMode() (bool, error)

func (*Camera) GetDevice

func (c *Camera) GetDevice() (Device, error)

func (*Camera) GetDeviceId

func (c *Camera) GetDeviceId() (string, error)

func (*Camera) GetExposureTime

func (c *Camera) GetExposureTime() (float64, error)

func (*Camera) GetExposureTimeAuto

func (c *Camera) GetExposureTimeAuto()

func (*Camera) GetExposureTimeBounds

func (c *Camera) GetExposureTimeBounds()

func (*Camera) GetFrameRate

func (c *Camera) GetFrameRate() (float64, error)

func (*Camera) GetFrameRateBounds

func (c *Camera) GetFrameRateBounds() (float64, float64, error)

func (*Camera) GetGain

func (c *Camera) GetGain() (float64, error)

func (*Camera) GetGainBounds

func (c *Camera) GetGainBounds() (float64, float64, error)

func (*Camera) GetHeightBounds

func (c *Camera) GetHeightBounds() (int, int, error)

func (*Camera) GetModelName

func (c *Camera) GetModelName() (string, error)

func (*Camera) GetPayloadSize

func (c *Camera) GetPayloadSize() (uint, error)

func (*Camera) GetPixelFormat

func (c *Camera) GetPixelFormat()

func (*Camera) GetPixelFormatAsString

func (c *Camera) GetPixelFormatAsString()

func (*Camera) GetRegion

func (c *Camera) GetRegion() (int, int, int, int, error)

func (*Camera) GetSensorSize

func (c *Camera) GetSensorSize() (int, int, error)

func (*Camera) GetTriggerSource

func (c *Camera) GetTriggerSource() (string, error)

func (*Camera) GetVendorName

func (c *Camera) GetVendorName() (string, error)

func (*Camera) GetWidthBounds

func (c *Camera) GetWidthBounds() (int, int, error)

func (*Camera) IsExposureAutoAvailable

func (c *Camera) IsExposureAutoAvailable() (bool, error)

func (*Camera) IsExposureTimeAvailable

func (c *Camera) IsExposureTimeAvailable() (bool, error)

func (*Camera) IsGVDevice

func (c *Camera) IsGVDevice() (bool, error)

func (*Camera) SetAcquisitionMode

func (c *Camera) SetAcquisitionMode(mode int)

func (*Camera) SetBinning

func (c *Camera) SetBinning()

func (*Camera) SetExposureTime

func (c *Camera) SetExposureTime(time float64)

func (*Camera) SetExposureTimeAuto

func (c *Camera) SetExposureTimeAuto(mode int)

func (*Camera) SetFrameRate

func (c *Camera) SetFrameRate(frameRate float64)

func (*Camera) SetGain

func (c *Camera) SetGain(gain float64)

func (*Camera) SetGainAuto

func (c *Camera) SetGainAuto()

func (*Camera) SetPixelFormat

func (c *Camera) SetPixelFormat()

func (*Camera) SetPixelFormatFromString

func (c *Camera) SetPixelFormatFromString()

func (*Camera) SetRegion

func (c *Camera) SetRegion(x, y, width, height int)

func (*Camera) SetTrigger

func (c *Camera) SetTrigger(source string)

func (*Camera) SetTriggerSource

func (c *Camera) SetTriggerSource(source string)

func (*Camera) SoftwareTrigger

func (c *Camera) SoftwareTrigger()

func (*Camera) StartAcquisition

func (c *Camera) StartAcquisition()

func (*Camera) StopAcquisition

func (c *Camera) StopAcquisition()

type Device

type Device struct {
	// contains filtered or unexported fields
}

type Stream

type Stream struct {
	// contains filtered or unexported fields
}

func (*Stream) Close

func (s *Stream) Close()

func (*Stream) PopBuffer

func (s *Stream) PopBuffer() (Buffer, error)

func (*Stream) PushBuffer

func (s *Stream) PushBuffer(b Buffer)

func (*Stream) TimeoutPopBuffer

func (s *Stream) TimeoutPopBuffer(t time.Duration) (Buffer, error)

func (*Stream) TryPopBuffer

func (s *Stream) TryPopBuffer() (Buffer, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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