Moved constants defining the number of each object back into the source files for the demo objects since the header files are currently common to all.

This commit is contained in:
skarg
2010-02-11 23:14:53 +00:00
parent f10629260e
commit d7ec61eb21
27 changed files with 62 additions and 42 deletions
+3
View File
@@ -34,6 +34,9 @@
#include "config.h" /* the custom stuff */
#include "ai.h"
#ifndef MAX_ANALOG_INPUTS
#define MAX_ANALOG_INPUTS 4
#endif
static float Present_Value[MAX_ANALOG_INPUTS];
+4
View File
@@ -37,6 +37,10 @@
#include "ao.h"
#include "handlers.h"
#ifndef MAX_ANALOG_OUTPUTS
#define MAX_ANALOG_OUTPUTS 4
#endif
/* we choose to have a NULL level in our system represented by */
/* a particular value. When the priorities are not in use, they */
/* will be relinquished (i.e. set to the NULL level). */
+4
View File
@@ -37,6 +37,10 @@
#include "av.h"
#include "handlers.h"
#ifndef MAX_ANALOG_VALUES
#define MAX_ANALOG_VALUES 4
#endif
/* we choose to have a NULL level in our system represented by */
/* a particular value. When the priorities are not in use, they */
/* will be relinquished (i.e. set to the NULL level). */
+4
View File
@@ -39,6 +39,10 @@
#include "bi.h"
#include "handlers.h"
#ifndef MAX_BINARY_INPUTS
#define MAX_BINARY_INPUTS 5
#endif
/* stores the current value */
static BACNET_BINARY_PV Present_Value[MAX_BINARY_INPUTS];
/* out of service decouples physical input from Present_Value */
+4
View File
@@ -38,6 +38,10 @@
#include "bo.h"
#include "handlers.h"
#ifndef MAX_BINARY_OUTPUTS
#define MAX_BINARY_OUTPUTS 4
#endif
/* When all the priorities are level null, the present value returns */
/* the Relinquish Default value */
#define RELINQUISH_DEFAULT BINARY_INACTIVE
+4
View File
@@ -38,6 +38,10 @@
#include "bv.h"
#include "handlers.h"
#ifndef MAX_BINARY_VALUES
#define MAX_BINARY_VALUES 10
#endif
/* When all the priorities are level null, the present value returns */
/* the Relinquish Default value */
#define RELINQUISH_DEFAULT BINARY_INACTIVE
+2
View File
@@ -42,7 +42,9 @@
#include "handlers.h"
/* number of demo objects */
#ifndef MAX_LOAD_CONTROLS
#define MAX_LOAD_CONTROLS 4
#endif
/* indicates the current load shedding state of the object */
static BACNET_SHED_STATE Present_Value[MAX_LOAD_CONTROLS];
+2
View File
@@ -46,7 +46,9 @@
#include "handlers.h"
>>>>>>> .r1574
#ifndef MAX_LIGHTING_OUTPUTS
#define MAX_LIGHTING_OUTPUTS 5
#endif
/* we choose to have a NULL level in our system represented by */
/* a particular value. When the priorities are not in use, they */
+4
View File
@@ -38,6 +38,10 @@
#include "lsp.h"
#include "handlers.h"
#ifndef MAX_LIFE_SAFETY_POINTS
#define MAX_LIFE_SAFETY_POINTS 7
#endif
/* Here are our stored levels.*/
static BACNET_LIFE_SAFETY_MODE Life_Safety_Point_Mode[MAX_LIFE_SAFETY_POINTS];
static BACNET_LIFE_SAFETY_STATE
+5
View File
@@ -38,6 +38,11 @@
#include "ms-input.h"
#include "handlers.h"
/* number of demo objects */
#ifndef MAX_MULTISTATE_INPUTS
#define MAX_MULTISTATE_INPUTS 1
#endif
/* how many states? 0-253 is 254 states */
#ifndef MULTISTATE_NUMBER_OF_STATES
#define MULTISTATE_NUMBER_OF_STATES (254)
+4
View File
@@ -38,6 +38,10 @@
#include "mso.h"
#include "handlers.h"
#ifndef MAX_MULTISTATE_OUTPUTS
#define MAX_MULTISTATE_OUTPUTS 4
#endif
/* When all the priorities are level null, the present value returns */
/* the Relinquish Default value */
#define MULTISTATE_RELINQUISH_DEFAULT 0
+5 -1
View File
@@ -44,8 +44,12 @@
#include "bacfile.h" /* object list dependency */
#endif
/* Error code for Trend Log storage */
/* number of demo objects */
#ifndef MAX_TREND_LOGS
#define MAX_TREND_LOGS 8
#endif
/* Error code for Trend Log storage */
typedef struct tl_error {
uint16_t usClass;
uint16_t usCode;
-4
View File
@@ -30,10 +30,6 @@
#include "bacdef.h"
#include "rp.h"
#ifndef MAX_ANALOG_INPUTS
#define MAX_ANALOG_INPUTS 4
#endif
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
-4
View File
@@ -32,10 +32,6 @@
#include "rp.h"
#include "wp.h"
#ifndef MAX_ANALOG_OUTPUTS
#define MAX_ANALOG_OUTPUTS 4
#endif
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
-4
View File
@@ -32,10 +32,6 @@
#include "wp.h"
#include "rp.h"
#ifndef MAX_ANALOG_VALUES
#define MAX_ANALOG_VALUES 4
#endif
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
-4
View File
@@ -32,10 +32,6 @@
#include "rp.h"
#include "wp.h"
#ifndef MAX_BINARY_INPUTS
#define MAX_BINARY_INPUTS 5
#endif
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
-4
View File
@@ -32,10 +32,6 @@
#include "rp.h"
#include "wp.h"
#ifndef MAX_BINARY_OUTPUTS
#define MAX_BINARY_OUTPUTS 4
#endif
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
-4
View File
@@ -32,10 +32,6 @@
#include "rp.h"
#include "wp.h"
#ifndef MAX_BINARY_VALUES
#define MAX_BINARY_VALUES 10
#endif
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
-4
View File
@@ -32,10 +32,6 @@
#include "rp.h"
#include "wp.h"
#ifndef MAX_LIFE_SAFETY_POINTS
#define MAX_LIFE_SAFETY_POINTS 7
#endif
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
-4
View File
@@ -32,10 +32,6 @@
#include "rp.h"
#include "wp.h"
#ifndef MAX_MULTISTATE_INPUTS
#define MAX_MULTISTATE_INPUTS 1
#endif
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
-4
View File
@@ -32,10 +32,6 @@
#include "rp.h"
#include "wp.h"
#ifndef MAX_MULTISTATE_OUTPUTS
#define MAX_MULTISTATE_OUTPUTS 4
#endif
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
-4
View File
@@ -32,10 +32,6 @@
#include "rp.h"
#include "wp.h"
#ifndef MAX_TREND_LOGS
#define MAX_TREND_LOGS 8
#endif
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
+4
View File
@@ -35,6 +35,10 @@
#include "ai.h"
#include "handlers.h"
#ifndef MAX_ANALOG_INPUTS
#define MAX_ANALOG_INPUTS 2
#endif
static uint8_t Present_Value[MAX_ANALOG_INPUTS];
/* These three arrays are used by the ReadPropertyMultiple handler */
+4
View File
@@ -43,6 +43,10 @@
#include "av.h"
#include "handlers.h"
#ifndef MAX_ANALOG_VALUES
#define MAX_ANALOG_VALUES 2
#endif
static float Present_Value[MAX_ANALOG_VALUES];
/* These three arrays are used by the ReadPropertyMultiple handler */
+4
View File
@@ -35,6 +35,10 @@
#include "bi.h"
#include "handlers.h"
#ifndef MAX_BINARY_INPUTS
#define MAX_BINARY_INPUTS 5
#endif
static BACNET_BINARY_PV Present_Value[MAX_BINARY_INPUTS];
/* These three arrays are used by the ReadPropertyMultiple handler */
+4
View File
@@ -38,6 +38,10 @@
#include "bo.h"
#include "handlers.h"
#ifndef MAX_BINARY_OUTPUTS
#define MAX_BINARY_OUTPUTS 2
#endif
/* When all the priorities are level null, the present value returns */
/* the Relinquish Default value */
#define RELINQUISH_DEFAULT BINARY_INACTIVE
+1 -1
View File
@@ -138,7 +138,7 @@ static void bacnet_task(
/* handle the inputs */
value = adc_result(7);
Analog_Input_Present_Value_Set(0, value);
for (i = 0; i < MAX_BINARY_INPUTS; i++) {
for (i = 0; i < 5; i++) {
button_value = input_button_value(i);
if (button_value) {
binary_value = BINARY_ACTIVE;