blob: 6eda7640bb1f2d6707ddb717a62705c7be2a3b99 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
/*
**
*/
#include <stdlib.h>
#include "verse_header.h"
#include "v_pack.h"
#define V_NOQ_MAX_PACKET_SIZE 1500
typedef enum {
VCMDBS_10 = 0,
VCMDBS_20 = 1,
VCMDBS_30 = 2,
VCMDBS_80 = 3,
VCMDBS_160 = 4,
VCMDBS_320 = 5,
VCMDBS_1500 = 6,
VCMDBS_COUNT = 7
} VCMDBufSize;
typedef struct {
void *next;
uint32 packet;
unsigned int address_size;
unsigned int address_sum;
VCMDBufSize buf_size;
unsigned int size;
} VCMDBufHead;
typedef struct {
VCMDBufHead head;
uint8 buf[10];
} VCMDBuffer10;
typedef struct {
VCMDBufHead head;
uint8 buf[20];
} VCMDBuffer20;
typedef struct {
VCMDBufHead head;
uint8 buf[30];
} VCMDBuffer30;
typedef struct {
VCMDBufHead head;
uint8 buf[80];
} VCMDBuffer80;
typedef struct {
VCMDBufHead head;
uint8 buf[160];
} VCMDBuffer160;
typedef struct {
VCMDBufHead head;
uint8 buf[320];
} VCMDBuffer320;
typedef struct {
VCMDBufHead head;
uint8 buf[1500];
} VCMDBuffer1500;
extern VCMDBufHead *v_cmd_buf_allocate(VCMDBufSize buf_size);
extern void v_cmd_buf_free(VCMDBufHead *head);
extern void v_cmd_buf_set_size(VCMDBufHead *head, unsigned int size);
extern void v_cmd_buf_set_address_size(VCMDBufHead *head, unsigned int size);
extern void v_cmd_buf_set_unique_address_size(VCMDBufHead *head, unsigned int size);
extern boolean v_cmd_buf_compare(VCMDBufHead *a, VCMDBufHead *b);
|