Added WriteGroup service to blinkt app demo. (#843)
This commit is contained in:
@@ -96,10 +96,18 @@ apdu:
|
|||||||
blinkt:
|
blinkt:
|
||||||
$(MAKE) LEGACY=true -C apps $@
|
$(MAKE) LEGACY=true -C apps $@
|
||||||
|
|
||||||
|
.PHONY: blinkt-pipeline
|
||||||
|
blinkt-pipeline:
|
||||||
|
$(MAKE) LEGACY=true BUILD=pipeline -C apps blinkt
|
||||||
|
|
||||||
.PHONY: blinkt6
|
.PHONY: blinkt6
|
||||||
blinkt6:
|
blinkt6:
|
||||||
$(MAKE) LEGACY=true BACDL=bip6 -C apps blinkt
|
$(MAKE) LEGACY=true BACDL=bip6 -C apps blinkt
|
||||||
|
|
||||||
|
.PHONY: blinkt6-pipeline
|
||||||
|
blinkt6-pipeline:
|
||||||
|
$(MAKE) LEGACY=true BACDL=bip6 BUILD=pipeline -C apps blinkt
|
||||||
|
|
||||||
.PHONY: create-object
|
.PHONY: create-object
|
||||||
create-object:
|
create-object:
|
||||||
$(MAKE) -s -C apps $@
|
$(MAKE) -s -C apps $@
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ static int Blinkt_Pi;
|
|||||||
#define PI_OUTPUT 1
|
#define PI_OUTPUT 1
|
||||||
#define gpio_write(a, b, c) printf("gpio_write(%d, %d, %d)\n", a, b, c)
|
#define gpio_write(a, b, c) printf("gpio_write(%d, %d, %d)\n", a, b, c)
|
||||||
#define set_mode(a, b, c) printf("set_mode(%d, %d, %d)\n", a, b, c)
|
#define set_mode(a, b, c) printf("set_mode(%d, %d, %d)\n", a, b, c)
|
||||||
#define pigpio_start(a, b) printf("pigpio_start(%s, %s)\n", a, b)
|
#define pigpio_start(a, b) printf("pigpio_start(%p, %p)\n", a, b)
|
||||||
#define pigpio_stop(a) printf("pigpio_stop(%d)\n", a)
|
#define pigpio_stop(a) printf("pigpio_stop(%d)\n", a)
|
||||||
#else
|
#else
|
||||||
#include <pigpiod_if2.h>
|
#include <pigpiod_if2.h>
|
||||||
|
|||||||
@@ -62,6 +62,8 @@ static struct mstimer BACnet_TSM_Timer;
|
|||||||
static struct mstimer BACnet_Address_Timer;
|
static struct mstimer BACnet_Address_Timer;
|
||||||
/* task timer for object functionality */
|
/* task timer for object functionality */
|
||||||
static struct mstimer BACnet_Object_Timer;
|
static struct mstimer BACnet_Object_Timer;
|
||||||
|
/* observer for WriteGroup notifications */
|
||||||
|
static BACNET_WRITE_GROUP_NOTIFICATION Write_Group_Notification;
|
||||||
|
|
||||||
/** Initialize the handlers we will utilize.
|
/** Initialize the handlers we will utilize.
|
||||||
* @see Device_Init, apdu_set_unconfirmed_handler, apdu_set_confirmed_handler
|
* @see Device_Init, apdu_set_unconfirmed_handler, apdu_set_confirmed_handler
|
||||||
@@ -99,6 +101,8 @@ static void Init_Service_Handlers(void)
|
|||||||
SERVICE_CONFIRMED_SUBSCRIBE_COV, handler_cov_subscribe);
|
SERVICE_CONFIRMED_SUBSCRIBE_COV, handler_cov_subscribe);
|
||||||
apdu_set_unconfirmed_handler(
|
apdu_set_unconfirmed_handler(
|
||||||
SERVICE_UNCONFIRMED_COV_NOTIFICATION, handler_ucov_notification);
|
SERVICE_UNCONFIRMED_COV_NOTIFICATION, handler_ucov_notification);
|
||||||
|
apdu_set_unconfirmed_handler(
|
||||||
|
SERVICE_UNCONFIRMED_WRITE_GROUP, handler_write_group);
|
||||||
/* handle communication so we can shutup when asked */
|
/* handle communication so we can shutup when asked */
|
||||||
apdu_set_confirmed_handler(
|
apdu_set_confirmed_handler(
|
||||||
SERVICE_CONFIRMED_DEVICE_COMMUNICATION_CONTROL,
|
SERVICE_CONFIRMED_DEVICE_COMMUNICATION_CONTROL,
|
||||||
@@ -291,6 +295,8 @@ static void bacnet_output_init(void)
|
|||||||
Color_Temperature_Write_Value_Handler);
|
Color_Temperature_Write_Value_Handler);
|
||||||
Lighting_Output_Write_Present_Value_Callback_Set(
|
Lighting_Output_Write_Present_Value_Callback_Set(
|
||||||
Lighting_Output_Write_Value_Handler);
|
Lighting_Output_Write_Value_Handler);
|
||||||
|
Write_Group_Notification.callback = Channel_Write_Group;
|
||||||
|
handler_write_group_notification_add(&Write_Group_Notification);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user