金南瓜SECS/GEM如何实现List类型变量(C++)

1 构造L类型

若要构造下图形式的数据

1.先构造内部的L中的数据

string Code_1 = "L";

string cData1_1 = listJoin("A", "2");

string cData2_1 = listJoin("A", "4");

2.将构造好的数据整合为一个L(这里为L2)

string L12_1 = listJoin(Code_1.c_str(), cData1_1.c_str(), cData2_1.c_str());//最里层L2

3.重复构造相同的两个L2(图例中一个L3下有三个L2)

string Code_2 = "L";

string cData1_2 = listJoin("A", "2");

string cData2_2 = listJoin("A", "4");

string L12_2 = listJoin(Code_2.c_str(), cData1_2.c_str(), cData2_2.c_str());//最里层L2

string Code_3 = "L";

string cData1_3 = listJoin("A", "2");

string cData2_3 = listJoin("A", "4");

string L12_3 = listJoin(Code_3.c_str(), cData1_3.c_str(), cData2_3.c_str());//最里层L2

4.将构造好的3个L2数据整合为一个L(这里为里层的L3)

string Code_4 = "L";

string stringData = listJoin(Code_4.c_str(), L12_1.c_str(), L12_2.c_str(), L12_3.c_str());

5.将构造好的1个L3数据整合为一个L(这里为L1)

string Code_5 = "L";

string stringData_1 = listJoin(Code_5.c_str(), stringData.c_str());

6.将构造好的A类型数据和步骤5中的L1整合为一个L(这里为最外层L3)

string Code1 = "L";

string A1 = listJoin("A", "2");

string A2 = listJoin("A", "200");

pResult = listJoin(Code1.c_str(), A1.c_str(), A2.c_str(), stringData_1.c_str());//最外层L3

7.代码对照

相关推荐
半导体老油条2 年前
金南瓜SECS/GEM C# SDK 快速使用指南
开发语言·c#·secs·secs/gem·gem300
SunkingYang2 年前
python开发SECS客户端
服务器·前端·python·secs