scsi_command: add a add_result_to_dict function

Add a new add_result_to_dict function so we can add to any dict, not just
self.result.
Change add_result to call add_result_to_dict and pass self.result to it.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
scsi_command: make the check_dict argument to decode_bits mandatory

Remove the default value for the check_dict argument to decode_bits
since it makes no sense to have this as an optional argument.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
scsi_command: add a decode_bits_into_dict function

Add a decode function that can decode bits and store into an arbitrary
dict, not just self.result

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
Add initial READELEMENTSTATUS support

Add initial support for ReadElementStatus for element types
STORAGE and DATA_TRANSFER

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
Add a TOOLS directory for example code and put mtx.py there

Add a dedicated directory for examples (which are NOT part of the build)
and add an initial MTX.PY command there.
This MTX.PY command is very incomplete and only supports the ststus command.

mtx.py -f /dev/changer status

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
Merge pull request #31 from sahlberg/readelementstatus-2

Readelementstatus 2