Skip to content

Commit c86641a

Browse files
committed
2024/03/21 Backup
1 parent 52e7b74 commit c86641a

File tree

111 files changed

+1586
-70
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+1586
-70
lines changed

CSLibrary2024/Source/RFIDReader/CSLUnifiedAPI/Basic_API/CS108/ClassRFID.Private.Inventory.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ private void TagRangingThreadProc_CS108()
8686
if (m_rdr_opt_parms.TagRanging.fastid)
8787
Value |= 0x20;
8888
MacWriteRegister(MACREGISTER.HST_IMPINJ_EXTENSIONS, Value);
89-
90-
// Set up the access bank register
91-
Value = (UInt32)(m_rdr_opt_parms.TagRanging.bank1) | (UInt32)(((int)m_rdr_opt_parms.TagRanging.bank2) << 2);
89+
90+
// Set up the access bank register
91+
Value = (UInt32)(m_rdr_opt_parms.TagRanging.bank1) | (UInt32)(((int)m_rdr_opt_parms.TagRanging.bank2) << 2);
9292
MacWriteRegister(MACREGISTER.HST_TAGACC_BANK, Value);
9393

9494
// Set up the access pointer register (tells the offset)

CSLibrary2024/Source/RFIDReader/CSLUnifiedAPI/Basic_API/CS108/ClassRFID.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ bool R2000Packet_NewInventory(byte[] recvData, int offset = 0)
108108
info.pc = (UInt16)(recvData[newInventoryPacketOffset] << 8 | recvData[newInventoryPacketOffset + 1]);
109109
int epcbytelen = ((info.pc & 0xf800) >> 11) * 2;
110110

111+
if (epcbytelen == 0)
112+
return false;
113+
111114
if ((newInventoryPacketOffset + epcbytelen + 1) >= recvData.Length)
112115
return false;
113116

@@ -133,6 +136,7 @@ bool R2000Packet_NewInventory(byte[] recvData, int offset = 0)
133136
byte[] byteEpc = new byte[epcbytelen];
134137
Array.Copy(recvData, (int)(newInventoryPacketOffset + 2 + xpcoffset), byteEpc, 0, epcbytelen);
135138

139+
/*
136140
if (Options.TagRanging.fastid && info.pc.EPCLength >= 6 && byteEpc[byteEpc.Length - 12] == 0xe2 && byteEpc[byteEpc.Length - 11] == 0x80 && byteEpc[byteEpc.Length - 10] == 0x11)
137141
{
138142
byte[] newbyteEpc = new byte[byteEpc.Length - 12];
@@ -144,6 +148,7 @@ bool R2000Packet_NewInventory(byte[] recvData, int offset = 0)
144148
info.FastTid = newbyteTid;
145149
byteEpc = newbyteEpc;
146150
}
151+
*/
147152

148153
info.epc = new S_EPC(byteEpc);
149154

@@ -290,6 +295,7 @@ bool R2000Packet_Inventory (byte [] recvData, int offset = 0)
290295
byte[] byteEpc = new byte[info.pc.EPCLength * 2];
291296
Array.Copy(recvData, (int)(offset + 22 + xpcoffset), byteEpc, 0, (int)info.pc.EPCLength * 2);
292297

298+
/*
293299
if (Options.TagRanging.fastid && info.pc.EPCLength >= 6 && byteEpc[byteEpc.Length - 12] == 0xe2 && byteEpc[byteEpc.Length - 11] == 0x80 && byteEpc[byteEpc.Length - 10] == 0x11)
294300
{
295301
byte[] newbyteEpc = new byte[byteEpc.Length - 12];
@@ -301,6 +307,7 @@ bool R2000Packet_Inventory (byte [] recvData, int offset = 0)
301307
info.FastTid = newbyteTid;
302308
byteEpc = newbyteEpc;
303309
}
310+
*/
304311

305312
info.epc = new S_EPC(byteEpc);
306313

CSLibrary2024/Source/RFIDReader/CSLUnifiedAPI/Basic_API/CS710S/ClassRFID.Public.Operation.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,14 @@ internal Result StartOperation_CS710S(Operation opertion)
8080
}
8181
break;
8282

83-
case Operation.TAG_PREFILTER:
8483
case Operation.TAG_SELECTED:
84+
// Set Q = 1
85+
SetFixedQParms_CS710S(1, 1);
86+
// Set
87+
TagSelected_CS710S();
88+
break;
89+
90+
case Operation.TAG_PREFILTER:
8591
TagSelected_CS710S();
8692
break;
8793

CSLibrary2024/Source/RFIDReader/CSLUnifiedAPI/Basic_API/ClassRFID.cs

Lines changed: 49 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -112,55 +112,60 @@ public MODEL GetModel()
112112
return m_oem_machine;
113113
}
114114

