New code for alarms and events: new functions get_alarm_summary_encode_apdu, Send_Get_Alarm_Summary_Address, Send_Get_Alarm_Summary, Send_Get_Event_Information_Address, Send_Get_Event_Information, get_event_ack_handler. Thank you Daniel Blazevic!

This commit is contained in:
skarg
2014-01-14 19:49:39 +00:00
parent 92559791ba
commit bfa26b769f
8 changed files with 390 additions and 0 deletions
+17
View File
@@ -42,6 +42,23 @@
#include "get_alarm_sum.h"
#include "npdu.h"
/* encode service */
int get_alarm_summary_encode_apdu(
uint8_t * apdu,
uint8_t invoke_id
) {
int apdu_len = 0; /* total length of the apdu, return value */
if (apdu) {
apdu[0] = PDU_TYPE_CONFIRMED_SERVICE_REQUEST;
apdu[1] = encode_max_segs_max_apdu(0, MAX_APDU);
apdu[2] = invoke_id;
apdu[3] = SERVICE_CONFIRMED_GET_ALARM_SUMMARY;
apdu_len = 4;
}
return apdu_len;
}
/** Helper function encode the beginning of a GetAlarmSummary ACK.
*