Enhanced the ATmega168 demo project to include WriteProperty service to the Analog Value and Device objects.

This commit is contained in:
skarg
2008-03-19 23:17:19 +00:00
parent fe0563f751
commit 944cb46e51
10 changed files with 52 additions and 36 deletions
+19
View File
@@ -246,6 +246,25 @@ bool characterstring_copy(
characterstring_value(src), characterstring_length(src));
}
bool characterstring_ansi_copy(
char * dest,
size_t dest_max_len,
BACNET_CHARACTER_STRING * src)
{
size_t i; /* counter */
if (dest && src &&
(src->encoding == CHARACTER_ANSI_X34) &&
(src->length < dest_max_len)) {
for (i = 0; i < src->length; i++) {
dest[i] = src->value[i];
}
return true;
}
return false;
}
/* returns true if the character encoding and string contents are the same */
bool characterstring_same(
BACNET_CHARACTER_STRING * dest,