equal
deleted
inserted
replaced
902 # Now add the located variable in case it is a flag (condition (b) above |
902 # Now add the located variable in case it is a flag (condition (b) above |
903 if len(iecvar["LOC"]) >= 5: # condition (b) explained above |
903 if len(iecvar["LOC"]) >= 5: # condition (b) explained above |
904 if str(iecvar["NAME"]) not in loc_vars_list: |
904 if str(iecvar["NAME"]) not in loc_vars_list: |
905 # Add if it is a Execution Request Flag (mapped onto %QXa.b.c.0.0), so last number is a '0' |
905 # Add if it is a Execution Request Flag (mapped onto %QXa.b.c.0.0), so last number is a '0' |
906 if iecvar["LOC"][4] == 0: |
906 if iecvar["LOC"][4] == 0: |
907 loc_vars.append("u16 *" + str(iecvar["NAME"]) + " = &client_requests[%d].flag_exec_req;" % (client_requestid)) |
907 loc_vars.append("u8 *" + str(iecvar["NAME"]) + " = &client_requests[%d].flag_exec_req;" % (client_requestid)) |
908 loc_vars_list.append(str(iecvar["NAME"])) |
908 loc_vars_list.append(str(iecvar["NAME"])) |
909 # Add if it is a "Modbus Request Status flag" (mapped onto %QWa.b.c.0.1), so last number is a '1' |
909 # Add if it is a "Modbus Request Status flag" (mapped onto %QWa.b.c.0.1), so last number is a '1' |
910 if iecvar["LOC"][4] == 1: |
910 if iecvar["LOC"][4] == 1: |
911 loc_vars.append("u8 *" + str(iecvar["NAME"]) + " = &client_requests[%d].flag_tn_error_code;" % (client_requestid)) |
911 loc_vars.append("u8 *" + str(iecvar["NAME"]) + " = &client_requests[%d].flag_tn_error_code;" % (client_requestid)) |
912 loc_vars_list.append(str(iecvar["NAME"])) |
912 loc_vars_list.append(str(iecvar["NAME"])) |
956 # Now add the located variable in case it is a flag (condition (b) above |
956 # Now add the located variable in case it is a flag (condition (b) above |
957 if len(iecvar["LOC"]) >= 5: # condition (b) explained above |
957 if len(iecvar["LOC"]) >= 5: # condition (b) explained above |
958 if str(iecvar["NAME"]) not in loc_vars_list: |
958 if str(iecvar["NAME"]) not in loc_vars_list: |
959 # Add if it is a Execution Request Flag (mapped onto %QXa.b.c.0.0), so last number is a '0' |
959 # Add if it is a Execution Request Flag (mapped onto %QXa.b.c.0.0), so last number is a '0' |
960 if iecvar["LOC"][4] == 0: |
960 if iecvar["LOC"][4] == 0: |
961 loc_vars.append("u16 *" + str(iecvar["NAME"]) + " = &client_requests[%d].flag_exec_req;" % (client_requestid)) |
961 loc_vars.append("u8 *" + str(iecvar["NAME"]) + " = &client_requests[%d].flag_exec_req;" % (client_requestid)) |
962 loc_vars_list.append(str(iecvar["NAME"])) |
962 loc_vars_list.append(str(iecvar["NAME"])) |
963 # Add if it is a "Modbus Request Status flag" (mapped onto %QWa.b.c.0.1), so last number is a '1' |
963 # Add if it is a "Modbus Request Status flag" (mapped onto %QWa.b.c.0.1), so last number is a '1' |
964 if iecvar["LOC"][4] == 1: |
964 if iecvar["LOC"][4] == 1: |
965 loc_vars.append("u8 *" + str(iecvar["NAME"]) + " = &client_requests[%d].flag_tn_error_code;" % (client_requestid)) |
965 loc_vars.append("u8 *" + str(iecvar["NAME"]) + " = &client_requests[%d].flag_tn_error_code;" % (client_requestid)) |
966 loc_vars_list.append(str(iecvar["NAME"])) |
966 loc_vars_list.append(str(iecvar["NAME"])) |