Directory Messages

Directory message types 

There are two directory messages types: DIR and DIRALL.

  •  DIR is the original type, and responds with multiple messages,
    • one per directory element, plus one final empty message (except flags below) to mark end
    • lower latency, the elements start returning immediately, even while the BUS discovery is progressing.
    • smaller memory usage (single element of maximum PATHLEN size (2048 bytes)
    • generates much more traffic
    • supported on all version of owserver
  • DIRALL newer type,
    • Full directory returned, as comma-separated list
    • Requires full read of directory before responding
    • Long directory discovery may need "keep-alive" interim messages
    • Potentially large message (unbounded)

Supported types

  • DIR supported in ALL owserver versions
  • DIRALL supported in all version since 2.4 or so
  • owlib-based programs (owfs, owserver, owhttpd, ...) use DIR as clients to reduce latency
  • OWNET-based clients (, ...) tend to use DIRALL by default, and DIR as fallback.


The final message (or the only message for DIRALL) will return some flags in the OFFSET field:

	/* supports RESUME command */
#define DEV_resume 0x0001
/* can trigger an alarm */
#define DEV_alarm 0x0002
/* support OVERDRIVE */
#define DEV_ovdr 0x0004
/* responds to simultaneous temperature convert 0x44 */
#define DEV_temp 0x8000
/* responds to simultaneous voltage convert 0x3C */
#define DEV_volt 0x4000
/* supports CHAIN command */
#define DEV_chain 0x2000 

 This will be the logical OR of all the directotry elements flags.

The purpose is to allow display of alarm, simultaneous or chain directories only if some device actually supports them. 

Previous page: owlib client persistence
Next page: Size