Commit 119586a5 authored by Claes Sjofors's avatar Claes Sjofors

Profibus/Profinet configurator, default module class setting added, and Apply button added

parent 8aa6cfe8
include $(pwre_dir_symbols)
ifndef variables_mk
-include $(pwre_croot)/src/tools/bld/src/$(os_name)/$(hw_name)/variables.mk
endif
ifndef variables_mk
include $(pwre_croot)/src/tools/bld/src/$(os_name)/variables.mk
endif
ifndef rules_mk
-include $(pwre_croot)/src/tools/bld/src/$(os_name)/$(hw_name)/rules.mk
endif
ifndef rules_mk
include $(pwre_croot)/src/tools/bld/src/$(os_name)/rules.mk
endif
.PHONY : all init copy lib exe clean realclean\
$(clean_c)
all : init copy lib
init :
copy : $(exe_dir)/pb_module_classes.dat $(exe_dir)/pn_module_classes.dat
lib :
exe :
clean :
realclean : clean $(clean_obj)
.SUFFIXES:
$(exe_dir)/pb_module_classes.dat : ../../pb_module_classes.dat
@ echo "Copying $(source)"
@ $(cp) $(cpflags) $(source) $(target)
$(exe_dir)/pn_module_classes.dat : ../../pn_module_classes.dat
@ echo "Copying $(source)"
@ $(cp) $(cpflags) $(source) $(target)
#
# Siemens ET200M (IM153
#
Model "ET 200M (IM153-1)"
{
"Config for Slot1" Pb_Module
"Config for Slot2" Pb_Module
"Config for Slot3" Pb_Module
"6ES7 321-7RD00-0AB0 4DI" Siemens_ET200M_Di4
"6ES7 321-1CF00-0AA0 8DI" Siemens_ET200M_Di8
"6ES7 321-1FF0*-0AA0 8DI" Siemens_ET200M_Di8
"6ES7 321-1FF1*-0AA0 8DI" Siemens_ET200M_Di8
"6ES7 321-1BH0*-0AA0 16DI" Siemens_ET200M_Di16
"6ES7 321-1BH8*-0AA0 16DI" Siemens_ET200M_Di16
"6ES7 321-1EH0*-0AA0 16DI" Siemens_ET200M_Di16
"6ES7 321-1BH5*-0AA0 16DI" Siemens_ET200M_Di16
"6ES7 321-1FF00-0AA0 8DI" Siemens_ET200M_Di8
"6ES7 321-1FF01-0AA0 8DI" Siemens_ET200M_Di8
"6ES7 321-1BH00-0AA0 16DI" Siemens_ET200M_Di16
"6ES7 321-1BH*1-0AA0 16DI" Siemens_ET200M_Di16
"6ES7 321-1EH00-0AA0 16DI" Siemens_ET200M_Di16
"6ES7 321-1EH01-0AA0 16DI" Siemens_ET200M_Di16
"6ES7 321-1BH50-0AA0 16DI" Siemens_ET200M_Di16
"6ES7 321-1CH20-0AA0 16DI" Siemens_ET200M_Di16
"6ES7 321-1CH80-0AA0 16DI" Siemens_ET200M_Di16
"6ES7 321-1CH0*-0AA0 16DI" Siemens_ET200M_Di16
"6ES7 321-7BH00-0AB0 16DI" Siemens_ET200M_Di16
"6ES7 321-7BH80-0AB0 16DI" Siemens_ET200M_Di16
"6ES7 321-1BL00-0AA0 32DI" Siemens_ET200M_Di32
"6ES7 321-1EL00-0AA0 32DI" Siemens_ET200M_Di32
"6ES7 322-5RD00-0AB0 4DO" Siemens_ET200M_Do4
"6ES7 322-5SD00-0AB0 4DO" Siemens_ET200M_Do4
"6ES7 322-1BF0*-0AA0 8DO" Siemens_ET200M_Do8
"6ES7 322-1FF0*-0AA0 8DO" Siemens_ET200M_Do8
"6ES7 322-1HF**-0AA0 8DO" Siemens_ET200M_Do8
"6ES7 322-1BF00-0AA0 8DO" Siemens_ET200M_Do8
"6ES7 322-1BF01-0AA0 8DO" Siemens_ET200M_Do8
"6ES7 322-1FF00-0AA0 8DO" Siemens_ET200M_Do8
"6ES7 322-1FF01-0AA0 8DO" Siemens_ET200M_Do8
"6ES7 322-1HF00-0AA0 8DO" Siemens_ET200M_Do8
"6ES7 322-1HF01-0AA0 8DO" Siemens_ET200M_Do8
"6ES7 322-1HF20-0AA0 8DO" Siemens_ET200M_Do8
"6ES7 322-1CF00-0AA0 8DO" Siemens_ET200M_Do8
"6ES7 322-1CF80-0AA0 8DO" Siemens_ET200M_Do8
"6ES7 322-8BF00-0AB0 8DO" Siemens_ET200M_Do8
"6ES7 322-8BF80-0AB0 8DO" Siemens_ET200M_Do8
"6ES7 322-1BH0*-0AA0 16DO" Siemens_ET200M_Do16
"6ES7 322-1EH0*-0AA0 16DO" Siemens_ET200M_Do16
"6ES7 322-1BH00-0AA0 16DO" Siemens_ET200M_Do16
"6ES7 322-1BH*1-0AA0 16DO" Siemens_ET200M_Do16
"6ES7 322-1EH00-0AA0 16DO" Siemens_ET200M_Do16
"6ES7 322-1EH01-0AA0 16DO" Siemens_ET200M_Do16
"6ES7 322-1HH00-0AA0 16DO" Siemens_ET200M_Do16
"6ES7 322-1HH0*-0AA0 16DO" Siemens_ET200M_Do16
"6ES7 322-1BL00-0AA0 32DO" Siemens_ET200M_Do32
"6ES7 322-1EL00-0AA0 32DO" Siemens_ET200M_Do32
"6ES7 322-1FL00-0AA0 32DO" Siemens_ET200M_Do32
"6ES7 323-1BH0*-0AA0 8DX" -
"6ES7 323-1BL00-0AA0 16DX" Siemens_ET200M_Dx16
"6ES7 323-1BL0*-0AA0 16DX" Siemens_ET200M_Dx16
"6ES7 327-1BH00-0AB0 8DI/8DX" -
"6ES7 331-7KB0*-0AB0 2AI" Siemens_ET200M_Ai2
"6ES7 331-7KB00-0AB0 2AI" Siemens_ET200M_Ai2
"6ES7 331-7KB*1-0AB0 2AI" Siemens_ET200M_Ai2
"6ES7 331-7RD00-0AB0 4AI" Siemens_ET200M_Ai4
"6ES7 331-7SF00-0AB0 8AI" Siemens_ET200M_Ai8
"6ES7 331-7KF00-0AB0 8AI" Siemens_ET200M_Ai8
"6ES7 331-7KF01-0AB0 8AI" Siemens_ET200M_Ai8
"6ES7 331-7KF0*-0AB0 8AI" Siemens_ET200M_Ai8
"6ES7 331-7NF00-0AB0 8AI" Siemens_ET200M_Ai8
"6ES7 332-5HB00-0AB0 2AO" Siemens_ET200M_Ao2
"6ES7 332-5HB*1-0AB0 2AO" Siemens_ET200M_Ao2
"6ES7 332-5HB0*-0AB0 2AO" Siemens_ET200M_Ao2
"6ES7 332-5HD00-0AB0 4AO" Siemens_ET200M_Ao4
"6ES7 332-5HD01-0AB0 4AO" Siemens_ET200M_Ao4
"6ES7 332-5HD0*-0AB0 4AO" Siemens_ET200M_Ao4
"6ES7 332-7ND00-0AB0 4AO" Siemens_ET200M_Ao4
"6ES7 332-7ND01-0AB0 4AO" Siemens_ET200M_Ao4
"6ES7 332-5RD00-0AB0 4AO" Siemens_ET200M_Aor
"6ES7 334-0CE00-0AA0 4AI/2AO" -
"6ES7 334-0CE01-0AA0 4AI/2AO" -
"6ES7 334-0CE0*-0AA0 4AI/2AO" -
"6ES7 334-0KE00-0AB0 4AI/2AO" -
"6ES7 335-7HG01-0AB0 4AI/4AO" -
"6ES7 338-4BC00-0AB0 POS-INPUT" -
"6ES7 338-4BC01-0AB0 POS-INPUT" -
"6ES7 370-0AA0*-0AA0 DUMMY" -
"6ES7 370-0AA00-0AA0 DUMMY" -
"6ES7 370-0AA01-0AA0 DUMMY" -
"7MH4553-1AA** SIWAREX_M" -
"7MH4601-1*A01 SIWAREX_U" -
"6GT2002-0FA00 ASM470" -
"6AT1735-0AA00-0AA0 CM_35" -
"6AT1735-0AA01-0AA0 CM_35" -
"6GK7 342-2AH00-0XA0 CP342-2" -
"6GK7 343-2AH00-0XA0 CP343-2" -
"6GK7 343-2AH10-0XA0 CP343-2P" -
"6ES7 331-7NF10-0AB0 8AI" Siemens_ET200M_Ai8
"6ES7 331-7PF00-0AB0 RTD" -
"6ES7 331-7PF10-0AB0 TC" -
"6ES7 321-1FH00-0AA0 16DI" Siemens_ET200M_Di16
"6ES7 322-1FH00-0AA0 16DO" Siemens_ET200M_Do16
"6ES7 352-5AH00-0AE0 FM352-5" -
"6ES7 352-5AH10-0AE0 FM352-5" -
"6ES7 331-1KF00-0AB0 8AI" Siemens_ET200M_Ai8
"6ES7 331-1KF01-0AB0 8AI" Siemens_ET200M_Ai8
"6ES7 332-5HF00-0AB0 8AO" Siemens_ET200M_Ao8
"6ES7 322-5HF00-0AB0 8DO" Siemens_ET200M_Do8
"6ES7 322-5FF00-0AB0 8DO" Siemens_ET200M_Do8
"6ES7 322-5GH00-0AB0 16DO" Siemens_ET200M_Do16
"6ES7 321-7BH01-0AB0 16DI" Siemens_ET200M_Di16
"6ES7 321-7BH81-0AB0 16DI" Siemens_ET200M_Di16
"6ES7 321-1BH10-0AA0 16DI" Siemens_ET200M_Di16
"6ES7 322-1BH10-0AA0 16DO" Siemens_ET200M_Do16
"6ES7 331-7HF00-0AB0 8AI" Siemens_ET200M_Ai8
"6ES7 331-7HF01-0AB0 8AI" Siemens_ET200M_Ai8
}
#
# Siemens ET200S (IM151)
#
Model "ET 200S (IM151) "
{
"6ES7 138-4CA00-0AA0 PM-E DC24V"
"6ES7 138-4CB00-0AB0 PM-E AC230"
"6ES7 138-4CB10-0AB0 PM-E AC230"
"6ES7 131-4BB00-0AB0 2DI DC24V" Siemens_ET200S_Di2
"6ES7 131-4BB00-0AB0* 2DI DC24V" Siemens_ET200S_Di2
"6ES7 131-4BB00-0AA0 2DI DC24V" Siemens_ET200S_Di2
"6ES7 131-4BB00-0AA0* 2DI DC24V" Siemens_ET200S_Di2
"6ES7 132-4BB00-0AB0 2DO DC24V" Siemens_ET200S_Do2
"6ES7 132-4BB00-0AB0* 2DO DC24V" Siemens_ET200S_Do2
"6ES7 132-4BB00-0AA0 2DO DC24V" Siemens_ET200S_Do2
"6ES7 132-4BB00-0AA0* 2DO DC24V" Siemens_ET200S_Do2
"6ES7 132-4BB30-0AB0 2DO DC24V" Siemens_ET200S_Do2
"6ES7 132-4BB30-0AB0* 2DO DC24V" Siemens_ET200S_Do2
"6ES7 132-4BB30-0AA0 2DO DC24V" Siemens_ET200S_Do2
"6ES7 132-4BB30-0AA0* 2DO DC24V" Siemens_ET200S_Do2
"6ES7 132-4HB00-0AB0 2DO Rel. " Siemens_ET200S_Do2
"6ES7 132-4HB00-0AB0* 2DO Rel. " Siemens_ET200S_Do2
"6ES7 131-4BD00-0AB0 4DI DC24V" Siemens_ET200S_Di4
"6ES7 131-4BD00-0AB0* 4DI DC24V" Siemens_ET200S_Di4
"6ES7 131-4BD00-0AA0 4DI DC24V" Siemens_ET200S_Di4
"6ES7 131-4BD00-0AA0* 4DI DC24V" Siemens_ET200S_Di4
"6ES7 132-4BD00-0AA0 4DO DC24V" Siemens_ET200S_Do4
"6ES7 132-4BD00-0AA0* 4DO DC24V" Siemens_ET200S_Do4
"6ES7 132-4BD30-0AA0 4DO DC24V" Siemens_ET200S_Do4
"6ES7 132-4BD30-0AA0* 4DO DC24V" Siemens_ET200S_Do4
"6ES7 131-4EB00-0AB0 2DI 120V " Siemens_ET200S_Di2
"6ES7 131-4EB00-0AB0* 2DI 120V " Siemens_ET200S_Di2
"6ES7 131-4FB00-0AB0 2DI 230V " Siemens_ET200S_Di2
"6ES7 131-4FB00-0AB0* 2DI 230V " Siemens_ET200S_Di2
"6ES7 132-4FB00-0AB0 2DO 230V " Siemens_ET200S_Do2
"6ES7 132-4FB00-0AB0* 2DO 230V " Siemens_ET200S_Do2
"6ES7 134-4FB00-0AB0 2AI U " Siemens_ET200S_Ai2
"6ES7 134-4FB50-0AB0 2AI U " Siemens_ET200S_Ai2
"6ES7 134-4LB00-0AB0 2AI U " Siemens_ET200S_Ai2
"6ES7 134-4GB00-0AB0 2AI I 2DMU" Siemens_ET200S_Ai2
"6ES7 134-4GB50-0AB0 2AI I 2DMU" Siemens_ET200S_Ai2
"6ES7 134-4GB10-0AB0 2AI I 4DMU" Siemens_ET200S_Ai2
"6ES7 134-4GB60-0AB0 2AI I 4DMU" Siemens_ET200S_Ai2
"6ES7 134-4MB00-0AB0 2AI I 4DMU" Siemens_ET200S_Ai2
"6ES7 134-4JB00-0AB0 AI 2xTC " Siemens_ET200S_Ai2
"6ES7 134-4JB50-0AB0 2AI RTD " Siemens_ET200S_Ai2
"6ES7 135-4FB00-0AB0 2AO U " Siemens_ET200S_Ao2
"6ES7 135-4GB00-0AB0 2AO I " Siemens_ET200S_Ao2
"6ES7 135-4LB00-0AB0 2AO U " Siemens_ET200S_Ao2
"6ES7 135-4MB00-0AB0 2AO I " Siemens_ET200S_Ao2
"6ES7 138-4DB00-0AB0 1SSI "
"6ES7 138-4DB00-0AB0 1SSI Fast "
"C 6ES7 138-4DA00-0AB0 1CNT24V "
"M 6ES7 138-4DA00-0AB0 1CNT24V "
"C 6ES7 138-4DA01-0AB0 1CNT24V "
"M 6ES7 138-4DA01-0AB0 1CNT24V "
"6ES7 138-4DC00-0AB0 1Step "
"6ES7 138-4DF00-0AB0 ASCII (8B)"
"6ES7 138-4DF00-0AB0 ASCII (4B)"
"6ES7 138-4DF00-0AB0 3964R(8B) "
"6ES7 138-4DF00-0AB0 3964R(4B) "
"3RK1903-0BA00 PM-D "
"3RK1903-1BA00 PM-D F1 "
"3RK1903-1BB00 PM-D F2 "
"3RK1903-1BD00 PM-D F3 "
"3RK1903-1BC00 PM-D F4 "
"3RK1903-1BE00 PM-D F5 "
"3RK1903-1CB00 PM-X "
"3RK1301-xxB00-0AA0 DS "
"3RK1301-xxB00-0AA0 *DS "
"3RK1301-xxB00-0AA1 DS-x "
"3RK1301-xxB00-0AA1 *DS-x "
"3RK1301-xxB00-0AA2 DS1-x "
"3RK1301-xxB00-0AA2 *DS1-x "
"3RK1301-xxB00-1AA0 RS "
"3RK1301-xxB00-1AA0 *RS "
"3RK1301-xxB00-1AA1 RS-x "
"3RK1301-xxB00-1AA1 *RS-x "
"3RK1301-xxB00-1AA2 RS1-x "
"3RK1301-xxB00-1AA2 *RS1-x "
"3RK1903-0CE00 xB3 DC24V/4A "
"3RK1903-0CE00 *xB3 DC24V/4A "
"3RK1903-0CF00 xB4 DC500V/0,7A"
"3RK1903-0CF00 *xB4 DC500V/0,7A"
}
Model "ABB Drives RPBA-01"
{
"PPO Type 1"
"PPO Type 2"
"PPO Type 3" BaseFcPPO3PbModule
"PPO Type 4"
"PPO Type 5" ABB_ACS_PPO5
}
Model "MOVIDRIVE DFP21 (DPV1)"
{
"3 PD (3 words) " SEW_Movidrive_3PD
"6 PD (6 words) " SEW_Movidrive_6PD
}
# Siemens Diagnostic Repeater
Model "Diagnostic Repeater"
{
"TSYNC-Diag-Module" Sinamics_Tgm1_PbModule
}
\ No newline at end of file
#
#
Device "IM151-3 PN"
Device "IM151-3 PN V3.0"
Device "IM151-3 PN HF V3.0"
Device "IM151-3 PN ST V4.0"
Device "IM151-3 PN FO V4.0"
Device "IM151-3 PN HF V4.0"
Device "IM151-3 PN HF V5.0"
Device "IM151-3 PN FO V5.0"
Device "IM151-3 PN ST V5.0"
{
"2AI U, Standard" Siemens_Ai2_PnModule
"2AI U, Standard" Siemens_Ai2_PnModule
"2AI U, High Speed" Siemens_Ai2_PnModule
"2AI U, High Speed Taktsynchron" Siemens_Ai2_PnModule
"2AI U, High Speed Taktsynchron" Siemens_Ai2_PnModule
"2AI U, High Feature" Siemens_Ai2_PnModule
"2AI U, High Feature" Siemens_Ai2_PnModule
"2AI I, 2WIRE, Standard" Siemens_Ai2_PnModule
"2AI I, 2WIRE, Standard" Siemens_Ai2_PnModule
"2AI I, 2WIRE, High Speed" Siemens_Ai2_PnModule
"2AI I, 2WIRE, High Speed Taktsynchron" Siemens_Ai2_PnModule
"2AI I, 2WIRE, High Speed Taktsynchron" Siemens_Ai2_PnModule
"2AI I, 4WIRE, Standard" Siemens_Ai2_PnModule
"2AI I, 4WIRE, Standard" Siemens_Ai2_PnModule
"2AI I, 4WIRE, High Speed" Siemens_Ai2_PnModule
"2AI I, 4WIRE, High Speed Taktsynchron" Siemens_Ai2_PnModule
"2AI I, 4WIRE, High Speed Taktsynchron" Siemens_Ai2_PnModule
"2AI I, 2/4WIRE, High Feature" Siemens_Ai2_PnModule
"2AI I, 2/4WIRE, High Feature" Siemens_Ai2_PnModule
"2AI TC, Standard" Siemens_Ai2_PnModule
"2AI TC, High Feature" Siemens_Ai2_PnModule
"2AI TC, High Feature" Siemens_Ai2_PnModule
"2AI RTD, Standard" Siemens_Ai2_PnModule
"2AI RTD, High Feature" Siemens_Ai2_PnModule
"2AI RTD, High Feature" Siemens_Ai2_PnModule
"4AI I, 2WIRE, Standard" Siemens_Ai4_PnModule
"2AO U, Standard" Siemens_Ao2_PnModule
"2AO U, Standard" Siemens_Ao2_PnModule
"2AO U, High Feature" Siemens_Ao2_PnModule
"2AO U, High Feature, isochron mode" Siemens_Ao2_PnModule
"2AO U, High Feature, isochron mode" Siemens_Ao2_PnModule
"2AO I, Standard" Siemens_Ao2_PnModule
"2AO I, Standard" Siemens_Ao2_PnModule
"2AO I, High Feature" Siemens_Ao2_PnModule
"2AO I, High Feature, isochron mode" Siemens_Ao2_PnModule
"2AO I, High Feature, isochron mode" Siemens_Ao2_PnModule
"2AO U, High Speed Taktsynchron" Siemens_Ao2_PnModule
"2AO I, High Speed Taktsynchron" Siemens_Ao2_PnModule
"2DI DC24V, High Feature" Siemens_Di2_PnModule
"2DI DC24V, High Feature*" Siemens_Di2_PnModule
"2DI DC24V, High Feature, 01" Siemens_Di2_PnModule
"2DI DC24V, High Feature, 01*" Siemens_Di2_PnModule
"2DI DC24V, Standard" Siemens_Di2_PnModule
"2DI DC24V, Standard*" Siemens_Di2_PnModule
"2DI DC24V, Standard, 01" Siemens_Di2_PnModule
"2DI DC24V, Standard, 01*" Siemens_Di2_PnModule
"2DI AC120V, Standard" Siemens_Di2_PnModule
"2DI AC120V, Standard*" Siemens_Di2_PnModule
"2DI AC230V, Standard" Siemens_Di2_PnModule
"2DI AC230V, Standard*" Siemens_Di2_PnModule
"4DI DC24V, High Feature" Siemens_Di4_PnModule
"4DI DC24V, High Feature*" Siemens_Di4_PnModule
"4DI DC24V, High Feature, 01" Siemens_Di4_PnModule
"4DI DC24V, High Feature, 01*" Siemens_Di4_PnModule
"4DI DC24V, Standard" Siemens_Di4_PnModule
"4DI DC24V, Standard*" Siemens_Di4_PnModule
"4DI DC24V, Standard, 01" Siemens_Di4_PnModule
"4DI DC24V, Standard, 01*" Siemens_Di4_PnModule
"4DI DC24V/SRC, Standard" Siemens_Di4_PnModule
"4DI DC24V/SRC, Standard*" Siemens_Di4_PnModule
"4DI DC24V/SRC, Standard, 01" Siemens_Di4_PnModule
"4DI DC24V/SRC, Standard, 01*" Siemens_Di4_PnModule
"4DI UC24..48V, High Feature" Siemens_Di4_PnModule
"4DI UC24..48V, High Feature*" Siemens_Di4_PnModule
"4DI NAMUR" Siemens_Di4_PnModule
"2DO DC24V/0.5A, High Feature" Siemens_Do2_PnModule
"2DO DC24V/0.5A, High Feature*" Siemens_Do2_PnModule
"2DO DC24V/0.5A, High Feature, 01" Siemens_Do2_PnModule
"2DO DC24V/0.5A, High Feature, 01*" Siemens_Do2_PnModule
"2DO DC24V/0.5A, Standard" Siemens_Do2_PnModule
"2DO DC24V/0.5A, Standard*" Siemens_Do2_PnModule
"2DO DC24V/0.5A, Standard, 01" Siemens_Do2_PnModule
"2DO DC24V/0.5A, Standard, 01*" Siemens_Do2_PnModule
"2DO DC24V/2A, High Feature" Siemens_Do2_PnModule
"2DO DC24V/2A, High Feature*" Siemens_Do2_PnModule
"2DO DC24V/2A, High Feature, 01" Siemens_Do2_PnModule
"2DO DC24V/2A, High Feature, 01*" Siemens_Do2_PnModule
"2DO DC24V/2A, Standard" Siemens_Do2_PnModule
"2DO DC24V/2A, Standard*" Siemens_Do2_PnModule
"2DO DC24V/2A, Standard, 01" Siemens_Do2_PnModule
"2DO DC24V/2A, Standard, 01*" Siemens_Do2_PnModule
"2DO AC24..230V/1A" Siemens_Do2_PnModule
"2DO AC24..230V/1A*" Siemens_Do2_PnModule
"2DO AC24..230V/1A" Siemens_Do2_PnModule
"2DO AC24..230V/1A*" Siemens_Do2_PnModule
"4DO DC24V/0.5A, Standard" Siemens_Do4_PnModule
"4DO DC24V/0.5A, Standard*" Siemens_Do4_PnModule
"4DO DC24V/0.5A, Standard, 01" Siemens_Do4_PnModule
"4DO DC24V/0.5A, Standard, 01*" Siemens_Do4_PnModule
"4DO DC24V/2A, Standard" Siemens_Do4_PnModule
"4DO DC24V/2A, Standard*" Siemens_Do4_PnModule
"4DO DC24V/2A, Standard, 01" Siemens_Do4_PnModule
"4DO DC24V/2A, Standard, 01*" Siemens_Do4_PnModule
"4DO DC24V/2A, Standard, 02" Siemens_Do4_PnModule
"4DO DC24V/2A, Standard, 02*" Siemens_Do4_PnModule
"4DO DC24V/0,5A SINK OUT" Siemens_Do4_PnModule
"4DO DC24V/0,5A SINK OUT*" Siemens_Do4_PnModule
}
Device "IM153-4 PN"
{
"SM 321 DI4xNAMUR, Ex" Siemens_Di4_PnModule
"SM 321 DI8xAC230V" Siemens_Di8_PnModule
"SM 321 DI8xAC120/230V" Siemens_Di8_PnModule
"SM 321 DI16xDC24V" Siemens_Di16_PnModule
"SM 321 DI16xUC24/48V" Siemens_Di16_PnModule
"SM 321 DI16xDC48-125V" Siemens_Di16_PnModule
"SM 321 DI32xDC24V" Siemens_Di32_PnModule
"SM 321 DI32xAC120V" Siemens_Di32_PnModule
"SM 321 DI16xAC120/230V" Siemens_Di16_PnModule
"SM 321 DI16xNAMUR" Siemens_Di16_PnModule
"SM 321 DI16xDC24V, Interrupt" Siemens_Di16_PnModule
"SM 321 DI16xDC24V" Siemens_Di16_PnModule
"SM 321 DI16xDC24V" Siemens_Di16_PnModule
"SM 321 DI64xDC24V"
"SM 322 DO4xDC15V/20mA, Ex" Siemens_Do4_PnModule
"SM 322 DO4xDC24V/10mA, Ex" Siemens_Do4_PnModule
"SM 322 DO8xDC24V/2A" Siemens_Do8_PnModule
"SM 322 DO8xAC230V/2A" Siemens_D08_PnModule
"SM 322 DO8xRel. AC230V" Siemens_Do8_PnModule
"SM 322 DO8xRel. AC230V/8A" Siemens_Do8_PnModule
"SM 322 DO8xDC48-125V/1.5A" Siemens_Do8_PnModule
"SM 322 DO8xDC24V/0.5A" Siemens_Do8_PnModule
"SM 322 DO16xDC24V/0.5A" Siemens_Do16_PnModule
"SM 322 DO16xRel. AC120V/230V" Siemens_Do16_PnModule
"SM 322 DO32xDC24V/0.5A" Siemens_Do32_PnModule
"SM 322 DO32xAC120-230V/1A" Siemens_Do32_PnModule
"SM 322 DO16xAC120V/230V/1A" Siemens_Do16_PnModule
"SM 322 DO16xDC24V/0.5A" Siemens_Do16_PnModule
"SM 322 DO8xRelay" Siemens_Do8_PnModule
"SM 322 DO8xAC Iso" Siemens_Do8_PnModule
"SM 322 DO16xUC24/48V" Siemens_Do16_PnModule
"SM 322 DO16xDC24V/0.5A" Siemens_Do16_PnModule
"SM 322 DO64xDC24V/0.3A; switching P"
"SM 322 DO64xDC24V/0.3A; switching M"
"SM 323 DI8/DO8xDC24V/0.5A"
"SM 323 DI16/DO16x24V/0.5A"
"SM 327 DI8/DX8"
"SM 331 AI2x12Bit" Siemens_Ai2_PnModule
"SM 331 AI4x0/4 to 20mA, Ex" Siemens_Ai4_PnModule
"SM 331 AI8xTC/4xRTD, Ex" Siemens_Ai8_PnModule
"SM 331 AI8x16Bit" Siemens_Ai8_PnModule
"SM 331 AI8x16Bit" Siemens_Ai8_PnModule
"SM 331 AI8xRTD" Siemens_Ai8_PnModule
"SM 331 AI8xTC" Siemens_Ai8_PnModule
"SM 331 AI8x13Bit" Siemens_Ai8_PnModule
"SM 331 AI8x14Bit" Siemens_Ai8_PnModule
"SM 331 AI8x12Bit" Siemens_Ai8_PnModule
"SM 332 AO2x12Bit" Siemens_Ao2_PnModule
"SM 332 AO4x12Bit" Siemens_Ao4_PnModule
"SM 332 AO4x16Bit" Siemens_Ao4_PnModule
"SM 332 AO4x0/4 to 20mA, Ex" Siemens_Ao4_PnModule
"SM 332 AO8x12Bit" Siemens_Ao8_PnModule
"SM 335 AI4/AO4x14/12Bit"
"SM 334 AI4/AO2x8/8Bit"
"SM 334 AI4/AO2"
}
......@@ -187,6 +187,13 @@ void GsdAttrGtk::activate_cmd_ok( GtkWidget *w, gpointer data)
attr->activate_cmd_ok();
}
void GsdAttrGtk::activate_cmd_apply( GtkWidget *w, gpointer data)
{
GsdAttr *attr = (GsdAttr *)data;
attr->activate_cmd_apply();
}
void GsdAttrGtk::activate_cmd_ca( GtkWidget *w, gpointer data)
{
GsdAttr *attr = (GsdAttr *)data;
......@@ -424,6 +431,10 @@ GsdAttrGtk::GsdAttrGtk( GtkWidget *a_parent_wid,
gtk_widget_set_size_request( cmd_ok, 70, 25);
g_signal_connect( cmd_ok, "clicked",
G_CALLBACK(activate_cmd_ok), this);
cmd_apply = gtk_button_new_with_label( "Apply");
gtk_widget_set_size_request( cmd_apply, 70, 25);
g_signal_connect( cmd_apply, "clicked",
G_CALLBACK(activate_cmd_apply), this);
cmd_cancel = gtk_button_new_with_label( "Cancel");
gtk_widget_set_size_request( cmd_cancel, 70, 25);
g_signal_connect( cmd_cancel, "clicked",
......@@ -431,6 +442,7 @@ GsdAttrGtk::GsdAttrGtk( GtkWidget *a_parent_wid,
GtkWidget *hboxbuttons = gtk_hbox_new( TRUE, 40);
gtk_box_pack_start( GTK_BOX(hboxbuttons), cmd_ok, FALSE, FALSE, 0);
gtk_box_pack_start( GTK_BOX(hboxbuttons), cmd_apply, FALSE, FALSE, 0);
gtk_box_pack_end( GTK_BOX(hboxbuttons), cmd_cancel, FALSE, FALSE, 0);
gtk_box_pack_start( GTK_BOX(vbox), GTK_WIDGET(menu_bar), FALSE, FALSE, 0);
......@@ -447,6 +459,7 @@ GsdAttrGtk::GsdAttrGtk( GtkWidget *a_parent_wid,
if ( !edit_mode) {
gtk_widget_set_sensitive( cmd_ok, FALSE);
gtk_widget_set_sensitive( cmd_apply, FALSE);
gtk_widget_set_sensitive( menubutton_copy, FALSE);
gtk_widget_set_sensitive( menubutton_cut, FALSE);
gtk_widget_set_sensitive( menubutton_paste, FALSE);
......@@ -455,120 +468,5 @@ GsdAttrGtk::GsdAttrGtk( GtkWidget *a_parent_wid,
wow = new CoWowGtk( toplevel);
#if 0
char uid_filename[120] = {"pwr_exe:pb_gsd_attr.uid"};
char *uid_filename_p = uid_filename;
Arg args[20];
pwr_tStatus sts;
char title[80];
int i;
MrmHierarchy s_DRMh;
MrmType dclass;
char name[] = "Proview/R Navigator";
static char translations[] =
"<FocusIn>: gsdattr_inputfocus()\n";
static XtTranslations compiled_translations = NULL;
static XtActionsRec actions[] =
{
{"gsdattr_inputfocus", (XtActionProc) action_inputfocus}
};
static MrmRegisterArg reglist[] = {
{ "gsdattr_ctx", 0 },
{"gsdattr_activate_exit",(caddr_t)activate_exit },
{"gsdattr_activate_print",(caddr_t)activate_print },
{"gsdattr_activate_copy",(caddr_t)activate_copy },
{"gsdattr_activate_cut",(caddr_t)activate_cut },
{"gsdattr_activate_paste",(caddr_t)activate_paste },
{"gsdattr_activate_zoom_in",(caddr_t)activate_zoom_in },
{"gsdattr_activate_zoom_out",(caddr_t)activate_zoom_out },
{"gsdattr_activate_zoom_reset",(caddr_t)activate_zoom_reset },
{"gsdattr_activate_change_value",(caddr_t)activate_change_value },
{"gsdattr_activate_help",(caddr_t)activate_help },
{"gsdattr_create_msg_label",(caddr_t)create_msg_label },
{"gsdattr_create_menubutton",(caddr_t)create_menubutton },
{"gsdattr_create_cmd_prompt",(caddr_t)create_cmd_prompt },
{"gsdattr_create_cmd_input",(caddr_t)create_cmd_input },
{"gsdattr_create_attrnav_form",(caddr_t)create_attrnav_form },
{"gsdattr_create_cmd_ok",(caddr_t)create_cmd_ok },
{"gsdattr_activate_cmd_ok",(caddr_t)activate_cmd_ok },
{"gsdattr_create_cmd_ca",(caddr_t)create_cmd_ca },
{"gsdattr_activate_cmd_ca",(caddr_t)activate_cmd_ca }
};
static int reglist_num = (sizeof reglist / sizeof reglist[0]);
dcli_translate_filename( uid_filename, uid_filename);
// Gtk
MrmInitialize();
strcpy( title, "PwR GsdAttr");
reglist[0].value = (caddr_t) this;
// Save the context structure in the widget
XtSetArg (args[0], XmNuserData, (unsigned int) this);
sts = MrmOpenHierarchy( 1, &uid_filename_p, NULL, &s_DRMh);
if (sts != MrmSUCCESS) printf("can't open %s\n", uid_filename);
MrmRegisterNames(reglist, reglist_num);
parent_wid = XtCreatePopupShell("pbGsdEditor",
topLevelShellWidgetClass, a_parent_wid, args, 0);
sts = MrmFetchWidgetOverride( s_DRMh, "gsd_attr_window", parent_wid,
name, args, 1, &toplevel, &dclass);
if (sts != MrmSUCCESS) printf("can't fetch %s\n", name);
MrmCloseHierarchy(s_DRMh);
if (compiled_translations == NULL)
XtAppAddActions( XtWidgetToApplicationContext( toplevel),
actions, XtNumber(actions));
if (compiled_translations == NULL)
compiled_translations = XtParseTranslationTable(translations);
XtOverrideTranslations( toplevel, compiled_translations);
i = 0;
XtSetArg(args[i],XmNwidth,500);i++;
XtSetArg(args[i],XmNheight,700);i++;
XtSetValues( toplevel,args,i);
i = 0;
XtSetArg(args[i], XmNdeleteResponse, XmDO_NOTHING);i++;
XtSetValues( parent_wid,args,i);
XtManageChild( toplevel);
XtUnmanageChild( cmd_input);
attrnav = new GsdAttrNavGtk( this, attrnav_form, "Plant",
gsd, edit_mode, &brow_widget, &sts);
((GsdAttrNav *)attrnav)->message_cb = &GsdAttr::gsdattr_message;
((GsdAttrNav *)attrnav)->change_value_cb = &GsdAttr::gsdattr_change_value_cb;
XtPopup( parent_wid, XtGrabNone);
if ( !edit_mode) {
i = 0;
XtSetArg( args[i], XmNsensitive, 0);i++;
XtSetValues( cmd_ok, args, i);
XtSetValues( menubutton_copy, args, i);
XtSetValues( menubutton_cut, args, i);
XtSetValues( menubutton_paste, args, i);
XtSetValues( menubutton_changevalue, args, i);
}
wow = new CoWowGtk( toplevel);
// Connect the window manager close-button to exit
flow_AddCloseVMProtocolCb( parent_wid,
(XtCallbackProc)activate_exit, this);
#endif
}
......@@ -36,6 +36,7 @@ class GsdAttrGtk : public GsdAttr {
GtkWidget *cmd_input;
GtkWidget *attrnav_form;
GtkWidget *cmd_ok;
GtkWidget *cmd_apply;
GtkWidget *cmd_cancel;
GtkWidget *menubutton_copy;
GtkWidget *menubutton_cut;
......@@ -68,6 +69,7 @@ class GsdAttrGtk : public GsdAttr {
static void activate_print( GtkWidget *w, gpointer data);
static void activate_cmd_input( GtkWidget *w, gpointer data);
static void activate_cmd_ok( GtkWidget *w, gpointer data);
static void activate_cmd_apply( GtkWidget *w, gpointer data);
static void cmd_close_apply_cb( void *ctx, void *data);
static void cmd_close_no_cb( void *ctx, void *data);
static void activate_cmd_ca( GtkWidget *w, gpointer dataxo);
......
......@@ -211,6 +211,13 @@ void GsdmlAttrGtk::activate_cmd_ok( GtkWidget *w, gpointer data)
attr->activate_cmd_ok();
}
void GsdmlAttrGtk::activate_cmd_apply( GtkWidget *w, gpointer data)
{
GsdmlAttr *attr = (GsdmlAttr *)data;
attr->activate_cmd_apply();
}
void GsdmlAttrGtk::activate_cmd_ca( GtkWidget *w, gpointer data)
{
GsdmlAttr *attr = (GsdmlAttr *)data;
......@@ -462,6 +469,10 @@ GsdmlAttrGtk::GsdmlAttrGtk( GtkWidget *a_parent_wid,
gtk_widget_set_size_request( cmd_ok, 70, 25);
g_signal_connect( cmd_ok, "clicked",
G_CALLBACK(activate_cmd_ok), this);
cmd_apply = gtk_button_new_with_label( "Apply");
gtk_widget_set_size_request( cmd_apply, 70, 25);
g_signal_connect( cmd_apply, "clicked",
G_CALLBACK(activate_cmd_apply), this);
cmd_cancel = gtk_button_new_with_label( "Cancel");
gtk_widget_set_size_request( cmd_cancel, 70, 25);
g_signal_connect( cmd_cancel, "clicked",
......@@ -469,6 +480,7 @@ GsdmlAttrGtk::GsdmlAttrGtk( GtkWidget *a_parent_wid,
GtkWidget *hboxbuttons = gtk_hbox_new( TRUE, 40);
gtk_box_pack_start( GTK_BOX(hboxbuttons), cmd_ok, FALSE, FALSE, 0);
gtk_box_pack_start( GTK_BOX(hboxbuttons), cmd_apply, FALSE, FALSE, 0);
gtk_box_pack_end( GTK_BOX(hboxbuttons), cmd_cancel, FALSE, FALSE, 0);
gtk_box_pack_start( GTK_BOX(vbox), GTK_WIDGET(menu_bar), FALSE, FALSE, 0);
......@@ -485,6 +497,7 @@ GsdmlAttrGtk::GsdmlAttrGtk( GtkWidget *a_parent_wid,
if ( !edit_mode) {
gtk_widget_set_sensitive( cmd_ok, FALSE);
gtk_widget_set_sensitive( cmd_apply, FALSE);
gtk_widget_set_sensitive( menubutton_copy, FALSE);
gtk_widget_set_sensitive( menubutton_cut, FALSE);
gtk_widget_set_sensitive( menubutton_paste, FALSE);
......
......@@ -36,6 +36,7 @@ class GsdmlAttrGtk : public GsdmlAttr {
GtkWidget *cmd_input;
GtkWidget *attrnav_form;
GtkWidget *cmd_ok;
GtkWidget *cmd_apply;
GtkWidget *cmd_cancel;
GtkWidget *menubutton_copy;
GtkWidget *menubutton_cut;
......@@ -73,6 +74,7 @@ class GsdmlAttrGtk : public GsdmlAttr {
static void activate_expand_all( GtkWidget *w, gpointer data);
static void activate_cmd_input( GtkWidget *w, gpointer data);
static void activate_cmd_ok( GtkWidget *w, gpointer data);
static void activate_cmd_apply( GtkWidget *w, gpointer data);
static void cmd_close_apply_cb( void *ctx, void *data);
static void cmd_close_no_cb( void *ctx, void *data);
static void activate_cmd_ca( GtkWidget *w, gpointer dataxo);
......
......@@ -186,6 +186,46 @@ void GsdAttr::activate_cmd_ok()
int idx;
char msg[80];
if ( save_cb) {
// Check syntax
sts = gsd->syntax_check( &idx);
if ( EVEN(sts)) {
switch ( sts) {
case PB__NOMODULENAME:
sprintf( msg, "Syntax error in module %d, No module name", idx + 1);
break;
case PB__DUPLMODULENAME:
sprintf( msg, "Syntax error in module %s, Duplicate module name",
gsd->module_conf[idx].name);
break;
case PB__NOMODULECLASS:
sprintf( msg, "Syntax error in module %s, Module class is missing",
gsd->module_conf[idx].name);
break;
default:
sprintf( msg, "Syntax error in module %d", idx + 1);
}
message( 'E', msg);
return;
}
sts = (save_cb)( parent_ctx);
if ( EVEN(sts))
message( 'E', "Error saving profibus data");
else if ( close_cb)
(close_cb)( parent_ctx);
}
else if ( close_cb)
(close_cb)( parent_ctx);
}
void GsdAttr::activate_cmd_apply()
{
int sts;
int idx;
char msg[80];
if ( save_cb) {
// Check syntax
......
......@@ -77,6 +77,7 @@ class GsdAttr {
void activate_zoom_out();
void activate_zoom_reset();
void activate_cmd_ok();
void activate_cmd_apply();
void activate_cmd_ca();
static void gsdattr_message( void *attr, char severity, const char *message);
......
......@@ -27,6 +27,7 @@
#include "co_cdh.h"
#include "co_time.h"
#include "cow_wow.h"
#include "co_dcli.h"
#include "flow.h"
#include "flow_browctx.h"
#include "flow_browapi.h"
......@@ -421,7 +422,8 @@ GsdAttrNav::GsdAttrNav(
message_cb(0), change_value_cb(0)
{
strcpy( name, xn_name);
strcpy( modelname, "");
*status = 1;
}
......@@ -977,6 +979,7 @@ int GsdAttrNav::trace_scan_bc( brow_tObject object, void *p)
case attrnav_eItemType_PbModuleType: {
ItemPbModuleType *item;
int sts;
gsd_sModule *mp = 0;
item = (ItemPbModuleType *)base_item;
......@@ -993,7 +996,6 @@ int GsdAttrNav::trace_scan_bc( brow_tObject object, void *p)
else {
int idx = 1;
gsd_sModule *mp;
for ( mp = attrnav->gsd->modulelist; mp; mp = mp->next) {
if ( idx++ == *(int *)p)
break;
......@@ -1016,6 +1018,36 @@ int GsdAttrNav::trace_scan_bc( brow_tObject object, void *p)
sts = brow_GetNextSibling( attrnav->brow->ctx, object, &odata);
brow_GetUserData( odata, (void **)&prm_item);
prm_item->update( attrnav);
// Set default class
if ( mp) {
pwr_tObjName mclass;
pwr_tCid *datap;
pwr_tCid mcid = 0;
sts = attrnav->search_class( pb_cModuleClassFile, attrnav->modelname,
mp->Mod_Name, mclass);
if ( ODD(sts)) {
for ( int i = 0; attrnav->gsd->module_classlist[i].cid; i++) {
if ( cdh_NoCaseStrcmp( mclass, attrnav->gsd->module_classlist[i].name) == 0) {
mcid = attrnav->gsd->module_classlist[i].cid;
break;
}
}
}
brow_tObject cobject;
sts = brow_GetNextSibling( attrnav->brow->ctx, odata, &cobject);
if ( ODD(sts)) {
ItemPb *item;
brow_GetUserData( cobject, (void **)&item);
if ( item->type == attrnav_eItemType_PbModuleClass) {
brow_GetTraceData( cobject, (void **)&datap);
*datap = mcid;
}
}
}
}
else
item->first_scan = 0;
......@@ -1384,6 +1416,9 @@ int GsdAttrNav::object_attr()
type, size, 0, 0,
p, 1, 0,
NULL, flow_eDest_IntoLast);
if ( strcmp( keyp->name, "Model_Name") == 0)
strcpy( modelname, (char *)p);
}
}
......@@ -1486,6 +1521,81 @@ int GsdAttrNav::init_brow_cb( FlowCtx *fctx, void *client_data)
return 1;
}
int GsdAttrNav::search_class( const char *filename, const char *model,
const char *module, char *mclass)
{
char line[200];
char itemv[2][200];
pwr_tFileName fname;
int num;
ifstream fp;
int in_model = 0;
int in_par = 0;
char lmodel[200];
char lmodule[200];
dcli_trim( lmodel, (char *)model);
dcli_trim( lmodule, (char *)module);
dcli_translate_filename( fname, filename);
fp.open( fname);
if ( !fp)
return 0;
while ( fp.getline( line, sizeof(line)) ) {
if ( line[0] == '#')
continue;
num = dcli_parse( line, " ", "",
(char *) itemv, sizeof( itemv)/sizeof( itemv[0]),
sizeof( itemv[0]), 0);
if ( num < 1)
continue;
dcli_trim( itemv[0], itemv[0]);
if ( num >= 2)
dcli_trim( itemv[1], itemv[1]);
if ( cdh_NoCaseStrcmp( itemv[0], "Model") == 0) {
if ( num < 2)
continue;
if ( in_model)
return 0;
if ( cdh_NoCaseStrcmp( itemv[1], lmodel) == 0)
in_model = 1;
}
if ( in_model) {
if ( strcmp( itemv[0], "{") == 0)
in_par = 1;
}
if ( in_par) {
if ( num < 2)
continue;
if ( strcmp( itemv[0], "}") == 0)
break;
if ( strcmp( itemv[1], "-") == 0 || strcmp( itemv[1], "") == 0)
continue;
if ( cdh_NoCaseStrcmp( itemv[0], lmodule) == 0) {
strncpy( mclass, itemv[1], sizeof(pwr_tObjName));
fp.close();
return 1;
}
}
}
fp.close();
return 0;
}
ItemPbBase::ItemPbBase( GsdAttrNav *attrnav, const char *item_name, const char *attr,
int attr_type, int attr_size, double attr_min_limit,
double attr_max_limit, void *attr_value_p,
......
......@@ -54,6 +54,8 @@ extern "C" {
#include "cow_pb_gsd_attr.h"
#endif
#define pb_cModuleClassFile "$pwr_exe/pb_module_classes.dat"
typedef enum {
attrnav_eItemType_PbBase,
attrnav_eItemType_PbEnum,
......@@ -121,6 +123,7 @@ class GsdAttrNav {
void (*change_value_cb)( void *);
CoWow *wow;
CoWowTimer *trace_timerid;
char modelname[80];
GsdAttrNav(
void *xn_parent_ctx,
......@@ -144,6 +147,8 @@ class GsdAttrNav {
void zoom( double zoom_factor);
void unzoom();
void get_zoom( double *zoom_factor);
int search_class( const char *filename, const char *model,
const char *module, char *mclass);
static void trace_scan( void *data);
static int trace_scan_bc( brow_tObject object, void *p);
......
......@@ -205,6 +205,23 @@ void GsdmlAttr::activate_cmd_ok()
attrnav->save( data_filename);
if ( save_cb) {
sts = (save_cb)( parent_ctx);
if ( EVEN(sts))
message( 'E', "Error saving profibus data");
else if ( close_cb)
(close_cb)( parent_ctx);
}
else if ( close_cb)
(close_cb)( parent_ctx);
}
void GsdmlAttr::activate_cmd_apply()
{
int sts;
attrnav->save( data_filename);
if ( save_cb) {
sts = (save_cb)( parent_ctx);
if ( EVEN(sts))
......
......@@ -81,6 +81,7 @@ class GsdmlAttr {
void activate_zoom_out();
void activate_zoom_reset();
void activate_cmd_ok();
void activate_cmd_apply();
void activate_cmd_ca();
void activate_collapse();
void activate_expand_all();
......
......@@ -26,6 +26,7 @@
#include <stdlib.h>
#include "co_cdh.h"
#include "co_dcli.h"
#include "co_time.h"
#include "cow_wow.h"
#include "flow.h"
......@@ -1668,6 +1669,80 @@ int GsdmlAttrNav::open( const char *filename)
return 1;
}
int GsdmlAttrNav::search_class( const char *filename, const char *model,
const char *module, char *mclass)
{
char line[200];
char itemv[2][200];
pwr_tFileName fname;
int num;
ifstream fp;
int in_model = 0;
int in_par = 0;
char lmodel[200];
char lmodule[200];
dcli_trim( lmodel, (char *)model);
dcli_trim( lmodule, (char *)module);
dcli_translate_filename( fname, filename);
fp.open( fname);
if ( !fp)
return 0;
while ( fp.getline( line, sizeof(line)) ) {
if ( line[0] == '#')
continue;
num = dcli_parse( line, " ", "",
(char *) itemv, sizeof( itemv)/sizeof( itemv[0]),
sizeof( itemv[0]), 0);
if ( num < 1)
continue;
dcli_trim( itemv[0], itemv[0]);
if ( num >= 2)
dcli_trim( itemv[1], itemv[1]);
if ( cdh_NoCaseStrcmp( itemv[0], "Device") == 0) {
if ( num < 2)
continue;
if ( in_model)
return 0;
if ( cdh_NoCaseStrcmp( itemv[1], lmodel) == 0)
in_model = 1;
}
if ( in_model) {
if ( strcmp( itemv[0], "{") == 0)
in_par = 1;
}
if ( in_par) {
if ( num < 2)
continue;
if ( strcmp( itemv[0], "}") == 0)
break;
if ( strcmp( itemv[1], "-") == 0 || strcmp( itemv[1], "") == 0)
continue;
if ( cdh_NoCaseStrcmp( itemv[0], lmodule) == 0) {
strncpy( mclass, itemv[1], sizeof( pwr_tObjName));
fp.close();
return 1;
}
}
}
fp.close();
return 0;
}
ItemPnBase::ItemPnBase( GsdmlAttrNav *attrnav, const char *item_name, const char *attr,
int attr_type, int attr_size, double attr_min_limit,
double attr_max_limit, void *attr_value_p, int attr_noedit,
......@@ -2989,6 +3064,41 @@ int ItemPnModuleType::scan( GsdmlAttrNav *attrnav, void *p)
brow_SelectClear( attrnav->brow->ctx);
brow_SetInverse( parentnode, 1);
brow_SelectInsert( attrnav->brow->ctx, parentnode);
brow_CenterObject( attrnav->brow->ctx, parentnode, 0.25);
// Search for a default module class
char devname[200];
pwr_tObjName mclass;
pwr_tCid mcid = 0;
brow_tObject next;
pwr_tCid *datap;
strncpy( devname, (char *)attrnav->gsdml->ApplicationProcess->DeviceAccessPointList->
DeviceAccessPointItem[attrnav->device_num-1]->ModuleInfo->Body.Name.p,
sizeof(devname));
sts = attrnav->search_class( pn_cModuleClassFile, devname, buf, mclass);
if ( ODD(sts)) {
for ( int i = 0; attrnav->gsdml->module_classlist[i].cid; i++) {
if ( cdh_NoCaseStrcmp( mclass, attrnav->gsdml->module_classlist[i].name) == 0) {
mcid = attrnav->gsdml->module_classlist[i].cid;
break;
}
}
}
sts = brow_GetNext( attrnav->brow->ctx, parentnode, &next);
if ( ODD(sts))
sts = brow_GetNext( attrnav->brow->ctx, next, &next);
if ( ODD(sts)) {
ItemPn *item;
brow_GetUserData( next, (void **)&item);
if ( item->type == attrnav_eItemType_PnModuleClass) {
brow_GetTraceData( next, (void **)&datap);
*datap = mcid;
}
}
}
else
first_scan = 0;
......
......@@ -58,6 +58,8 @@ extern "C" {
#include "rt_pn_gsdml_data.h"
#endif
#define pn_cModuleClassFile "$pwr_exe/pn_module_classes.dat"
typedef enum {
attrnav_eItemType_PnBase,
attrnav_eItemType_PnEnumValue,
......@@ -181,6 +183,8 @@ class GsdmlAttrNav {
void expand_all();
void redraw();
void set_viewio( int set) { viewio = set;}
int search_class( const char *filename, const char *model,
const char *module, char *mclass);
static void trace_scan( void *data);
static int trace_scan_bc( brow_tObject object, void *p);
......
......@@ -115,6 +115,7 @@ int pndevice_save_cb( void *sctx)
pwr_tOName name;
int size;
pwr_tOid oid;
pwr_tStatus rsts = PB__SUCCESS;
// Syntax check
if ( ctx->attr->attrnav->device_num == 0) {
......@@ -130,6 +131,7 @@ int pndevice_save_cb( void *sctx)
sprintf( msg, "Slot %d", i);
MsgWindow::message( 'E', "Module type not selected, ", msg);
rsts = PB__MODULETYPE;
}
if ( ctx->attr->attrnav->dev_data.slot_data[i]->module_class == 0 &&
ctx->attr->attrnav->dev_data.slot_data[i]->module_enum_number != 0) {
......@@ -138,6 +140,7 @@ int pndevice_save_cb( void *sctx)
sprintf( msg, "Slot %d", i);
MsgWindow::message( 'E', "Module class not selected, ", msg);
rsts = PB__MODULECLASS;
}
}
......@@ -397,7 +400,7 @@ int pndevice_save_cb( void *sctx)
}
}
}
sts = PWRB__SUCCESS;
sts = rsts;
return_now:
((WNav *)ctx->editor_ctx)->reset_nodraw();
......
......@@ -47,6 +47,8 @@ gsdmlfile <Unable to open GSDML file> /error
nodevice <No device selected> /error
createchan <Unable to create channel> /error
gsdmlfilemismatch <Gsdmlfile doesn't match original filename> /error
moduleclass <No module class selected> /error
moduletype <No module type selected> /error
.end
......@@ -489,6 +489,11 @@ void brow_SetTraceData( brow_tObject object, void *trace_data)
((FlowNode *)object)->set_trace_data( trace_data);
}
void brow_GetTraceData( brow_tObject object, void **trace_data)
{
((FlowNode *)object)->get_trace_data( trace_data);
}
extern "C" int brow_TraceInit( brow_tCtx ctx, int (*trace_connect_func)( brow_tObject,
char *, char *, flow_eTraceType, void **),
int (*trace_disconnect_func)( brow_tObject),
......
......@@ -173,6 +173,7 @@ void brow_SetTraceAttr( brow_tObject object, const char *trace_object,
void brow_GetTraceAttr( brow_tObject object, char *trace_object,
char *trace_attribute, flow_eTraceType *trace_attr_type);
void brow_SetTraceData( brow_tObject object, void *trace_data);
void brow_GetTraceData( brow_tObject object, void **trace_data);
int brow_TraceInit( brow_tCtx ctx, int (*trace_connect_func)( brow_tObject,
char *, char *, flow_eTraceType, void **),
int (*trace_disconnect_func)( brow_tObject),
......
......@@ -142,6 +142,7 @@ class FlowNode : public FlowArrayElem {
void set_trace_attr( const char *object, const char *attribute, flow_eTraceType type, int inverted);
void get_trace_attr( char *object, char *attribute, flow_eTraceType *type, int *inverted);
void set_trace_data( void *data) { trace_p = data;};
void get_trace_data( void **data) { *data = trace_p;};
void trace_scan();
int trace_init();
void trace_close();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment