NET_DVR_PDC_ALRAM_INFO

Alarm information structure of people counting statistics.

Structure Definition

struct{
  DWORD                    dwSize;
  BYTE                     byMode;
  BYTE                     byChannel;
  BYTE                     bySmart;
  BYTE                     byRes1;
  NET_VCA_DEV_INFO         struDevInfo;
  union{
    struct{
      DWORD                dwRelativeTime;
      DWORD                dwAbsTime;
      BYTE                 byTimeDiffFlag;
      signed char          cTimeDifferenceH;
      signed char          cTimeDifferenceM;
      BYTE                 byRes[89];
    }struStatFrame;
    struct{
      NET_DVR_TIME         tmStart;
      NET_DVR_TIME         tmEnd;
      BYTE                 byTimeDifferenceFlag;
      signed char          cStartTimeDifferenceH;
      signed char          cStartTimeDifferenceM;
      signed char          cStopTimeDifferenceH;
      signed char          cStopTimeDifferenceM;
      BYTE                 byRes[87];
    }struStatTime;
  }uStatModeParam;
  DWORD                    dwLeaveNum;
  DWORD                    dwEnterNum;
  BYTE                     byBrokenNetHttp;
  BYTE                     byRes3;
  WORD                     wDevInfoIvmsChannelEx;
  DWORD                    dwPassingNum;
  DWORD                    dwChildLeaveNum;
  DWORD                    dwChildEnterNum;
  BYTE                     byRes2[24];
}NET_DVR_PDC_ALRAM_INFO,*LPNET_DVR_PDC_ALRAM_INFO;

Members

dwSize

Structure size.

byMode

Statistics mode: 0-real-time people counting statistics, 1-periodic statistics, 2-statistics by sensor

byChannel

No. of alarm uploading channel.

bySmart

For intelligent device, return 0; and for smart device, return 1.

byRes1

Reserved, set to 0.

struDevInfo

Front-end device information, refer to the structure NET_VCA_DEV_INFO for details.

uStatModeParam

Statistics mode union, see details below.

struStatFrame

Real-time statistics, see details below.

dwRelativeTime

Time of UTC ± 00:00, which is valid only when the value of byTimeDiffFlag is "1".

dwAbsTime

Local time.

byTimeDiffFlag

Whether the time difference parameter is valid: 0-invalid, 1-valid.

cTimeDifferenceH

Time difference between time and UTC time, unit: hour, the value is between -12 and +14 ("+" indicates the east time zone), it is valid when byTimeDiffFlag is "1".

cTimeDifferenceM

Time difference between time and UTC time, unit: minute, the value is -30, +30, or +45 ("+" indicates the east time zone), it is valid when byTimeDiffFlag is "1".

byRes

Reserved, set to 0.

struStatTime

Start time information, see details below.

tmStart

Statistics start time, refer to the structure NET_DVR_TIME for details.

tmEnd

Statistics end time, refer to the structure NET_DVR_TIME for details.

byTimeDifferenceFlag

Whether the time difference parameter is valid: 0-invalid, 1-valid.

cStartTimeDifferenceH

Time difference between start time and UTC time, unit: hour, the value is between -12 and +14 ("+" indicates the east time zone), it is valid when byTimeDifferenceFlag is "1".

cStartTimeDifferenceM

Time difference between start time and UTC time, unit: minute, the value is -30, +30, or +45 ("+" indicates the east time zone), it is valid when byTimeDifferenceFlag is "1".

cStopTimeDifferenceH

Time difference between end time and UTC time, unit: hour, the value is between -12 and +14 ("+" indicates the east time zone), it is valid when byTimeDifferenceFlag is "1".

cStopTimeDifferenceM

Time difference between end time and UTC time, unit: minute, the value is -30, +30, or +45 ("+" indicates the east time zone), it is valid when byTimeDifferenceFlag is "1".

byRes

Reserved, set to 0.

dwLeaveNum

Number of people exited.

dwEnterNum

Number of people entered

byBrokenNetHttp

ANR flag bit: 0-non-ANR data, 1-ANR data

byRes3

Reserved

wDevInfoIvmsChannelEx

Extended the parameter byIvmsChannel in NET_VCA_DEV_INFO, its value range is extended.

dwPassingNum

Number of people passed.

dwChildLeaveNum

Number of exited children.

dwChildEnterNum

Number of entered children.

byRes2

Reserved

Remarks

  • For real-time statistics (byMode is "0"), counting starts from the last clearing action (device reboot, manual clearing, or auto-clearing at 00:00), and the result will be updated once it changed.

  • For periodic statistics (byMode is "0"), set the added number within the statistics period, and the update frequency is the configured statistics period (default: 15 minutes, minimum: 1 minute, maximum: 60 minutes).

  • The algorithm of getting year/month/day/hour/minute/second analyzed froM the time value of DWORD type is shown as follows.

    #define GET_YEAR(_time_)          (((_time_)>>26) + 2000) 
    #define GET_MONTH(_time_)       (((_time_)>>22) & 15)
    #define GET_DAY(_time_)           (((_time_)>>17) & 31)
    #define GET_HOUR(_time_)         (((_time_)>>12) & 31)
    #define GET_MINUTE(_time_)      (((_time_)>>6) & 63)
    #define GET_SECOND(_time_)     (((_time_)>>0) & 63)