次へ: Type Constructors
上へ: Data Type Encoding
戻る: Data Type Encoding
目次
索引
The four primitive types of the SANE standard are encoded as follows:
- SANE_Byte:
- A byte is encoded as an 8 bit value.
Since the transport protocol is assumed to be byte-orientd, the bit
order is irrelevant.
- SANE_Word:
- A word is encoded as 4 bytes (32
bits). The bytes are ordered from most-significant to
least-significant byte (big-endian byte-order).
- SANE_Char:
- A character is currently encoded as an 8-bit
ISO LATIN-1 value. An extension to support wider character sets (16 or 32
bits) is planned for the future, but not supported at this point.
- SANE_String:
- A string pointer is encoded as a
SANE_Char array. The trailing NUL byte is considered part
of the array and a NULL pointer is encoded as a zero-length
array.
- SANE_Handle:
- A handle is encoded like a word.
The network backend needs to take care of converting these integer
values to the opaque pointer values that are presented to the user
of the network backend. Similarly, the SANE daemon needs to take
care of converting the opaque pointer values it receives from its
backends into 32-bit integers suitable for use for network encoding.
- enumeration types:
- Enumeration types are encoded
like words.
次へ: Type Constructors
上へ: Data Type Encoding
戻る: Data Type Encoding
目次
索引
MATSUBAYASHI 'Shaolin' Kohji
平成14年10月29日