winIDEA SDK
Loading...
Searching...
No Matches
test_get_set_byte.py
# This script is licensed under BSD License, see file LICENSE.txt, or search for `License` in the SDK online help.
#
# (c) TASKING Germany GmbH, 2023
import os
import isystem.connect as ic
winidea_id = ''
def test_getSetByte():
connMgr = ic.ConnectionMgr()
connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
dataCtrl = ic.CDataController(connMgr)
print(f"Example how to set array data structure for batch access...")
item = ic.SBatchAccessItem()
ic.CDataController.setByte(item.m_abyData, 0, 42)
ic.CDataController.setByte(item.m_abyData, 1, 0)
ic.CDataController.setByte(item.m_abyData, 2, 6)
print(f"\tByte 0: {ic.CDataController.getByte(item.m_abyData, 0)}")
print(f"\tByte 1: {ic.CDataController.getByte(item.m_abyData, 1)}")
print(f"\tByte 2: {ic.CDataController.getByte(item.m_abyData, 2)}")
if __name__ == "__main__":
test_getSetByte()