added [feature#14] EventTimeStamp decoding from ReadPropertyMultiple app (#496)

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
This commit is contained in:
Steve Karg
2023-09-13 09:08:35 -05:00
committed by GitHub
parent b14177672b
commit 43db974e50
3 changed files with 38 additions and 1 deletions
+2
View File
@@ -18,6 +18,8 @@ The git repositories are hosted at the following sites:
### Added ### Added
Added [feature#14] EventTimeStamp decoding from ReadPropertyMultiple app
### Changed ### Changed
### Fixed ### Fixed
+21
View File
@@ -896,6 +896,27 @@ BACNET_APPLICATION_TAG bacapp_context_tag_type(
break; break;
} }
break; break;
case PROP_EVENT_TIME_STAMPS:
/* BACnetTimeStamp ::= CHOICE {
time [0] Time, -- deprecated in version 1 revision 21
sequence-number [1] Unsigned (0..65535),
datetime [2] BACnetDateTime
}
*/
switch (tag_number) {
case TIME_STAMP_TIME:
tag = BACNET_APPLICATION_TAG_TIMESTAMP;
break;
case TIME_STAMP_SEQUENCE:
tag = BACNET_APPLICATION_TAG_UNSIGNED_INT;
break;
case TIME_STAMP_DATETIME:
tag = BACNET_APPLICATION_TAG_DATETIME;
break;
default:
break;
}
break;
default: default:
break; break;
} }
+15 -1
View File
@@ -105,7 +105,14 @@ void bacapp_timestamp_copy(BACNET_TIMESTAMP *dest, BACNET_TIMESTAMP *src)
} }
} }
/** Encode a time stamp. /**
* @brief Encode a time stamp.
*
* BACnetTimeStamp ::= CHOICE {
* time [0] Time, -- deprecated in version 1 revision 21
* sequence-number [1] Unsigned (0..65535),
* datetime [2] BACnetDateTime
* }
* *
* @param apdu Pointer to the APDU buffer. * @param apdu Pointer to the APDU buffer.
* @param value Pointer to the variable that holds * @param value Pointer to the variable that holds
@@ -179,6 +186,13 @@ int bacapp_encode_context_timestamp(
/** /**
* @brief Decode a time stamp from the given buffer. * @brief Decode a time stamp from the given buffer.
*
* BACnetTimeStamp ::= CHOICE {
* time [0] Time, -- deprecated in version 1 revision 21
* sequence-number [1] Unsigned (0..65535),
* datetime [2] BACnetDateTime
* }
*
* @param apdu Pointer to the APDU buffer. * @param apdu Pointer to the APDU buffer.
* @param apdu_size - the APDU buffer length * @param apdu_size - the APDU buffer length
* @param value Pointer to the variable that shall * @param value Pointer to the variable that shall