let isotp_config = IsoTPConfig::default()
.tx(Identifier::Standard(0x7a1))
.padding(config.padding)
.fd(config.fd)
.ext_address(config.ext_address)
.max_dlen(config.max_dlen);
Maybe use separate builder type containing the offset? This would mean you always have to call .build() to finish the type. Now you could try setting the offset before the tx id, or the rx id before the tx id, and it would't work. E.g. the following fails silently:
let isotp_config = IsoTPConfig::default()
.offset(8)
.tx(Identifier::Standard(0x7a1))
or
let isotp_config = IsoTPConfig::default()
.rx(Identifier::Standard(0x123))
.tx(Identifier::Standard(0x7a1))
Before:
After:
Maybe use separate builder type containing the offset? This would mean you always have to call
.build()
to finish the type. Now you could try setting the offset before the tx id, or the rx id before the tx id, and it would't work. E.g. the following fails silently:or