lowermachine/source/linux_app/host_computer.h
Miaow c98584d029 寒假前烟梗分选机上已经开始用的
测试能否打中暂时没啥问题,但溜的急,没充分测试
2022-07-03 19:47:53 +08:00

48 lines
1.2 KiB
C

/**
* @file host_computer.h
* @brief Commnunicate with host computer. Protocal is described in hostcomputer通信协议.md
* @author miaow (3703781@qq.com)
* @version 1.0
* @date 2022/01/16
*
* @copyright Copyright (c) 2022 miaow
*
* @par Changelog:
* <table>
* <tr><th>Date <th>Version <th>Author <th>Description
* <tr><td>2022/01/16 <td>1.0 <td>miaow <td>Write this file
* </table>
*/
#ifndef __HOST_COMPUTER_H
#define __HOST_COMPUTER_H
#include <queue_uint64.h>
#include <pthread.h>
#include <stdint.h>
#define HOST_COMPUTER_IP "192.168.10.8"
#define HOST_COMPUTER_PORT 13452
#define HOST_COMPUTER_PICTURE_ROW_NUM 600
#define HOST_COMPUTER_PICTURE_COLUMN_NUM 256
/**
* @brief The commonds, ref hostcomputer通信协议 v1.1.md
*/
enum HOSTCOMPUTER_CMD
{
HOSTCOMPUTER_CMD_START = 2,
HOSTCOMPUTER_CMD_STOP = 3,
HOSTCOMPUTER_CMD_TEST = 4,
HOSTCOMPUTER_CMD_POWERON = 5,
HOSTCOMPUTER_CMD_SETCAMERATRIGPULSECOUNT = 6,
HOSTCOMPUTER_CMD_SETVALVETRIGPULSECOUNT = 7,
HOSTCOMPUTER_CMD_SETCAMERATOVALVEPULSECOUNT = 8,
HOSTCOMPUTER_CMD_STOP_TEST = 9
};
int hostcomputer_init(queue_uint64_msg_t *cmd_q);
int hostcomputer_deinit(void);
#endif