代码拉取完成,页面将自动刷新
#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);
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。