Added comments to create Doxygen Modules for some of the DM BIBBs (DCC, Who-Is, RD) so far.
This commit is contained in:
@@ -42,6 +42,9 @@
|
||||
|
||||
static char My_Password[32] = "filister";
|
||||
|
||||
/** Sets (non-volatile hold) the password to be used for DCC requests.
|
||||
* @param new_password [in] The new DCC password, of up to 31 characters.
|
||||
*/
|
||||
void handler_dcc_password_set(
|
||||
char *new_password)
|
||||
{
|
||||
@@ -62,6 +65,26 @@ void handler_dcc_password_set(
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/** Handler for a Device Communication Control (DCC) request.
|
||||
* @ingroup DMDCC
|
||||
* This handler will be invoked by apdu_handler() if it has been enabled
|
||||
* by a call to apdu_set_confirmed_handler().
|
||||
* This handler builds a response packet, which is
|
||||
* - an Abort if
|
||||
* - the message is segmented
|
||||
* - if decoding fails
|
||||
* - if not a known DCC state
|
||||
* - an Error if the DCC password is incorrect
|
||||
* - else tries to send a simple ACK for the DCC on success,
|
||||
* and sets the DCC state requested.
|
||||
*
|
||||
* @param service_request [in] The contents of the service request.
|
||||
* @param service_len [in] The length of the service_request.
|
||||
* @param src [in] BACNET_ADDRESS of the source of the message
|
||||
* @param service_data [in] The BACNET_CONFIRMED_SERVICE_DATA information
|
||||
* decoded from the APDU header of this message.
|
||||
*/
|
||||
void handler_device_communication_control(
|
||||
uint8_t * service_request,
|
||||
uint16_t service_len,
|
||||
|
||||
@@ -34,6 +34,13 @@
|
||||
|
||||
/** @file h_iam.c Handles I-Am requests. */
|
||||
|
||||
/** Handler for I-Am responses.
|
||||
* Will add the responder to our cache, or update its binding.
|
||||
* @ingroup DMDDB
|
||||
* @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_am_add(
|
||||
uint8_t * service_request,
|
||||
uint16_t service_len,
|
||||
@@ -68,6 +75,14 @@ void handler_i_am_add(
|
||||
return;
|
||||
}
|
||||
|
||||
/** Handler for I-Am responses (older binding-update-only version).
|
||||
* Will update the responder's binding, but if already in our cache.
|
||||
* @note This handler is deprecated, in favor of handler_i_am_add().
|
||||
*
|
||||
* @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_am_bind(
|
||||
uint8_t * service_request,
|
||||
uint16_t service_len,
|
||||
|
||||
@@ -42,6 +42,26 @@
|
||||
|
||||
/** @file h_rd.c Handles Reinitialize Device requests. */
|
||||
|
||||
/** Handler for a Reinitialize Device (RD) request.
|
||||
* @ingroup DMRD
|
||||
* This handler will be invoked by apdu_handler() if it has been enabled
|
||||
* by a call to apdu_set_confirmed_handler().
|
||||
* This handler builds a response packet, which is
|
||||
* - an Abort if
|
||||
* - the message is segmented
|
||||
* - if decoding fails
|
||||
* - an Error if
|
||||
* - the RD password is incorrect
|
||||
* - the Reinitialize Device operation fails
|
||||
* - a Reject if the request state is invalid
|
||||
* - else tries to send a simple ACK for the RD on success.
|
||||
*
|
||||
* @param service_request [in] The contents of the service request.
|
||||
* @param service_len [in] The length of the service_request.
|
||||
* @param src [in] BACNET_ADDRESS of the source of the message
|
||||
* @param service_data [in] The BACNET_CONFIRMED_SERVICE_DATA information
|
||||
* decoded from the APDU header of this message.
|
||||
*/
|
||||
void handler_reinitialize_device(
|
||||
uint8_t * service_request,
|
||||
uint16_t service_len,
|
||||
|
||||
@@ -39,7 +39,8 @@
|
||||
|
||||
/** @file h_whois.c Handles Who-Is requests. */
|
||||
|
||||
/** Handler for Who-Is requests.
|
||||
/** Handler for Who-Is requests, with broadcast I-Am response.
|
||||
* @ingroup DMDDB
|
||||
* @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.
|
||||
@@ -73,7 +74,8 @@ void handler_who_is(
|
||||
return;
|
||||
}
|
||||
|
||||
/** Handler for Who-Is requests - Unicast (per Addendum 135-2004q).
|
||||
/** Handler for Who-Is requests, with Unicast I-Am response (per Addendum 135-2004q).
|
||||
* @ingroup DMDDB
|
||||
* @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.
|
||||
|
||||
@@ -44,6 +44,17 @@
|
||||
|
||||
/** @file s_dcc.c Send a Device Communication Control (DCC) request. */
|
||||
|
||||
/** Sends a Device Communication Control (DCC) request.
|
||||
* @ingroup DMDCC
|
||||
*
|
||||
* @param device_id [in] The index to the device address in our address cache.
|
||||
* @param timeDuration [in] If non-zero, the minutes that the remote device
|
||||
* shall ignore all APDUs except DCC and, if supported, RD APDUs.
|
||||
* @param state [in] Choice to Enable or Disable communication.
|
||||
* @param password [in] Optional password, up to 20 chars.
|
||||
* @return The invokeID of the transmitted message, or 0 on failure.
|
||||
*/
|
||||
|
||||
uint8_t Send_Device_Communication_Control_Request(
|
||||
uint32_t device_id,
|
||||
uint16_t timeDuration, /* 0=optional */
|
||||
|
||||
@@ -70,6 +70,8 @@ int iam_encode_pdu(
|
||||
}
|
||||
|
||||
/** Broadcast an I Am message.
|
||||
* @ingroup DMDDB
|
||||
*
|
||||
* @param buffer [in] The buffer to use for building and sending the message.
|
||||
*/
|
||||
void Send_I_Am(
|
||||
@@ -104,10 +106,10 @@ void Send_I_Am(
|
||||
}
|
||||
|
||||
/** Encode an I Am message to be unicast directly back to the src.
|
||||
* If the src address is not given, the dest address will be
|
||||
* a broadcast address.
|
||||
*
|
||||
* @param buffer [in,out] The buffer to use for building the message.
|
||||
* @param src [in] The source address information.
|
||||
* @param src [in] The source address information. If the src address is not
|
||||
* given, the dest address will be a broadcast address.
|
||||
* @param dest [out] The destination address information.
|
||||
* @param npdu_data [out] The NPDU structure describing the message.
|
||||
* @return The length of the message in buffer[].
|
||||
@@ -139,10 +141,12 @@ int iam_unicast_encode_pdu(
|
||||
}
|
||||
|
||||
/** Send an I-Am message by unicasting directly back to the src.
|
||||
* @ingroup DMDDB
|
||||
* @note As of Addendum 135-2008q-1, unicast responses are allowed;
|
||||
* in modern firewalled corporate networks, this may be the
|
||||
* only type of response that will reach the source on
|
||||
* another subnet (without using the BBMD).
|
||||
* another subnet (without using the BBMD). <br>
|
||||
* However, some BACnet routers may not correctly handle this message.
|
||||
*
|
||||
* @param buffer [in] The buffer to use for building and sending the message.
|
||||
* @param src [in] The source address information from service handler.
|
||||
|
||||
@@ -45,6 +45,14 @@
|
||||
|
||||
/** @file s_rd.c Send a Reinitialize Device request. */
|
||||
|
||||
/** Sends a Reinitialize Device (RD) request.
|
||||
* @ingroup DMRD
|
||||
*
|
||||
* @param device_id [in] The index to the device address in our address cache.
|
||||
* @param state [in] Specifies the desired state of the device after reinitialization.
|
||||
* @param password [in] Optional password, up to 20 chars.
|
||||
* @return The invokeID of the transmitted message, or 0 on failure.
|
||||
*/
|
||||
uint8_t Send_Reinitialize_Device_Request(
|
||||
uint32_t device_id,
|
||||
BACNET_REINITIALIZED_STATE state,
|
||||
|
||||
@@ -45,7 +45,15 @@
|
||||
|
||||
/** @file s_whois.c Send a Who-Is request. */
|
||||
|
||||
/* find a specific device, or use -1 for limit if you want unlimited */
|
||||
/** Send a Who-Is request for a specific device, a range, or any device.
|
||||
* @ingroup DMDDB
|
||||
* If low_limit and high_limit both are -1, then the 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.
|
||||
* @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
|
||||
*/
|
||||
void Send_WhoIs(
|
||||
int32_t low_limit,
|
||||
int32_t high_limit)
|
||||
|
||||
Reference in New Issue
Block a user