184 The string that should be added on C code - if everything goes allright |
184 The string that should be added on C code - if everything goes allright |
185 """ |
185 """ |
186 |
186 |
187 req_init_template = '''/*request %(locreqstr)s*/ |
187 req_init_template = '''/*request %(locreqstr)s*/ |
188 {"%(locreqstr)s", %(nodeid)s, %(slaveid)s, %(iotype)s, %(func_nr)s, %(address)s , %(count)s, |
188 {"%(locreqstr)s", %(nodeid)s, %(slaveid)s, %(iotype)s, %(func_nr)s, %(address)s , %(count)s, |
189 DEF_REQ_SEND_RETRIES, 0 /* error_code */, 0 /* prev_code */, {%(timeout_s)d, %(timeout_ns)d} /* timeout */, %(write_on_change)d /* write_on_change */, |
189 DEF_REQ_SEND_RETRIES, 0 /* mb_error_code */, 0 /* tn_error_code */, 0 /* prev_code */, {%(timeout_s)d, %(timeout_ns)d} /* timeout */, %(write_on_change)d /* write_on_change */, |
190 {%(buffer)s}, {%(buffer)s}}''' |
190 {%(buffer)s}, {%(buffer)s}}''' |
191 |
191 |
192 timeout = int(GetCTVal(child, 4)) |
192 timeout = int(GetCTVal(child, 4)) |
193 timeout_s = timeout // 1000 |
193 timeout_s = timeout // 1000 |
194 timeout_ms = timeout - (timeout_s * 1000) |
194 timeout_ms = timeout - (timeout_s * 1000) |