/* Ignore given number of bytes and then write an negative UDS response on the output channel. */
static int ignore_and_write_negative_response(struct upgrade_uds_t *self_p, size_t length, uint8_t service_id, uint8_t code)
/* Ignore given number of bytes and then write an negative UDS response on the output channel. */
static int ignore_and_write_negative_response(struct upgrade_uds_t *self_p, size_t length, uint8_t service_id, uint8_t code)
{
    ignore(self_p, length);
    write_response(self_p, 2, 0x7f);
    chan_write(self_p->chout_p, &service_id, 1);
    chan_write(self_p->chout_p, &code, 1);
    return (0);
}