# Test List

Member TMR_bytesToHex (const uint8_t *bytes, uint32_t size, char *hex)
  If size is 0, *hex should point to an empty string.

Member TMR_connect (struct TMR_Reader *reader)

  Connecting to existing reader should succeed.

  Connecting to nonexisting reader should fail.

Member TMR_create (TMR_Reader *reader, const char *deviceUri)

  Call with valid URI should not fail.

  Call with invalid URI should fail.

Member TMR_create_alloc (TMR_Reader **readerPointer, const char *deviceUri)

  Call with valid URI should not fail.

  Call with invalid URI should fail.

  Multiple calls with different URIs should return distinct objects.

Member TMR_destroy (TMR_Reader *reader)

  Destroying existing connected reader should succed.

  Destroying existing unconnected reader should succeed.

  Destroying already-destroyed reader should fail.

  Destroying reader allocated by TMR_create_alloc() should free the allocated memory.

Member TMR_getNextTag (TMR_Reader *reader, TMR_TagReadData *tagData)

  Call should fail before a read() call.

  Call should fail after a read() call that set *tagCount to zero.

  Call should fill in a tag after a read() call that set *tagCount to a nonzero value.

  Call should succeed exactly as many times as specified by *tagCount.

Member TMR_hasMoreTags (TMR_Reader *reader)

  Call should return false before a read() call.

  Call should return false after a read() call that set *tagCount to zero.

  Call should return true after a read() call that set *tagCount to a nonzero value.

  Call should return true through exactly as many getNextTag() calls as specified by *tagCount.

Member TMR_hexToBytes (const char *hex, uint8_t *bytes, uint32_t size, uint32_t *convertLen)

  If hex string is empty, *bytes should not be altered.

  *convertLen is set to the correct value.

  Function works when convertLen is `NULL`.

  Specific values: `"00"`, `"0000"`, `"ffff"`, `"0xffff"`, `"00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899aabb"`.

Member TMR_paramGet (struct TMR_Reader *reader, TMR_Param key, void *value)

  Call should fail if key is an invalid parameter name.

  Call should fail if key is valid but unsupported by connected reader.

  Call should succeed if key matches parameter name, independent of case.

Member TMR_paramSet (struct TMR_Reader *reader, TMR_Param key, const void *value)

  Call should fail if key is an invalid parameter name.

  Call should fail if key is valid but unsupported by connected reader.

  Call should succeed if key matches parameter name, independent of case.

Member TMR_read (TMR_Reader *reader, uint32_t timeoutMs, int32_t *tagCount)

  Call should fail if reader is not connected.

  If call is successful as per TMR_Error, *tagCount should be modified and contain a positive value.

Member TMR_readIntoArray (struct TMR_Reader *reader, uint32_t timeoutMs, int32_t *tagCount, TMR_TagReadData *result[])

  Call should fail if reader is not connected.

  If call is successful as per TMR_Error, *tagCount should be modified and contain a positive value, and *result should be modified and contain the corresponding number of tag read values.

Member TMR_writeTag (TMR_Reader *reader, const TMR_TagFilter *target, TMR_TagData *data)

  Call should fail if reader is not connected.

  Upon success, a subsequent TMR_read() should find the new tag ID.