ArvGvcp

ArvGvcp — GigEVision control packet handling

Functions

Types and Values

Description

Functions

arv_gvcp_packet_free ()

void
arv_gvcp_packet_free (ArvGvcpPacket *packet);

arv_gvcp_packet_get_packet_type ()

ArvGvcpPacketType
arv_gvcp_packet_get_packet_type (ArvGvcpPacket *packet);

Parameters

packet

a ArvGvcpPacket

 

Returns

The ArvGvcpPacketType code of packet .


arv_gvcp_packet_get_command ()

ArvGvcpCommand
arv_gvcp_packet_get_command (ArvGvcpPacket *packet);

Parameters

packet

a ArvGvcpPacket

 

Returns

The ArvGvcpCommand code of packet .


arv_gvcp_packet_get_packet_id ()

guint16
arv_gvcp_packet_get_packet_id (ArvGvcpPacket *packet);

arv_gvcp_packet_get_read_memory_ack_data ()

void *
arv_gvcp_packet_get_read_memory_ack_data
                               (const ArvGvcpPacket *packet);

arv_gvcp_packet_get_read_memory_ack_size ()

size_t
arv_gvcp_packet_get_read_memory_ack_size
                               (guint32 data_size);

arv_gvcp_packet_get_read_memory_cmd_infos ()

void
arv_gvcp_packet_get_read_memory_cmd_infos
                               (const ArvGvcpPacket *packet,
                                guint32 *address,
                                guint32 *size);

arv_gvcp_packet_get_read_register_ack_value ()

guint32
arv_gvcp_packet_get_read_register_ack_value
                               (const ArvGvcpPacket *packet);

arv_gvcp_packet_get_read_register_cmd_infos ()

void
arv_gvcp_packet_get_read_register_cmd_infos
                               (const ArvGvcpPacket *packet,
                                guint32 *address);

arv_gvcp_packet_get_write_memory_ack_size ()

size_t
arv_gvcp_packet_get_write_memory_ack_size
                               (void);

arv_gvcp_packet_get_write_memory_cmd_data ()

void *
arv_gvcp_packet_get_write_memory_cmd_data
                               (const ArvGvcpPacket *packet);

arv_gvcp_packet_get_write_memory_cmd_infos ()

void
arv_gvcp_packet_get_write_memory_cmd_infos
                               (const ArvGvcpPacket *packet,
                                guint32 *address,
                                guint32 *size);

arv_gvcp_packet_get_write_register_cmd_infos ()

void
arv_gvcp_packet_get_write_register_cmd_infos
                               (const ArvGvcpPacket *packet,
                                guint32 *address,
                                guint32 *value);

arv_gvcp_packet_get_pending_ack_timeout ()

guint32
arv_gvcp_packet_get_pending_ack_timeout
                               (const ArvGvcpPacket *packet);

Parameters

packet

a ArvGvcpPacket

 

Returns

The pending acknowledge timeout stored in packet , in ms.

Since: 0.6.0


arv_gvcp_packet_set_packet_id ()

void
arv_gvcp_packet_set_packet_id (ArvGvcpPacket *packet,
                               guint16 id);

arv_gvcp_packet_new_read_memory_cmd ()

ArvGvcpPacket *
arv_gvcp_packet_new_read_memory_cmd (guint32 address,
                                     guint32 size,
                                     guint16 packet_id,
                                     size_t *packet_size);

[skip]

Parameters

address

read address

 

size

read size, in bytes

 

packet_id

packet id

 

packet_size

packet size, in bytes.

[out]

Returns

a new ArvGvcpPacket

Create a gvcp packet for a memory read command.

[transfer full]


arv_gvcp_packet_new_read_memory_ack ()

ArvGvcpPacket *
arv_gvcp_packet_new_read_memory_ack (guint32 address,
                                     guint32 size,
                                     guint16 packet_id,
                                     size_t *packet_size);

[skip]

Parameters

address

read address

 

size

read size, in bytes

 

packet_id

packet id

 

packet_size

packet size, in bytes.

[out]

Returns

a new ArvGvcpPacket

Create a gvcp packet for a memory read acknowledge.

[transfer full]


arv_gvcp_packet_new_write_memory_cmd ()

ArvGvcpPacket *
arv_gvcp_packet_new_write_memory_cmd (guint32 address,
                                      guint32 size,
                                      guint16 packet_id,
                                      size_t *packet_size);

[skip]

Parameters

address

write address

 

size

write size, in bytes

 

packet_id

packet id

 

packet_size

packet size, in bytes.

[out]

Returns

a new ArvGvcpPacket

Create a gvcp packet for a memory write command.

[transfer full]


arv_gvcp_packet_new_write_memory_ack ()

ArvGvcpPacket *
arv_gvcp_packet_new_write_memory_ack (guint32 address,
                                      guint16 packet_id,
                                      size_t *packet_size);

[skip]

Parameters

address

write address

 

packet_id

packet id

 

packet_size

packet size, in bytes.

[out]

Returns

a new ArvGvcpPacket

Create a gvcp packet for a memory write acknowledge.

[transfer full]


arv_gvcp_packet_new_read_register_cmd ()

ArvGvcpPacket *
arv_gvcp_packet_new_read_register_cmd (guint32 address,
                                       guint16 packet_id,
                                       size_t *packet_size);

[skip]

Parameters

address

write address

 

packet_id

packet id

 

packet_size

packet size, in bytes.

[out]

Returns

a new ArvGvcpPacket

Create a gvcp packet for a register read command.

[transfer full]


arv_gvcp_packet_new_read_register_ack ()

ArvGvcpPacket *
arv_gvcp_packet_new_read_register_ack (guint32 value,
                                       guint16 packet_id,
                                       size_t *packet_size);

