libraw1394: version 2.0.4
Prev | Chapter 3. Data Structures and Program Flow | Next

# 3.7. Error and Success Codes

libraw1394 returns the ack/rcode pair in most transaction cases. The rcode is undefined in cases where the ack code is not equal to `ack_pending`. This is stored in a type raw1394_errcode_t, from which the ack and rcode parts can be extracted using two macros.

With the function `raw1394_errcode_to_errno()` it is possible to convert this to an errno number that conveys roughly the same meaning. Many developers will find that easier to handle. This is done automatically for the synchronous read/write/lock wrapper functions, i.e. they return 0 for success and a negative value for failure, in which case they also set the `errno` variable to the appropriate code. The raw ack/rcode pair can then still be retrieved using `raw1394_get_errcode()`.

Prev | Home | Next
Generation Numbers | Up | Isochronous Transmission and Reception