winIDEA SDK
require_version.py
1# This script is licensed under BSD License, see file LICENSE.txt.
2#
3# (c) TASKING Germany GmbH, 2023
4
5"""
6This script demonstrates usage or asserting that version being used
7is still compatible with newer versions of our products.
8It compares version used against version passed in the parameters and
9throws an error if the one used is not compatible anymore and should be updated
10"""
11import isystem.connect as ic
12
13
14'''
15Note: you cannot call this function with parameter name specified
16e.g. `requires_SDK(nMajor=9, ...)` as it was translated to get
17*args as the only parameter, therefore just numbers need to be passed
18'''
19def verify_SDK():
20 ic.requires_SDK(9, 21, 100)
21 # OR
22 ic.requires_SDK(9, 21, 100, 0)
23 # OR
24 ic.requires_SDK(
25 9, # nMajor
26 21, # nMinor
27 100, # nBuild
28 10, # nSubBuild
29 3 # nSccBuild
30 )
31
32
33if __name__ == '__main__':
34 verify_SDK()