[skip]

Parameters

value

read value

 

packet_id

packet id

 

packet_size

packet size, in bytes.

[out]

Returns

a new ArvGvcpPacket

Create a gvcp packet for a register read acknowledge.

[transfer full]


arv_gvcp_packet_new_write_register_cmd ()

ArvGvcpPacket *
arv_gvcp_packet_new_write_register_cmd
                               (guint32 address,
                                guint32 value,
                                guint16 packet_id,
                                size_t *packet_size);

[skip]

Parameters

address

write address

 

value

value to write

 

packet_id

packet id

 

packet_size

packet size, in bytes.

[out]

Returns

a new ArvGvcpPacket

Create a gvcp packet for a register write command.

[transfer full]


arv_gvcp_packet_new_write_register_ack ()

ArvGvcpPacket *
arv_gvcp_packet_new_write_register_ack
                               (guint32 data_index,
                                guint16 packet_id,
                                size_t *packet_size);

[skip]

Parameters

data_index

data index

 

packet_id

packet id

 

packet_size

packet size, in bytes.

[out]

Returns

a new ArvGvcpPacket

Create a gvcp packet for a register write acknowledge.

[transfer full]


arv_gvcp_packet_new_discovery_cmd ()

ArvGvcpPacket *
arv_gvcp_packet_new_discovery_cmd (size_t *size);

[skip]

Parameters

size

packet size, in bytes.

[out]

Returns

a new ArvGvcpPacket

Create a gvcp packet for a discovery command.

[transfer full]


arv_gvcp_packet_new_discovery_ack ()

ArvGvcpPacket *
arv_gvcp_packet_new_discovery_ack (size_t *packet_size);

[skip]

Parameters

packet_size

packet size, in bytes.

[out]

Returns

a new ArvGvcpPacket

Create a gvcp packet for a discovery acknowledge.

[transfer full]


arv_gvcp_packet_new_packet_resend_cmd ()

ArvGvcpPacket *
arv_gvcp_packet_new_packet_resend_cmd (guint32 frame_id,
                                       guint32 first_block,
                                       guint32 last_block,
                                       guint16 packet_id,
                                       size_t *packet_size);

Create a gvcp packet for a packet resend command.

[skip]

Parameters

frame_id

frame id

 

first_block

first missing packet

 

last_block

last missing packet

 

packet_id

packet id

 

packet_size

packet size, in bytes.

[out]

Returns

a new ArvGvcpPacket.

[transfer full]


arv_gvcp_packet_to_string ()

char *
arv_gvcp_packet_to_string (const ArvGvcpPacket *packet);

Converts packet into a human readable string.

Parameters

packet

a ArvGvcpPacket

 

Returns

A newly allocated string.

[transfer full]


arv_gvcp_packet_debug ()

void
arv_gvcp_packet_debug (const ArvGvcpPacket *packet,
                       ArvDebugLevel level);

Dumps the content of packet if level is lower or equal to the current debug level for the cp debug category. See arv_debug_enable().

Parameters

packet

a ArvGvcpPacket

 

level

debug level

 

arv_gvcp_next_packet_id ()

guint16
arv_gvcp_next_packet_id (guint16 packet_id);

Types and Values

ARV_GVCP_PORT

#define ARV_GVCP_PORT 3956

Standard device listening port for GVCP packets


enum ArvGvcpPacketType

Members

ARV_GVCP_PACKET_TYPE_ACK

acknowledge packet

 

ARV_GVCP_PACKET_TYPE_RESEND

resend request packet

 

ARV_GVCP_PACKET_TYPE_CMD

command packet

 

ARV_GVCP_PACKET_TYPE_ERROR

error packet

 

enum ArvGvcpCommand

Members

ARV_GVCP_COMMAND_DISCOVERY_CMD

discovery command

 

ARV_GVCP_COMMAND_DISCOVERY_ACK

discovery acknowledge

 

ARV_GVCP_COMMAND_BYE_CMD

goodbye command, for connection termination

 

ARV_GVCP_COMMAND_BYE_ACK

goodbye acknowledge

 

ARV_GVCP_COMMAND_PACKET_RESEND_CMD

packet resend request

 

ARV_GVCP_COMMAND_PACKET_RESEND_ACK

packet resend acknowledge (not used ?)

 

ARV_GVCP_COMMAND_READ_REGISTER_CMD

read register command

 

ARV_GVCP_COMMAND_READ_REGISTER_ACK

read register acknowledge

 

ARV_GVCP_COMMAND_WRITE_REGISTER_CMD

write register command

 

ARV_GVCP_COMMAND_WRITE_REGISTER_ACK

write register acknowledge

 

ARV_GVCP_COMMAND_READ_MEMORY_CMD

read memory command

 

ARV_GVCP_COMMAND_READ_MEMORY_ACK

read memory acknowledge

 

ARV_GVCP_COMMAND_WRITE_MEMORY_CMD

write memory command

 

ARV_GVCP_COMMAND_WRITE_MEMORY_ACK

write memory acknowledge

 

ARV_GVCP_COMMAND_PENDING_ACK

pending command acknowledge

 

ArvGvcpHeader

typedef struct {
	guint16 packet_type;
	guint16 command;
	guint16 size;
	guint16 id;
} ArvGvcpHeader;

GVCP packet header structure.

Members

guint16 packet_type;

a ArvGvcpPacketType identifier

 

guint16 command;

a ArvGvcpCommand identifier

 

guint16 size;

data size

 

guint16 id;

packet identifier

 

ArvGvcpPacket

typedef struct {
	ArvGvcpHeader header;
	unsigned char data[];
} ArvGvcpPacket;

GVCP packet structure.

Members

ArvGvcpHeader header;

packet header

 

unsigned char data[];

variable size byte array