23 unsigned char *data_fp = &datas[4];
35 int state = data_fp[7];
75 for (i = 0; i < n; i++) { ret_data[i] = rx_data[i + 8 + 4]; }
92 unsigned char *send_data =
new unsigned char[len];
97 send_data[6] = funcode;
99 for (
int i = 0; i < num; i++) { send_data[7 + i] = datas[i]; }
104 if (ret != len) {
return -1; }
void sleep_milliseconds(unsigned long milliseconds)
int write_frame(unsigned char *data, int len)
int check_xbus_prot(unsigned char *datas, int funcode)
int read_frame(unsigned char *data)
int bin8_to_32(unsigned char *a)
void bin16_to_8(int a, unsigned char *b)
static const int ERR_LENG
static const int ERR_PROT
UxbusCmdTcp(SocketPort *arm_port)
long long get_system_time()
int send_pend(int funcode, int num, int timeout, unsigned char *ret_data)
static const int ERR_TOUT
static const int ERR_CODE
static const int WAR_CODE
int send_xbus(int funcode, unsigned char *datas, int num)
int bin8_to_16(unsigned char *a)