1#INTERFACE CAF 2# Basic attributes 3# TDataStd_RealArray 4# 5# Testing attribute: TDataStd_RealArray 6# 7# Testing command: SetRealArray 8# Testing command: GetRealArray 9# 10 11puts "caf001-C1" 12set QA_DUP 0 13 14# Add an attribute to a data framework 15set aFrom1 1 16set aTo1 2 17set aSetAttr11 3. 18set aSetAttr12 4. 19set aLabel 0:2 20set isDelta 0 21SetRealArray D ${aLabel} ${isDelta} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr12} 22 23# Close/Open the transaction 24NewCommand D 25 26# Forget the attribute 27ForgetAll D ${aLabel} 28 29# Close/Open the transaction 30NewCommand D 31 32# Undo-Redo-Undo 33Undo D 34Redo D 35Undo D 36 37# Get a value of the attribute 38set IsGood 1 39set aMessage1 "Add TDataStd_RealArray attribute: Error" 40set aGetAttr1 [GetRealArray D ${aLabel}] 41set aLen1 [llength ${aGetAttr1}] 42if { ${aLen1} != [expr ${aTo1} - ${aFrom1} + 1] } { 43 set IsGood 0 44 puts "aLen1=${aLen1}" 45 puts ${aMessage1} 46### return 47} 48set aGetAttr21 [lindex ${aGetAttr1} 0] 49if { ${aSetAttr11} != ${aGetAttr21} } { 50 set IsGood 0 51 puts "aGetAttr21=${aGetAttr21}" 52 puts ${aMessage1} 53### return 54} 55set aGetAttr22 [lindex ${aGetAttr1} 1] 56if { ${aSetAttr12} != ${aGetAttr22} } { 57 set IsGood 0 58 puts "aGetAttr22=${aGetAttr22}" 59 puts ${aMessage1} 60### return 61} 62 63if { ${IsGood} == 0} { 64 puts "Add TDataStd_RealArray attribute: Error" 65} else { 66 puts "Add TDataStd_RealArray attribute: OK" 67} 68