115-
/*
116-
public string GetCountryCode()
115+
public uint GetCountry()
117116
{
118-
m_save_country_code = 2;
119-
m_oem_freq_modification_flag = 0;
120-
string country = "-" + m_save_country_code.ToString();
121-
122-
switch (m_save_country_code)
123-
{
124-
case 2:
125-
if (m_oem_freq_modification_flag == 0)
126-
{
127-
country += " RW";
128-
}
129-
else
117+
return m_oem_country_code;
118+
}
119+
120+
/*
121+
public string GetCountryCode()
122+
{
123+
m_save_country_code = 2;
124+
m_oem_freq_modification_flag = 0;
125+
string country = "-" + m_save_country_code.ToString();
126+
127+
switch (m_save_country_code)
130128
{
131-
switch (m_oem_special_country_version)
132-
{
133-
case 0x4f464341:
134-
country += " OFCA";
135-
break;
136-
case 0x2a2a4153:
137-
country += " AS";
138-
break;
139-
case 0x2a2a4e5a:
140-
country += " NZ";
141-
break;
142-
case 0x20937846:
143-
country += " ZA";
144-
break;
145-
case 0x2A2A5347:
146-
country += " SG";
147-
break;
148-
}
149-
}
150-
break;
129+
case 2:
130+
if (m_oem_freq_modification_flag == 0)
131+
{
132+
country += " RW";
133+
}
134+
else
135+
{
136+
switch (m_oem_special_country_version)
137+
{
138+
case 0x4f464341:
139+
country += " OFCA";
140+
break;
141+
case 0x2a2a4153:
142+
country += " AS";
143+
break;
144+
case 0x2a2a4e5a:
145+
country += " NZ";
146+
break;
147+
case 0x20937846:
148+
country += " ZA";
149+
break;
150+
case 0x2A2A5347:
151+
country += " SG";
152+
break;
153+
}
154+
}
155+
break;
151156
152-
case 8:
153-
switch (m_oem_special_country_version)
154-
{
155-
case 0x2A4A5036:
156-
country += " JP6";
157+
case 8:
158+
switch (m_oem_special_country_version)
159+
{
160+
case 0x2A4A5036:
161+
country += " JP6";
162+
break;
163+
}
157164
break;
158165
}
159-
break;
160-
}
161-
return country;
162-
}
163-
*/
166+
return country;
167+
}
168+
*/
164169

165170
public string GetPCBAssemblyCode()
166171
{

CSLibrary2024/Source/RFIDReader/Comm_Protocol/Ex10Commands/ClassRFID.Registers.cs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,16 @@ internal void FastIdEnable(bool enable, int port = 0)
651651
return;
652652
}
653653

654+
internal bool FastId(int port = 0)
655+
{
656+
UInt32 Value = data[port].inventoryRoundControl | ~(0xfdffffff);
657+
658+
if (Value == 0)
659+
return false;
660+
661+
return true;
662+
}
663+
654664
internal void TagFocusEnable(bool enable, int port = 0)
655665
{
656666
UInt32 newValue = data[port].inventoryRoundControl & 0xfbffffff;
@@ -1649,11 +1659,11 @@ void SaveInitRegisters(int index, byte[]data, int size)
16491659
switch (m_oem_country_code)
16501660
{
16511661
case 0x01:
1652-
m_save_region_code = RegionCode.FCC;
1662+
m_save_region_code = RegionCode.ETSI;
16531663
break;
16541664

16551665
case 0x02:
1656-
m_save_region_code = RegionCode.ETSI;
1666+
m_save_region_code = RegionCode.FCC;
16571667
break;
16581668
}
16591669
}

CSLibrary2024/Source/RFIDReader/Comm_Protocol/Ex10Commands/ClassRFID.UplinkPackets.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,22 @@ internal void csl_tag_read_compact_packet_proc(byte[] data, int index)
364364
info.Bank2Data = new ushort[0];
365365
info.Bank3Data = new ushort[0];
366366

367+
/*
368+
if (RFIDRegister.AntennaPortConfig.FastId() && info.pc.EPCLength >= 6 && epc[epcbytelen - 12] == 0xe2 && epc[epcbytelen - 11] == 0x80 && epc[epcbytelen - 10] == 0x11)
369+
{
370+
byte[] newbyteEpc = new byte[epcbytelen - 12];
371+
UInt16[] newbyteTid = new UInt16[6];
372+
373+
Array.Copy(epc, 0, newbyteEpc, 0, newbyteEpc.Length);
374+
ArrayCopy(epc, epcbytelen - 12, newbyteTid, 0, 12);
375+
376+
info.FastTid = newbyteTid;
377+
epc = newbyteEpc;
378+
}
379+
else
380+
info.FastTid = new UInt16[0];
381+
*/
382+
367383
CSLibrary.Events.OnAsyncCallbackEventArgs callBackData = new Events.OnAsyncCallbackEventArgs(info, type);
368384

369385
if (OnAsyncCallback != null)
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)