winIDEA SDK
test_get_set_byte.py
1# This script is licensed under BSD License, see file LICENSE.txt.
2#
3# (c) TASKING Germany GmbH, 2023
4
5import os
6
7import isystem.connect as ic
8
9
10winidea_id = ''
11
12
13def test_getSetByte():
14 connMgr = ic.ConnectionMgr()
15 connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
16
17 dataCtrl = ic.CDataController(connMgr)
18
19 print(f"Example how to set array data structure for batch access...")
20 item = ic.SBatchAccessItem()
21 ic.CDataController.setByte(item.m_abyData, 0, 42)
22 ic.CDataController.setByte(item.m_abyData, 1, 0)
23 ic.CDataController.setByte(item.m_abyData, 2, 6)
24
25 print(f"\tByte 0: {ic.CDataController.getByte(item.m_abyData, 0)}")
26 print(f"\tByte 1: {ic.CDataController.getByte(item.m_abyData, 1)}")
27 print(f"\tByte 2: {ic.CDataController.getByte(item.m_abyData, 2)}")
28
29
30if __name__ == "__main__":
31 test_getSetByte()