gpt4 book ai didi

c - 试图理解这些结构

转载 作者:太空宇宙 更新时间:2023-11-04 00:45:14 26 4
gpt4 key购买 nike

<分区>

我正在尝试弄清楚一个没有任何文档的程序中发生了什么。这是部分代码:

typedef struct
{
UInt8 Access;
UInt8 PDOMapping;
UInt8 Size;
void* Data;
CheckValue Check;
AccessEvent ReadEvent;
AccessEvent WriteEvent;
}ObjectValue;

typedef struct
{
UInt16 Index;
UInt8 Code;
ObjectValue* Value;
}Object;

const UInt8 MaxSubIndex6400 = 1;
ObjectValue Object6400Value[] =
{
{ACCESS_RO, MAP_NONE, 1, (void*)&MaxSubIndex6400, null, null},
{ACCESS_RO, MAP_NONE, sizeof(Index6400Buffer), (void*)&Index6400Buffer, null, null, null},
};

Object6400Value 数组包含两个项目,但它们的条目数不同。这合法吗?

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com