diff --git a/bacnet-stack/demo/handler/h_ihave.c b/bacnet-stack/demo/handler/h_ihave.c index b11638dd..27b099d7 100644 --- a/bacnet-stack/demo/handler/h_ihave.c +++ b/bacnet-stack/demo/handler/h_ihave.c @@ -34,6 +34,12 @@ /** @file h_ihave.c Handles incoming I-Have messages. */ +/** Simple Handler for I-Have responses (just validates response). + * @ingroup DMDOB + * @param service_request [in] The received message to be handled. + * @param service_len [in] Length of the service_request message. + * @param src [in] The BACNET_ADDRESS of the message's source. + */ void handler_i_have( uint8_t * service_request, uint16_t service_len, diff --git a/bacnet-stack/demo/handler/h_whohas.c b/bacnet-stack/demo/handler/h_whohas.c index 6b012ab1..4d0a01c6 100644 --- a/bacnet-stack/demo/handler/h_whohas.c +++ b/bacnet-stack/demo/handler/h_whohas.c @@ -37,6 +37,15 @@ /** @file h_whohas.c Handles Who-Has requests. */ +/** Handler for Who-Has requests, with broadcast I-Have response. + * Will respond if the device Object ID matches, and we have + * the Object or Object Name requested. + * + * @ingroup DMDOB + * @param service_request [in] The received message to be handled. + * @param service_len [in] Length of the service_request message. + * @param src [in] The BACNET_ADDRESS of the message's source. + */ void handler_who_has( uint8_t * service_request, uint16_t service_len, diff --git a/bacnet-stack/demo/handler/s_ihave.c b/bacnet-stack/demo/handler/s_ihave.c index 5147a9bc..efadd073 100644 --- a/bacnet-stack/demo/handler/s_ihave.c +++ b/bacnet-stack/demo/handler/s_ihave.c @@ -45,7 +45,14 @@ /** @file s_ihave.c Send an I-Have (property) message. */ -/* find a specific device, or use -1 for limit if you want unlimited */ +/** Broadcast an I Have message. + * @ingroup DMDOB + * + * @param device_id [in] My device ID. + * @param object_type [in] The BACNET_OBJECT_TYPE that I Have. + * @param object_instance [in] The Object ID that I Have. + * @param object_name [in] The Name of the Object I Have. + */ void Send_I_Have( uint32_t device_id, BACNET_OBJECT_TYPE object_type, diff --git a/bacnet-stack/demo/handler/s_whohas.c b/bacnet-stack/demo/handler/s_whohas.c index b095326e..6ac90078 100644 --- a/bacnet-stack/demo/handler/s_whohas.c +++ b/bacnet-stack/demo/handler/s_whohas.c @@ -45,7 +45,16 @@ /** @file s_whohas.c Send Who-Has requests. */ -/* find a specific device, or use -1 for limit if you want unlimited */ +/** Send a Who-Has request for a device which has a named Object. + * @ingroup DMDOB + * If low_limit and high_limit both are -1, then the device ID range is unlimited. + * If low_limit and high_limit have the same non-negative value, then only + * that device will respond. + * Otherwise, low_limit must be less than high_limit for a range. + * @param low_limit [in] Device Instance Low Range, 0 - 4,194,303 or -1 + * @param high_limit [in] Device Instance High Range, 0 - 4,194,303 or -1 + * @param object_name [in] The Name of the desired Object. + */ void Send_WhoHas_Name( int32_t low_limit, int32_t high_limit, @@ -85,7 +94,17 @@ void Send_WhoHas_Name( #endif } -/* find a specific device, or use -1 for limit if you want unlimited */ +/** Send a Who-Has request for a device which has a specific Object type and ID. + * @ingroup DMDOB + * If low_limit and high_limit both are -1, then the device ID range is unlimited. + * If low_limit and high_limit have the same non-negative value, then only + * that device will respond. + * Otherwise, low_limit must be less than high_limit for a range. + * @param low_limit [in] Device Instance Low Range, 0 - 4,194,303 or -1 + * @param high_limit [in] Device Instance High Range, 0 - 4,194,303 or -1 + * @param object_type [in] The BACNET_OBJECT_TYPE of the desired Object. + * @param object_instance [in] The ID of the desired Object. + */ void Send_WhoHas_Object( int32_t low_limit, int32_t high_limit, diff --git a/bacnet-stack/include/whohas.h b/bacnet-stack/include/whohas.h index 1ea54db6..e3fd6746 100644 --- a/bacnet-stack/include/whohas.h +++ b/bacnet-stack/include/whohas.h @@ -76,4 +76,18 @@ extern "C" { #ifdef __cplusplus } #endif /* __cplusplus */ + +/** @defgroup DMDOB Device Management-Dynamic Object Binding (DM-DOB) + * @ingroup RDMS + * 16.9 Who-Has and I-Have Services
+ * The Who-Has service is used by a sending BACnet-user to identify the device + * object identifiers and network addresses of other BACnet devices whose local + * databases contain an object with a given Object_Name or a given Object_Identifier. + * The I-Have service is used to respond to Who-Has service requests or to + * advertise the existence of an object with a given Object_Name or + * Object_Identifier. The I-Have service request may be issued at any time and + * does not need to be preceded by the receipt of a Who-Has service request. + * The Who-Has and I-Have services are unconfirmed services. + * + */ #endif