1. function description
ttx protocol device reports active security video picture attachment
2. Docking instructions
2.1 Report the alarm first and save the alarm number
char szAlarmId[64] = {0};
When the signaling alarm starts:
TTXAlarmInfo_S armInfo = {0};
armInfo.AlarmType = TTX_ALARM_TYPE_CUSTOM
armInfo.AlarmInfo = TTX_ALARM_CUSTOM_ADAS_ALARM_FATIGUE_ONE_LEVEL_START;
TTXNET_AddAlarmInfo(&armInfo, szAlarmId);
2.2 report the alarm picture or video with the previous alarm number.
TTXAlarmInfo_S armInfo = {0};
armInfo.AlarmType = TTX_ALARM_TYPE_UPLOAD_FILE;
armInfo.AlarmInfo = TTX_FILE_TYPE_JPEG; //
// file type definition
//#define TTX_FILE_TYPE_JPEG 1 // picture
//#define TTX_FILE_TYPE_REC 2 // video file
//#define TTX_FILE_TYPE_AUDIO 5 // audio file
armInfo.Param[0] = ;// file length
armInfo.Param[1] = 2;// file type default 2:TTX_RECTYPE_ALARM
armInfo.Param[2] = 0;// File duration: 0 seconds
// If it is a video or audio file, the file duration is required. The file duration of the picture file is 0
armInfo.Param[3] = 0;// channel number, starting from 0
armInfo.Param[4] = TTX_ALARM_TYPE_CUSTOM;
armInfo.Param[5] = TTX_ALARM_CUSTOM_ADAS_ALARM_FATIGUE_ONE_LEVEL_START;
// absolute file path;
armInfo.szDesc = "/snapshot/upload/20171123- 165020.jpg ";
// Alarm time
sprintf(armInfo.szReserve, "d d d d d d", tmTime.tm_year 0 2000, tmTime.tm_mon 1, tmTime.tm_mday
, tmTime.tm_hour, tmTime.tm_min, tmTime.tm_sec);// Alarm time (start time of the file), format 20130613 100001
// Additional alarm number information
strcat(armInfo.szReserve, ";");
strcat(armInfo.szReserve, szAlarmId);
TTXNET_AddAlarmInfo(&armInfo);