| Aravis Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
#define ARV_GVCP_PORT enum ArvGvcpPacketType; enum ArvGvcpCommand; ArvGvcpHeader; ArvGvcpPacket; void arv_gvcp_packet_free (ArvGvcpPacket *packet); ArvGvcpPacketType arv_gvcp_packet_get_packet_type (ArvGvcpPacket *packet); ArvGvcpCommand arv_gvcp_packet_get_command (ArvGvcpPacket *packet); guint16 arv_gvcp_packet_get_packet_id (ArvGvcpPacket *packet); void * arv_gvcp_packet_get_read_memory_ack_data (const ArvGvcpPacket *packet); size_t arv_gvcp_packet_get_read_memory_ack_size (guint32 data_size); void arv_gvcp_packet_get_read_memory_cmd_infos (const ArvGvcpPacket *packet,guint32 *address,guint32 *size); guint32 arv_gvcp_packet_get_read_register_ack_value (const ArvGvcpPacket *packet); void arv_gvcp_packet_get_read_register_cmd_infos (const ArvGvcpPacket *packet,guint32 *address); size_t arv_gvcp_packet_get_write_memory_ack_size (void); void * arv_gvcp_packet_get_write_memory_cmd_data (const ArvGvcpPacket *packet); void arv_gvcp_packet_get_write_memory_cmd_infos (const ArvGvcpPacket *packet,guint32 *address,guint32 *size); void arv_gvcp_packet_get_write_register_cmd_infos (const ArvGvcpPacket *packet,guint32 *address,guint32 *value); void arv_gvcp_packet_set_packet_id (ArvGvcpPacket *packet,guint16 id); ArvGvcpPacket * arv_gvcp_packet_new_read_memory_cmd (guint32 address,guint32 size,guint16 packet_id,size_t *packet_size); ArvGvcpPacket * arv_gvcp_packet_new_read_memory_ack (guint32 address,guint32 size,guint16 packet_id,size_t *packet_size); ArvGvcpPacket * arv_gvcp_packet_new_write_memory_cmd (guint32 address,guint32 size,guint16 packet_id,size_t *packet_size); ArvGvcpPacket * arv_gvcp_packet_new_write_memory_ack (guint32 address,guint16 packet_id,size_t *packet_size); ArvGvcpPacket * arv_gvcp_packet_new_read_register_cmd (guint32 address,guint16 packet_id,size_t *packet_size); ArvGvcpPacket * arv_gvcp_packet_new_read_register_ack (guint32 value,guint16 packet_id,size_t *packet_size); ArvGvcpPacket * arv_gvcp_packet_new_write_register_cmd (guint32 address,guint32 value,guint16 packet_id,size_t *packet_size); ArvGvcpPacket * arv_gvcp_packet_new_write_register_ack (guint32 address,guint16 packet_id,size_t *packet_size); ArvGvcpPacket * arv_gvcp_packet_new_discovery_cmd (size_t *size); ArvGvcpPacket * arv_gvcp_packet_new_discovery_ack (size_t *packet_size); ArvGvcpPacket * arv_gvcp_packet_new_packet_resend_cmd (guint32 frame_id,guint32 first_block,guint32 last_block,guint16 packet_id,size_t *packet_size); char * arv_gvcp_packet_to_string (const ArvGvcpPacket *packet); void arv_gvcp_packet_debug (const ArvGvcpPacket *packet,ArvDebugLevel level); guint16 arv_gvcp_next_packet_id (guint16 packet_id);
typedef enum {
ARV_GVCP_PACKET_TYPE_ACK = 0x0000,
ARV_GVCP_PACKET_TYPE_RESEND = 0x4200,
ARV_GVCP_PACKET_TYPE_CMD = 0x4201,
ARV_GVCP_PACKET_TYPE_ERROR = 0x8006
} ArvGvcpPacketType;
typedef enum {
ARV_GVCP_COMMAND_DISCOVERY_CMD = 0x0002,
ARV_GVCP_COMMAND_DISCOVERY_ACK = 0x0003,
ARV_GVCP_COMMAND_BYE_CMD = 0x0004,
ARV_GVCP_COMMAND_BYE_ACK = 0x0005,
ARV_GVCP_COMMAND_PACKET_RESEND_CMD = 0x0040,
ARV_GVCP_COMMAND_PACKET_RESEND_ACK = 0x0041,
ARV_GVCP_COMMAND_READ_REGISTER_CMD = 0x0080,
ARV_GVCP_COMMAND_READ_REGISTER_ACK = 0x0081,
ARV_GVCP_COMMAND_WRITE_REGISTER_CMD = 0x0082,
ARV_GVCP_COMMAND_WRITE_REGISTER_ACK = 0x0083,
ARV_GVCP_COMMAND_READ_MEMORY_CMD = 0x0084,
ARV_GVCP_COMMAND_READ_MEMORY_ACK = 0x0085,
ARV_GVCP_COMMAND_WRITE_MEMORY_CMD = 0x0086,
ARV_GVCP_COMMAND_WRITE_MEMORY_ACK = 0x0087,
ARV_GVCP_COMMAND_PENDING_ACK = 0x0089
} ArvGvcpCommand;
| discovery command | |
| discovery acknowledge | |
| goodbye command, for connection termination | |
| goodbye acknowledge | |
| packet resend request | |
| packet resend acknowledge (not used ?) | |
| read register command | |
| read register acknowledge | |
| write register command | |
| write register acknowledge | |
| read memory command | |
| read memory acknowledge | |
| write memory command | |
| write memory acknowledge | |
| pending command acknowledge |
typedef struct {
guint16 packet_type;
guint16 command;
guint16 size;
guint16 id;
} ArvGvcpHeader;
GVCP packet header structure.
guint16 |
a ArvGvcpPacketType identifier |
guint16 |
a ArvGvcpCommand identifier |
guint16 |
data size |
guint16 |
packet identifier |
typedef struct {
ArvGvcpHeader header;
unsigned char data[];
} ArvGvcpPacket;
GVCP packet structure.
ArvGvcpHeader |
packet header |
| variable size byte array |
ArvGvcpPacketType arv_gvcp_packet_get_packet_type (ArvGvcpPacket *packet);
|
a ArvGvcpPacket |
Returns : |
The ArvGvcpPacketType code of packet. |
ArvGvcpCommand arv_gvcp_packet_get_command (ArvGvcpPacket *packet);
|
a ArvGvcpPacket |
Returns : |
The ArvGvcpCommand code of packet. |
void * arv_gvcp_packet_get_read_memory_ack_data
(const ArvGvcpPacket *packet);
size_t arv_gvcp_packet_get_read_memory_ack_size
(guint32 data_size);
void arv_gvcp_packet_get_read_memory_cmd_infos (const ArvGvcpPacket *packet,guint32 *address,guint32 *size);
guint32 arv_gvcp_packet_get_read_register_ack_value
(const ArvGvcpPacket *packet);
void arv_gvcp_packet_get_read_register_cmd_infos (const ArvGvcpPacket *packet,guint32 *address);
size_t arv_gvcp_packet_get_write_memory_ack_size
(void);
void * arv_gvcp_packet_get_write_memory_cmd_data
(const ArvGvcpPacket *packet);
void arv_gvcp_packet_get_write_memory_cmd_infos (const ArvGvcpPacket *packet,guint32 *address,guint32 *size);
void arv_gvcp_packet_get_write_register_cmd_infos (const ArvGvcpPacket *packet,guint32 *address,guint32 *value);
void arv_gvcp_packet_set_packet_id (ArvGvcpPacket *packet,guint16 id);
ArvGvcpPacket * arv_gvcp_packet_new_read_memory_cmd (guint32 address,guint32 size,guint16 packet_id,size_t *packet_size);
|
read address |
|
read size, in bytes |
|
packet id |
|
packet size, in bytes. [out] |
Returns : |
a new ArvGvcpPacket Create a gvcp packet for a memory read command. [transfer full] |
ArvGvcpPacket * arv_gvcp_packet_new_read_memory_ack (guint32 address,guint32 size,guint16 packet_id,size_t *packet_size);
|
read address |
|
read size, in bytes |
|
packet id |
|
packet size, in bytes. [out] |
Returns : |
a new ArvGvcpPacket Create a gvcp packet for a memory read acknowledge. [transfer full] |
ArvGvcpPacket * arv_gvcp_packet_new_write_memory_cmd (guint32 address,guint32 size,guint16 packet_id,size_t *packet_size);
|
write address |
|
write size, in bytes |
|
packet id |
|
packet size, in bytes. [out] |
Returns : |
a new ArvGvcpPacket Create a gvcp packet for a memory write command. [transfer full] |
ArvGvcpPacket * arv_gvcp_packet_new_write_memory_ack (guint32 address,guint16 packet_id,size_t *packet_size);
|
write address |
|
packet id |
|
packet size, in bytes. [out] |
Returns : |
a new ArvGvcpPacket Create a gvcp packet for a memory write acknowledge. [transfer full] |
ArvGvcpPacket * arv_gvcp_packet_new_read_register_cmd (guint32 address,guint16 packet_id,size_t *packet_size);
|
write address |
|
packet id |
|
packet size, in bytes. [out] |
Returns : |
a new ArvGvcpPacket Create a gvcp packet for a register read command. [transfer full] |
ArvGvcpPacket * arv_gvcp_packet_new_read_register_ack (guint32 value,guint16 packet_id,size_t *packet_size);
|
read value |
|
packet id |
|
packet size, in bytes. [out] |
Returns : |
a new ArvGvcpPacket Create a gvcp packet for a register read acknowledge. [transfer full] |
ArvGvcpPacket * arv_gvcp_packet_new_write_register_cmd (guint32 address,guint32 value,guint16 packet_id,size_t *packet_size);
|
write address |
|
value to write |
|
packet id |
|
packet size, in bytes. [out] |
Returns : |
a new ArvGvcpPacket Create a gvcp packet for a register write command. [transfer full] |
ArvGvcpPacket * arv_gvcp_packet_new_write_register_ack (guint32 address,guint16 packet_id,size_t *packet_size);
|
write address |
|
packet id |
|
packet size, in bytes. [out] |
Returns : |
a new ArvGvcpPacket Create a gvcp packet for a register write acknowledge. [transfer full] |
ArvGvcpPacket * arv_gvcp_packet_new_discovery_cmd (size_t *size);
|
packet size, in bytes. [out] |
Returns : |
a new ArvGvcpPacket Create a gvcp packet for a discovery command. [transfer full] |
ArvGvcpPacket * arv_gvcp_packet_new_discovery_ack (size_t *packet_size);
|
packet size, in bytes. [out] |
Returns : |
a new ArvGvcpPacket Create a gvcp packet for a discovery acknowledge. [transfer full] |
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.
|
frame id |
|
first missing packet |
|
last missing packet |
|
packet id |
|
packet size, in bytes. [out] |
Returns : |
a new ArvGvcpPacket. [transfer full] |
char * arv_gvcp_packet_to_string (const ArvGvcpPacket *packet);
Converts packet into a human readable string.
|
a ArvGvcpPacket |
Returns : |
A newly allocated string. [transfer full] |
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 gvcp debug category. See arv_debug_enable().
|
a ArvGvcpPacket |
|
debug level |