Added optional API for some objects. Added ability to set password for default DCC handler.
This commit is contained in:
@@ -38,7 +38,27 @@
|
||||
#include "reject.h"
|
||||
#include "dcc.h"
|
||||
|
||||
static char *My_Password = "filister";
|
||||
static char My_Password[32] = "filister";
|
||||
|
||||
void handler_dcc_password_set(
|
||||
char *new_password)
|
||||
{
|
||||
size_t i = 0; /* loop counter */
|
||||
|
||||
if (new_password) {
|
||||
for (i = 0; i < (sizeof(My_Password)-1); i++) {
|
||||
My_Password[i] = new_password[i];
|
||||
My_Password[i+1] = 0;
|
||||
if (new_password[i] == 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (i = 0; i < sizeof(My_Password); i++) {
|
||||
My_Password[i] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void handler_device_communication_control(
|
||||
uint8_t * service_request,
|
||||
|
||||
@@ -60,6 +60,12 @@ extern "C" {
|
||||
uint32_t instance,
|
||||
char *new_name);
|
||||
|
||||
bool Analog_Input_Units_Set(
|
||||
uint32_t instance,
|
||||
uint32_t units);
|
||||
uint32_t Analog_Input_Units(
|
||||
uint32_t instance);
|
||||
|
||||
int Analog_Input_Encode_Property_APDU(
|
||||
uint8_t * apdu,
|
||||
uint32_t object_instance,
|
||||
|
||||
@@ -73,7 +73,14 @@ extern "C" {
|
||||
bool Analog_Output_Description_Set(
|
||||
uint32_t instance,
|
||||
char *new_name);
|
||||
|
||||
|
||||
bool Analog_Output_Units_Set(
|
||||
uint32_t instance,
|
||||
uint32_t units);
|
||||
uint32_t Analog_Output_Units(
|
||||
uint32_t instance);
|
||||
|
||||
|
||||
void Analog_Output_Init(void);
|
||||
|
||||
int Analog_Output_Encode_Property_APDU(
|
||||
|
||||
@@ -62,6 +62,17 @@ extern "C" {
|
||||
uint32_t instance,
|
||||
char *new_name);
|
||||
|
||||
char *Binary_Input_Inactive_Text(
|
||||
uint32_t instance);
|
||||
bool Binary_Input_Inactive_Text_Set(
|
||||
uint32_t instance,
|
||||
char *new_name);
|
||||
char *Binary_Input_Active_Text(
|
||||
uint32_t instance);
|
||||
bool Binary_Input_Active_Text_Set(
|
||||
uint32_t instance,
|
||||
char *new_name);
|
||||
|
||||
bool Binary_Input_Change_Of_Value(
|
||||
uint32_t object_instance);
|
||||
void Binary_Input_Change_Of_Value_Clear(
|
||||
|
||||
@@ -66,6 +66,16 @@ extern "C" {
|
||||
uint32_t instance,
|
||||
char *new_name);
|
||||
|
||||
char *Binary_Output_Inactive_Text(
|
||||
uint32_t instance);
|
||||
bool Binary_Output_Inactive_Text_Set(
|
||||
uint32_t instance,
|
||||
char *new_name);
|
||||
char *Binary_Output_Active_Text(
|
||||
uint32_t instance);
|
||||
bool Binary_Output_Active_Text_Set(
|
||||
uint32_t instance,
|
||||
char *new_name);
|
||||
|
||||
int Binary_Output_Encode_Property_APDU(
|
||||
uint8_t * apdu,
|
||||
|
||||
@@ -126,6 +126,8 @@ extern "C" {
|
||||
uint16_t service_len,
|
||||
BACNET_ADDRESS * src,
|
||||
BACNET_CONFIRMED_SERVICE_DATA * service_data);
|
||||
void handler_dcc_password_set(
|
||||
char *new_password);
|
||||
|
||||
void handler_i_have(
|
||||
uint8_t * service_request,
|
||||
|
||||
Reference in New Issue
Block a user