List |
public int GetListCaret( int listID )
It might be found useful for determining target command offsets for flow-control commands such as BRANCH_ABS, etc.
Being 0-based, its value is also, of course, equal to the current count of commands in the list:
List Contents | Caret value |
---|---|
JUMP_ABS 0 0; MARK_ABS 500 500; JUMP_ABS 100 200; | 3 |
MARK_BMP_ABS 1000 1000 2000 1000 2 4 6 8 10 12 14 16; JUMP_ABS 0 0; | 2 |
using ( ClientAPI client = new ClientAPI() ) { client.System.ResetToDefaults(); client.Connect( cardIP ); // <--- insert your card's IP address here! CommandList list = new CommandList(); list.AppendJumpAbs(0,0); // offset 0 list.AppendMarkAbs(500,500); // offset 1 list.AppendJumpAbs(100,200); // offset 2 // [...append 100 more commands here...] client.List.Set(1,list); Console.WriteLine("There are {0} commands: {1}", client.List.GetListCaret(1), client.List.GetListContents(1) ); // // output should be: // There are 103 commands: JA 0 0;MA 500 500;JA 100 200;... // client.Disconnect(); }