Structure of device information

F Structure of device define as below

typedef struct _H264_DVR_DEVICEINFO

{

char sSoftWareVersion[64]; ///< software version

char sHardWareVersion[64]; ///< hardware version

char sEncryptVersion[64]; ///< encrypt version

SDK_SYSTEM_TIME tmBuildTime;///< build time

char sSerialNumber[64]; ///< device serial number

int byChanNum; ///< channel number of video in

int iVideoOutChannel; ///< channel number of video out

int byAlarmInPortNum; ///< channel number of alarm in

int byAlarmOutPortNum; ///< channel number of alarm out

int iTalkInChannel; ///< channel number of talk in

int iTalkOutChannel; ///< channel number of talk out

int iExtraChannel; ///< channel number of extra

int iAudioInChannel; ///< channel number of audio in

int iCombineSwitch; ///< channel number of combine

}H264_DVR_DEVICEINFO,*LPH264_DVR_DEVICEINFO;

Date Information

typedef struct SDK_SYSTEM_TIME{

int year;///< year

int month;///< monthЈJanuary = 1, February = 2, and so on.

int day;///< day

int wday;///< week, Sunday = 0, Monday = 1, and so on

int hour;///< hour

int minute;///< minute

int second;///< second

int isdst;///< DST(daylight saving time) flag, Yes = 1, No = 0

}SDK_SYSTEM_TIME;

Record File Information

//search condition structure

typedef struct

{

int nChannelN0; //channel NO, start with 0

int nFileType; //record type

H264_DVR_TIME startTime; //start time

H264_DVR_TIME endTime; //end time

char szCard[32]; //card number

}H264_DVR_FINDINFO;

//the return of record information structure

typedef struct

{

int ch; ///< channel NO, start with 0

int size; ///< record size(BYTE)

char sFileName[108]; ///< record file name

SDK_SYSTEM_TIME stBeginTime; ///< start time of record SDK_SYSTEM_TIME stEndTime; ///< end time of record

}H264_DVR_FILE_DATA;

F Protocol Of Serial Information

struct SDK_COMMATTRI

{

int iDataBits; // data bit: [5,8]

int iStopBits; // stop bit: [0,2]

int iParity; // parity: 0: None 1: odd 2Јєeven 3: mark 4: space

int iBaudRate; // baudrate: 115200,57600,38400,9600,4800,2400 and so on

};

// serial configure

struct SDK_CONFIG_COMM_X

{

char iProtocolName[32]; // Protocol:Ў°ConsoleЎ±

int iPortNo; // Port No.

SDK_COMMATTRI aCommAttri; // attribute of serial

};

F ФЖМЁР­Тй

struct SDK_STR_CONFIG_PTZ

{

char sProtocolName[NET_MAX_PTZ_PROTOCOL_LENGTH]; // Protocol

int ideviceNo; // PTZ device NO.

int iNumberInMatrixs; // NO. in matrixs

int iPortNo; // serial port NO.: [1, 4]

SDK_COMMATTRI dstComm; // attribute of serial

};

//all channel of PTZ protocol

struct SDK_STR_PTZCONFIG_ALL

{

SDK_STR_CONFIG_PTZ ptzAll[NET_MAX_CHANNUM];

};

F User Manager Data Structure

Right List

typedef struct _OPR_RIGHT

{

string name;

}OPR_RIGHT;

typedef struct _USER_INFO

{

int rigthNum;

string rights[NET_MAX_RIGTH_NUM];

string strGroupname;

string strmemo;

string strname;

string strpassWord;

bool reserved; //is reserved user

bool shareable; //is shareable

}USER_INFO;

typedef struct _USER_GROUP_INFO

{

int rigthNum;

string memo;

string name;

string rights[NET_MAX_RIGTH_NUM]; //right list

}USER_GROUP_INFO;

//all of user and group information structure

typedef struct _USER_MANAGE_INFO

{

int rigthNum;

OPR_RIGHT rightList[NET_MAX_RIGTH_NUM];

int groupNum;

USER_GROUP_INFO groupList[NET_MAX_GROUP_NUM];

int userNum;

USER_INFO userList[NET_MAX_USER_NUM];

}USER_MANAGE_INFO;

//modify user

typedef struct _CONF_MODIFYUSER

{

std::string sUserName;

USER_INFO User;

}CONF_MODIFYUSER;

//modify group

typedef struct _CONF_MODIFYGROUP

{

std::string sGroupName;

USER_GROUP_INFO Group;

}CONF_MODIFYGROUP;

/// modify password

struct _CONF_MODIFY_PSW

{

std::string sUserName;

std::string sPassword;

std::string sNewPassword;

};

F Log Information

#define NET_MAX_RETURNED_LOGLIST 1024 //the max item of Log

/// log search condition

struct SDK_LogSearchCondition

{

int nType; ///< log type: 0: all 1: system 2: configure 3: storage 4: alarm 5Јєrecord 6: account 7: file

int iLogPosition; ///< return of last log item position in the whole logs

SDK_SYSTEM_TIME stBeginTime; ///< begin time

SDK_SYSTEM_TIME stEndTime; ///< end time

};

//return of Log search

struct SDK_LogList

{

int iNumLog;

struct LogItem

{

char sType[24]; ///< log type

char sUser[32]; ///< Operator of log

char sData[68]; ///< log data

SDK_SYSTEM_TIME stLogTime; ///< the time of log happened

} Logs[NET_MAX_RETURNED_LOGLIST];

};

F Storage information structure

struct SDK_STORAGEDISK

{

int iPhysicalNo;

int iPartNumber;

SDK_DriverInformation diPartitions[SDK_MAX_DRIVER_PER_DISK];

};

struct SDK_StorageDeviceInformationAll

{

int iDiskNumber;

SDK_STORAGEDISK vStorageDeviceInfoAll[SDK_MAX_DISK_PER_MACHINE];

};

F Real-Time Monitor

typedef struct{

int nChannel; //Channel NO.

int nStream; //0: main streamЈ1: extra stream

int nMode; //0ЈєTCP, 1ЈєUDP

}H264_DVR_CLIENTINFO,*LPH264_DVR_CLIENTINFO;

Наши рекомендации