Added some function documentation and a little more support for Structured Views.

This commit is contained in:
tbrennan3
2010-04-15 20:45:22 +00:00
parent f9d900fdca
commit c5977b8933
8 changed files with 76 additions and 72 deletions
+13 -4
View File
@@ -25,6 +25,7 @@
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <assert.h>
#include "config.h"
#include "config.h"
#include "txbuf.h"
@@ -44,11 +45,18 @@
/** @file h_rpm_a.c Handles Read Property Multiple Acknowledgments. */
/* returns the number of bytes decoded, or -1 on error */
/* note: initial the linked list of read_access_data */
static int rpm_ack_decode_service_request(
/** Decode the received RPM data and make a linked list of the results.
* @ingroup DSRPM
*
* @param apdu [in] The received apdu data.
* @param apdu_len [in] Total length of the apdu.
* @param read_access_data [out] Pointer to the head of the linked list
* where the RPM data is to be stored.
* @return The number of bytes decoded, or -1 on error
*/
int rpm_ack_decode_service_request(
uint8_t * apdu,
int apdu_len, /* total length of the apdu */
int apdu_len,
BACNET_READ_ACCESS_DATA * read_access_data)
{
int decoded_len = 0; /* return value */
@@ -63,6 +71,7 @@ static int rpm_ack_decode_service_request(
BACNET_APPLICATION_DATA_VALUE *value;
BACNET_APPLICATION_DATA_VALUE *old_value;
assert( read_access_data != NULL );
rpm_object = read_access_data;
old_rpm_object = rpm_object;
while (rpm_object && apdu_len) {
+15 -2
View File
@@ -826,8 +826,11 @@ void Device_Inc_Database_Revision(
Database_Revision++;
}
/* Since many network clients depend on the object list */
/* for discovery, it must be consistent! */
/** Get the total count of objects supported by this Device Object.
* @note Since many network clients depend on the object list
* for discovery, it must be consistent!
* @return The count of objects, for all supported Object types.
*/
unsigned Device_Object_List_Count(
void)
{
@@ -846,6 +849,16 @@ unsigned Device_Object_List_Count(
return count;
}
/** Lookup the Object at the given array index in the Device's Object List.
* Even though we don't keep a single linear array of objects in the Device,
* this method acts as though we do and works through a virtual, concatenated
* array of all of our object type arrays.
*
* @param array_index [in] The desired array index (1 to N)
* @param object_type [out] The object's type, if found.
* @param instance [out] The object's instance number, if found.
* @return True if found, else false.
*/
bool Device_Object_List_Identifier(
unsigned array_index,
int *object_type,
+5 -62
View File
@@ -40,68 +40,11 @@
/** @defgroup ServerDemo Demo of a BACnet Server (Device)
* @ingroup Demos
* This is a basic demonstration of a simple BACnet Device consisting of
* the services and properties shown in its PICS (output provided by
* the demo/epics/epics program):
* @verbatim
List of Objects in test device:
{
object-identifier: (Device, 1234)
object-name: "SimpleServer"
object-type: Device
system-status: operational
vendor-name: "BACnet Stack at SourceForge"
vendor-identifier: 260
model-name: "GNU"
firmware-version: "0.5.5"
application-software-version: "1.0"
protocol-version: 1
protocol-revision: 5
protocol-services-supported: {
false,false,false,false, # ,,,,
false, true, true, true, # , Subscribe-COV, Atomic-Read-File, Atomic-Write-File,
false,false,false,false, # ,,,,
true,false, true, true, # Read-Property,, Read-Property-Multiple, Write-Property,
false, true,false,false, # , Device-Communication-Control,,,
true,false,false,false, # Reinitialize-Device,,,,
false,false,false,false, # ,,,,
true,false,false,false, # COV-Notification,,,,
true, true, true,false, # Time-Synchronization, Who-Has, Who-Is,,
true,false,false,false # UTC-Time-Synchronization,,,,
}
protocol-object-types-supported: {
true, true, true, true, # Analog Input, Analog Output, Analog Value, Binary Input,
true, true,false,false, # Binary Output, Binary Value,,,
true,false, true,false, # Device,, File,,
false, true, true,false, # , Multi-State Input, Multi-State Output,,
false,false,false,false, # ,,,,
true, true,false,false, # Trendlog, Life Safety Point,,,
false,false,false,false, # ,,,,
true,false,false,false, # Load-Control,,,,
false,false,false,false, # ,,,,
false,false # ,,
}
object-list: {(Device, 1234),(Analog Input, 0),(Analog Input, 1),
(Analog Input, 2),(Analog Input, 3),(Analog Output, 0),(Analog Output, 1),
(Analog Output, 2),(Analog Output, 3),(Analog Value, 0),(Analog Value, 1),
(Analog Value, 2),(Analog Value, 3),(Binary Input, 0),(Binary Input, 1),
(Binary Input, 2),(Binary Input, 3),(Binary Input, 4),(Binary Output, 0),
(Binary Output, 1),(Binary Output, 2),(Binary Output, 3),(Binary Value, 0),
(Binary Value, 1),(Binary Value, 2),(Binary Value, 3),(Binary Value, 4),
(Binary Value, 5),(Binary Value, 6),(Binary Value, 7),(Binary Value, 8),
(Binary Value, 9),(Life Safety Point, 0),(Life Safety Point, 1),(Life Safety Point, 2),
(Life Safety Point, 3),(Life Safety Point, 4),(Life Safety Point, 5),(Life Safety Point, 6),
(Load-Control, 0),(Load-Control, 1),(Load-Control, 2),(Load-Control, 3),
(Multi-State Output, 0),(Multi-State Output, 1),(Multi-State Output, 2),(Multi-State Output, 3),
(Multi-State Input, 0),(Trendlog, 0),(Trendlog, 1),(Trendlog, 2),
(Trendlog, 3),(Trendlog, 4),(Trendlog, 5),(Trendlog, 6),
(Trendlog, 7),(File, 0),(File, 1),(File, 2)}
max-apdu-length-accepted: 1476
segmentation-supported: no-segmentation
apdu-timeout: 3000
number-of-APDU-retries: 3
device-address-binding: Null
database-revision: 1
} @endverbatim
* the services and properties shown in its EPICS
* (see file demo/server/epics_vts3.tpi)
*/
/** @file server/epics_vts3.tpi EPICS file for the example server
* that can be loaded into VTS3 */
#endif /* SERVER_H_ */