1 Star 0 Fork 1

zx2591/martrix

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
network.h 1.18 KB
一键复制 编辑 原始数据 按行查看 历史
cbdev 提交于 2018-03-07 20:20 . sACN input processing (Fixes #2)
#include "martrix.h"
#define RECV_BUFFER 4096
#define SACN_DEFAULT_PORT "5568"
#define SACN_MAGIC "ASC-E1.17\0\0\0"
#define SACN_ROOT_DATA 0x4
#define SACN_FRAME_DATA 0x2
#define SACN_DMP_SET 0x2
#define ARTNET_DEFAULT_PORT "6454"
#define ARTNET_MAGIC "Art-Net\0"
#pragma pack(push, 1)
typedef struct /*_artnet_pkt_header*/ {
uint8_t magic[8];
uint16_t opcode;
uint16_t version;
} artnet_header;
typedef struct /*_artnet_output_pkt*/ {
uint8_t sequence;
uint8_t port;
uint8_t universe;
uint8_t net;
uint16_t length;
} artnet_output_pkt;
typedef struct /*_sacn_frame_root*/ {
uint16_t preamble;
uint16_t postamble;
uint8_t magic[12];
uint16_t flags;
uint32_t vector;
uint8_t sender_cid[16];
uint16_t frame_flags;
uint32_t frame_vector;
} sacn_header;
typedef struct /*_sacn_frame_data*/ {
uint8_t source_name[64];
uint8_t priority;
uint16_t sync_address;
uint8_t sequence;
uint8_t options;
uint16_t universe;
uint16_t flags;
uint8_t vector;
uint8_t format;
uint16_t startcode_offset;
uint16_t address_increment;
uint16_t channels;
} sacn_data;
#pragma pack(pop)
enum artnet_pkt_opcode {
OpDmx = 0x5000
};
int network_handle(config_t* cfg);
int network_start(config_t* cfg);
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zx2591/martrix.git
[email protected]:zx2591/martrix.git
zx2591
martrix
martrix
master

搜索帮助