I don't think we should have a default for the packing in this case. I think the packing type should be provided, like I need 'i' I will provide 'i' and if someone else wants 'I' then it should be provided. Although the number of bytes of b and B are the same, but it should be up to the developer to provide which of they want. Also, for safety we should add the '<' to make sure the little endianness is definitely enforced. For instance it is '<i" and not just 'i'.
I think we need some re-start code like this for bolus in SelfTests.c for when a recoverable alarm occurs during wet self-tests (stops pump) and user chooses to resume (pump should restart if bolus not finished).
Separate functions have been created to keep the string representations clearer. It is not safe to use something like "b" or "B" since anyone can even but something like "hello" which probably doesn't mean anything and is an error. to overcome this flow the different functions implemented here have to be used.
Also since the intention of the function here is clear the length has been calculated regarding the type conversion in each function. which helps have a lot of clearer code. Please refer to the usage in: d9b45e5b52db2540a79cbc8795d82dda4fd3984b on dialin develop branch.