Main Page
Namespaces
Classes
Files
File List
File Members
include
xarm
core
instruction
uxbus_cmd_tcp.h
Go to the documentation of this file.
1
/* Copyright 2017 UFACTORY Inc. All Rights Reserved.
2
*
3
* Software License Agreement (BSD License)
4
*
5
* Author: Jimy Zhang <jimy92@163.com>
6
============================================================================*/
7
#ifndef CORE_INSTRUCTION_UXBUS_CMD_TCP_H_
8
#define CORE_INSTRUCTION_UXBUS_CMD_TCP_H_
9
10
#include "
xarm/core/instruction/uxbus_cmd.h
"
11
#include "
xarm/core/port/socket.h
"
12
13
class
UxbusCmdTcp
:
public
UxbusCmd
{
14
public
:
15
UxbusCmdTcp
(
SocketPort
*arm_port);
16
~UxbusCmdTcp
(
void
);
17
18
int
check_xbus_prot
(
unsigned
char
*datas,
int
funcode);
19
int
send_pend
(
int
funcode,
int
num,
int
timeout,
unsigned
char
*ret_data);
20
int
send_xbus
(
int
funcode,
unsigned
char
*datas,
int
num);
21
void
close
(
void
);
22
int
is_ok
(
void
);
23
24
private
:
25
SocketPort
*
arm_port_
;
26
int
bus_flag_
;
27
int
prot_flag_
;
28
int
TX2_PROT_CON_
= 2;
// tcp cmd prot
29
int
TX2_PROT_HEAT_
= 1;
// tcp heat prot
30
int
TX2_BUS_FLAG_MIN_
= 1;
// the min cmd num
31
int
TX2_BUS_FLAG_MAX_
= 5000;
// the max cmd num
32
};
33
34
#endif
UxbusCmdTcp::is_ok
int is_ok(void)
Definition:
uxbus_cmd_tcp.cc:114
UxbusCmdTcp::close
void close(void)
Definition:
uxbus_cmd_tcp.cc:112
UxbusCmdTcp::arm_port_
SocketPort * arm_port_
Definition:
uxbus_cmd_tcp.h:25
UxbusCmdTcp::prot_flag_
int prot_flag_
Definition:
uxbus_cmd_tcp.h:27
UxbusCmdTcp::check_xbus_prot
int check_xbus_prot(unsigned char *datas, int funcode)
Definition:
uxbus_cmd_tcp.cc:22
UxbusCmdTcp::TX2_BUS_FLAG_MAX_
int TX2_BUS_FLAG_MAX_
Definition:
uxbus_cmd_tcp.h:31
UxbusCmdTcp
Definition:
uxbus_cmd_tcp.h:13
UxbusCmd
Definition:
uxbus_cmd.h:45
UxbusCmdTcp::bus_flag_
int bus_flag_
Definition:
uxbus_cmd_tcp.h:26
UxbusCmdTcp::TX2_PROT_HEAT_
int TX2_PROT_HEAT_
Definition:
uxbus_cmd_tcp.h:29
UxbusCmdTcp::TX2_PROT_CON_
int TX2_PROT_CON_
Definition:
uxbus_cmd_tcp.h:28
UxbusCmdTcp::UxbusCmdTcp
UxbusCmdTcp(SocketPort *arm_port)
Definition:
uxbus_cmd_tcp.cc:14
UxbusCmdTcp::~UxbusCmdTcp
~UxbusCmdTcp(void)
Definition:
uxbus_cmd_tcp.cc:20
UxbusCmdTcp::send_pend
int send_pend(int funcode, int num, int timeout, unsigned char *ret_data)
Definition:
uxbus_cmd_tcp.cc:58
SocketPort
Definition:
socket.h:15
UxbusCmdTcp::send_xbus
int send_xbus(int funcode, unsigned char *datas, int num)
Definition:
uxbus_cmd_tcp.cc:89
socket.h
uxbus_cmd.h
UxbusCmdTcp::TX2_BUS_FLAG_MIN_
int TX2_BUS_FLAG_MIN_
Definition:
uxbus_cmd_tcp.h:30
xarm_api
Author(s):
autogenerated on Sat May 8 2021 02:51:23