Лекции.Орг


Поиск:




Категории:

Астрономия
Биология
География
Другие языки
Интернет
Информатика
История
Культура
Литература
Логика
Математика
Медицина
Механика
Охрана труда
Педагогика
Политика
Право
Психология
Религия
Риторика
Социология
Спорт
Строительство
Технология
Транспорт
Физика
Философия
Финансы
Химия
Экология
Экономика
Электроника

 

 

 

 


Structure of Configuration




Commands of H264_DVR_GetDevConfigЎўH264_DVR_SetDevConfig

typedef enum _SDK_CONFIG_TYPE

{

E_SDK_CONFIG_NOTHING = 0,

//User Managerment

E_SDK_CONFIG_USER, //User informationЈincluding power listЈuser list and group list

USER_MANAGE_INFO

E_SDK_CONFIG_ADD_USER, //add user USER_INFO

E_SDK_CONFIG_MODIFY_USER, //modify user CONF_MODIFYUSER

E_SDK_CONFIG_DELETE_USER, //del user USER_INFO

E_SDK_CONFIG_ADD_GROUP, //add group USER_GROUP_INFO

E_SDK_CONFIG_MODIFY_GROUP, //modify group CONF_MODIFYGROUP

E_SDK_COFIG_DELETE_GROUP, //del group USER_GROUP_INFO

E_SDK_CONFIG_MODIFY_PSW, //modify password _CONF_MODIFY_PSW

 

 

//device ability

E_SDK_CONFIG_ABILITY_SYSFUNC = 9,//support network services SDK_SystemFunctio

E_SDK_CONFIG_ABILTY_ENCODE, //encode ability CONFIG_EncodeAbility

E_SDK_CONFIG_ABILITY_PTZPRO, //protocols of ptz support SDK_PTZPROTOCOLFUNC

E_SDK_COMFIG_ABILITY_COMMPRO, // protocols of 232 support SDK_COMMFUNC

E_SDK_CONFIG_ABILITY_MOTION_FUNC, //Motion detect SDK_MotionDetectFunction

E_SDK_CONFIG_ABILITY_BLIND_FUNC, //Blind detect SDK_BlindDetectFunction

E_SDK_CONFIG_ABILITY_DDNS_SERVER, // type of DDNS services support SDK_DDNSServiceFunction

E_SDK_CONFIG_ABILITY_TALK, // encode type of audio talk support

 

//Device configuration

E_SDK_CONFIG_SYSINFO = 17, //system information H264_DVR_DEVICEINFO

E_SDK_CONFIG_SYSNORMAL, //general SDK_CONFIG_NORMAL

E_SDK_CONFIG_SYSENCODE, //encode SDK_EncodeConfigAll

E_SDK_CONFIG_SYSNET, //network SDK_CONFIG_NET_COMMON

E_SDK_CONFIG_PTZ, //ptz SDK_STR_PTZCONFIG_ALL

E_SDK_CONFIG_COMM, //232 SDK_CommConfigAll

E_SDK_CONFIG_RECORD, //record SDK_RECORDCONFIG_ALL

E_SDK_CONFIG_MOTION, //motion detect SDK_MOTIONCONFIG

E_SDK_CONFIG_SHELTER, //blind detect SDK_BLINDDETECTCONFIG_ALL

E_SDK_CONFIG_VIDEO_LOSS, //loss detect SDK_VIDEOLOSSCONFIG_ALL

E_SDK_CONFIG_ALARM_IN, //alarm in SDK_ALARM_INPUTCONFIG_ALL

E_SDK_CONFIG_ALARM_OUT, //alarm out

E_SDK_CONFIG_DISK_MANAGER //disk management

E_SDK_CONFIG_OUT_MODE, //out mode

E_SDK_CONFIG_AUTO, //auto maintain SDK_AutoMaintainConfig

E_SDK_CONFIG_DEFAULT, //set default

E_SDK_CONFIG_DISK_INFO, //disk info SDK_StorageDeviceInformationAll

E_SDK_CONFIG_LOG_INFO, //get log SDK_LogList

E_SDK_CONFIG_NET_IPFILTER, //network servicesЈєblack/white list SDK_NetIPFilterConfig

E_SDK_CONFIG_NET_DHCP, //network servicesЈєDHCP

E_SDK_CONFIG_NET_DDNS, //network servicesЈєDDNS SDK_NetDDNSConfigALL

E_SDK_CONFIG_NET_EMAIL, //network servicesЈєEMAIL SDK_NetEmailConfig

E_SDK_CONFIG_NET_MULTICAST, //network services:Multicast SDK_NetMultiCastConfig

E_SDK_CONFIG_NET_NTP, //network servicesЈє NTP SDK_NetNTPConfig

E_SDK_CONFIG_NET_PPPOE, //network services: PPPOE SDK_NetPPPoEConfig

E_SDK_CONFIG_NET_DNS, //network services: DNS SDK_NetDNSConfig

E_SDK_CONFIG_NET_FTPSERVER, //network services: FTP SDK_FtpServerConfig

E_SDK_CONFIG_SYS_TIME, //system time

E_SDK_CONFIG_CLEAR_LOG, //clear log

E_SDK_REBOOT_DEV, //reboot device

 

E_SDK_CONFIG_ABILITY_LANG, //languages support

E_SDK_CONFIG_VIDEO_FORMAT, //Video format

E_SDK_CONFIG_COMBINEENCODE, //combine-encode

E_SDK_CONFIG_EXPORT, //config export

E_SDK_CONFIG_IMPORT, //config import

E_SDK_LOG_EXPORT, //log export

E_SDK_CONFIG_COMBINEENCODEMODE, //mode of combine-encode

E_SDK_WORK_STATE, //work status

}SDK_CONFIG_TYPE;

 

/// type of DDNS support

struct SDK_DDNSServiceFunction

{

int nTypeNum;

char vDDNSType[NET_MAX_DDNS_TYPE][64];

};

/// blind detect support

struct SDK_BlindDetectFunction

{

int iBlindCoverNum; ///< the number of cover area support

};

 

/// motion detect

struct SDK_MotionDetectFunction

{

int iGridRow; ///< the number of row

int iGridColumn; ///< the number of colum

};

/// protocols of 232 support

struct SDK_COMMFUNC

{

int nProNum; ///< the numbers of protocol

char vCommProtocol[SDK_COM_TYPES][32]; ///< the name of protocol

};

/// protocols of PTZ

struct SDK_PTZPROTOCOLFUNC

{

int nProNum;

char vPTZProtocol[100][NET_MAX_PTZ_PROTOCOL_LENGTH];

};

/// encode information

struct SDK_EncodeInfo

{

bool bEnable; ///< enable

int iStreamType; ///< stream type see refer to capture_channel_t

bool bHaveAudio; ///< is support audio

unsigned int uiCompression; ///< mask of capture_comp_t

unsigned int uiResolution; ///< mask of capture_size_t

};

/// encode power

struct CONFIG_EncodeAbility

{

int iMaxEncodePower; ///< max encode power

SDK_EncodeInfo vEncodeInfo[SDK_CHL_FUNCTION_NUM]; ///< encode information

SDK_EncodeInfo vCombEncInfo[SDK_CHL_FUNCTION_NUM]; ///< combine-encode information

};

 

///system function

struct SDK_SystemFunction

{

bool vEncodeFunction[SDK_ENCODE_FUNCTION_TYPE_NR]; ///< Encode Functions

bool vAlarmFunction[SDK_ALARM_FUNCTION_TYPE_NR]; ///< Alarm Fucntions

bool vNetServerFunction[SDK_NET_SERVER_TYPES_NR]; ///< Net Server Functions

bool vPreviewFunction[SDK_PREVIEW_TYPES_NR]; ///< Preview Functions

};

 

///< Auto-Maintain setting

struct SDK_AutoMaintainConfig

{

int iAutoRebootDay; ///< interval of Auto-Reboot days

int iAutoRebootHour; ///< time to reboot [0, 23]

int iAutoDeleteFilesDays; ///< interval of Auto-Del record file [0, 30]

};

//Disk info

struct SDK_STORAGEDISK

{

int iPhysicalNo; // Physical No.

int iPartNumber; // Partition numbers

SDK_DriverInformation diPartitions[SDK_MAX_DRIVER_PER_DISK];

};

struct SDK_StorageDeviceInformationAll

{

int iDiskNumber;

SDK_STORAGEDISK vStorageDeviceInfoAll[SDK_MAX_DISK_PER_MACHINE];

};

 

// Type of PTZ link

enum PtzLinkTypes

{

PTZ_LINK_NONE, // NONE

PTZ_LINK_PRESET, // GOTO PRESET

PTZ_LINK_TOUR, // TOUR

PTZ_LINK_PATTERN // PATTERN

};

 

// PTZ Link Config

struct SDK_PtzLinkConfig

{

int iType; // see refer to PtzLinkTypes

int iValue; // value of link type

};

 

// handler of event

struct SDK_EventHandler

{

unsigned int dwRecord; // bitmask of record. Bit per channel

unsigned int iRecordLatch; // record latchЈє10Ў«300 sec.

unsigned int dwTour; // bitmask of tour. Bit per channel

unsigned int dwSnapShot; // bitmask of snapshot. Bit per channel

unsigned int dwAlarmOut; // bitmask of alarm out. Bit per channel

unsigned int dwMatrix; // bitmask of matrix. Bit per channel

int iEventLatch; // interval of event(unit:sec.)

int iAOLatch; // Alarm out latchЈє10Ў«300 sec

SDK_PtzLinkConfig PtzLink[NET_MAX_CHANNUM]; // PTZ link activation

SDK_CONFIG_WORKSHEET schedule; // weeksheet of record

bool bRecordEn; // enable flag of record

bool bTourEn; // enable flag of tour

bool bSnapEn; // enable flag of snapshot

bool bAlarmOutEn; // enable flag of alarm out

bool bPtzEn; // enable flag of PTZ link

bool bTip; // enable flag of screen tip

bool bMail; // enable flag of sending email

bool bMessage; // enable flag of sending message to alarm center

bool bBeep; // enable flag of buzzer beep

bool bVoice; // enable flag of voice tip

bool bFTP; // enable flag of FTP unload

bool bMatrixEn; // no used

bool bLog; // enable flag of log

bool bMessagetoNet; // no used

};

 

///< Blind detect

struct SDK_BLINDDETECTCONFIG

{

bool bEnable; ///< enable

int iLevel; ///< sensitivityЈє1Ў«6

SDK_EventHandler hEvent; ///< handler of blind detect event

};

 

/// All channel of blind detect configuration

struct SDK_BLINDDETECTCONFIG_ALL

{

SDK_BLINDDETECTCONFIG vBlindDetectAll[NET_MAX_CHANNUM];

};

 

///< Alarm in

struct SDK_ALARM_INPUTCONFIG

{

bool bEnable; ///< enable

int iSensorType; ///< Sensor Type: Normal Open or Normal Close

SDK_EventHandler hEvent; ///< handler of alarm in

};

///< All channel of alarm in configuration

struct SDK_ALARM_INPUTCONFIG_ALL

{

SDK_ALARM_INPUTCONFIG vAlarmConfigAll[NET_MAX_CHANNUM];

};

 

///< Motion detect

struct SDK_MOTIONCONFIG

{

bool bEnable; //< enable

int iLevel; //< sensitivityЈє[1,6]

unsigned int mRegion[NET_MD_REGION_ROW]; //< regions of motion detectЈone bit per column, Max region: 18*22

SDK_EventHandler hEvent; //< handler of motion detect

};

 

/// All channel of video motion configuration

struct SDK_MOTIONCONFIG_ALL

{

SDK_MOTIONCONFIG vMotionDetectAll[NET_MAX_CHANNUM];

};

 

///< video loss detect

struct SDK_VIDEOLOSSCONFIG

{

bool bEnable; ///< enable

SDK_EventHandler hEvent; ///< event handler

};

/// All channel of video loss configuration

struct SDK_VIDEOLOSSCONFIG_ALL

{

SDK_VIDEOLOSSCONFIG vGenericEventConfig[NET_MAX_CHANNUM];

};

 

/// record mode type

enum SDK_RecordModeTypes

{

SDK_RECORD_MODE_CLOSED, ///< Closed

SDK_RECORD_MODE_MANUAL, ///< Manual: record all the time

SDK_RECORD_MODE_CONFIG, ///< Configuration: according to SDK_RECORDCONFIG

SDK_RECORD_MODE_NR,

};

 

///< record setting

struct SDK_RECORDCONFIG

{

int iPreRecord; ///< pre-record timeЈЁUnit:sec.Ј©

bool bRedundancy; ///< redundancy record

bool bSnapShot; ///< no used

int iPacketLength; ///< record lengthЈЁunit:minuteЈ©[1, 255]

int iRecordMode; ///< record modeЈrefer to SDK_RecordModeTypes

SDK_CONFIG_WORKSHEET wcWorkSheet; ///< worksheet

unsigned int typeMask[NET_N_WEEKS][NET_N_TSECT]; ///< mask of record type, corresponding to worksheet

};

 

// All channel of record configuration

struct SDK_RECORDCONFIG_ALL

{

SDK_RECORDCONFIG vRecordConfigAll[NET_MAX_CHANNUM];

};

 

// General Configuration

typedef struct _SDK_CONFIG_NORMAL

{

NEW_NET_TIME sysTime; ///< system time

int iLocalNo; ///< device No.:[0, 998]

int iOverWrite; ///< when disk full, 0: OverWrite, 1: StopRecord

int iSnapInterval; ///< no used

char sMachineName[64]; ///< device name

int iVideoStartOutPut; ///< no used

int iAutoLogout; ///< auto logout [0, 120], 0 means never

int iVideoFormat; ///< video format: 0:PAL, 1:NTSC, 2:SECAM

int iLanguage; ///< language: 0:English, 1: SimpChinese, 2:TradChinese, 3: Italian, 4:Spanish, 5:Japanese, 6:Russian, 7:French, 8:German

int iDateFormat; ///< date format: 0:YYMMDD, 1:MMDDYY, 2:DDMMYY

int iDateSeparator; ///< Date separator: 0:., 1: -, 2: /

int iTimeFormat; ///< Time format: 0: 12, 1: 24

int iDSTRule; ///< DST rule: 0: OFF, 1: ON

int iWorkDay; ///< work day

DSTPoint dDSTStart;

DSTPoint dDSTEnd;

}SDK_CONFIG_NORMAL;

 

// encode configuration

struct SDK_CONFIG_ENCODE

{

SDK_MEDIA_FORMAT dstMainFmt[SDK_ENCODE_TYPE_NUM]; // main stream

SDK_MEDIA_FORMAT dstExtraFmt[SDK_EXTRATYPES]; // Extra stream

SDK_MEDIA_FORMAT dstSnapFmt[SDK_ENCODE_TYPE_NUM]; // Snapshot

};

 

// all of channel encode configuration

struct SDK_EncodeConfigAll

{

SDK_CONFIG_ENCODE vEncodeConfigAll[NET_MAX_CHANNUM];

};

 

// combine-encode

struct SDK_CombineEncodeConfigAll

{

SDK_CONFIG_ENCODE vEncodeConfigAll[NET_MAX_COMBINE_NUM];

};

 

// newwork configuration

struct SDK_CONFIG_NET_COMMON

{

char HostName[NET_NAME_PASSWORD_LEN]; ///< hostname

CONFIG_IPAddress HostIP; ///< IP

CONFIG_IPAddress Submask; ///< Netmask

CONFIG_IPAddress Gateway; ///< NetGateway

int HttpPort; ///< HTTP port

int TCPPort; ///< TCP port

int SSLPort; ///< no used

int UDPPort; ///< no used

int MaxConn; ///< max connect

int MonMode; ///< translation protocol: 0:TCP, 1: UDP, 2: MCAST, only support TCP now

int MaxBps; ///< no used

int TransferPlan; ///< Translation policy: 0: AUTO 1: Quality first 2: fluency first

bool bUseHSDownLoad; ///< flag of high speed download

};

 

 

// PTZ configuration

struct SDK_STR_CONFIG_PTZ

{

char sProtocolName[NET_MAX_PTZ_PROTOCOL_LENGTH]; //< Protocol name

int ideviceNo; //< device No.

int iNumberInMatrixs; //< No. in Matrixs

int iPortNo; //< Port No.[1, 4]

SDK_COMMATTRI dstComm; //< comm attribute

};

// all channel of PTZ configuration

struct SDK_STR_PTZCONFIG_ALL

{

SDK_STR_CONFIG_PTZ ptzAll[NET_MAX_CHANNUM];

};

// 232 configuration

struct SDK_CONFIG_COMM_X

{

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

int iPortNo; // Port No.

SDK_COMMATTRI aCommAttri; // comm attribute

};

 

// all channel of 232 configuration

struct SDK_CommConfigAll

{

SDK_CONFIG_COMM_X vCommConfig[SDK_COM_TYPES];

};

 

 

///< IP Fliter

struct SDK_NetIPFilterConfig

{

bool Enable; ///< enable

CONFIG_IPAddress BannedList[NET_MAX_FILTERIP_NUM]; ///< black list

CONFIG_IPAddress TrustList[NET_MAX_FILTERIP_NUM]; ///< white list

};

 

 

///< multicast

struct SDK_NetMultiCastConfig

{

bool Enable; ///< enable

SDK_RemoteServerConfig Server; ///< multicast server

};

 

///< pppoe

struct SDK_NetPPPoEConfig

{

bool Enable; ///< enable

SDK_RemoteServerConfig Server; ///< PPPOE server

CONFIG_IPAddress addr; ///< ip get from PPPOE dial

};

 

///< DDNS

struct SDK_NetDDNSConfig

{

bool Enable; ///< enable

char DDNSKey[NET_NAME_PASSWORD_LEN]; ///< the type of DDNS name

char HostName[NET_NAME_PASSWORD_LEN]; ///< hostname

SDK_RemoteServerConfig Server; ///< DDNS server

};

 

///< DDNS

struct SDK_NetDDNSConfigALL

{

SDK_NetDDNSConfig ddnsConfig[5];

};

 

///< FTP

struct SDK_FtpServerConfig {

///< enable

bool Enable;

///< FTP server

SDK_RemoteServerConfig Server;

///< spare server IP

CONFIG_IPAddress SpareIP;

///< path name in FTP server

char RemotePathName[NET_MAX_PATH_LENGTH];

///< max file lenght

int FileMaxLen;

///< upload periods

SDK_TIMESECTION UpLoadPeriod[NET_N_MIN_TSECT];

};

 

 

///< NTP

struct SDK_NetNTPConfig

{

///< enable

bool Enable;

///< NTP server

SDK_RemoteServerConfig Server;

///< update period

int UpdatePeriod;

///< time zone

int TimeZone;

};

#define NET_MAX_EMAIL_TITLE_LEN 64

#define NET_MAX_EMAIL_RECIEVERS 5

#define NET_EMAIL_ADDR_LEN 32

 

///< EMAIL

struct SDK_NetEmailConfig

{

///< enalbe

bool Enable;

///< smtp server

SDK_RemoteServerConfig Server;

///< is need SSL?

bool bUseSSL;

///< sender address

char SendAddr[NET_EMAIL_ADDR_LEN];

///< receiver

char Recievers[NET_MAX_EMAIL_RECIEVERS][NET_EMAIL_ADDR_LEN];

///< email title

char Title[NET_MAX_EMAIL_TITLE_LEN];

///< time section

SDK_TIMESECTION Schedule[NET_N_MIN_TSECT];

};

 

 

///< DNS

struct SDK_NetDNSConfig

{

CONFIG_IPAddress PrimaryDNS;

CONFIG_IPAddress SecondaryDNS;

};

 

 

/// audio format for audio talk

struct SDK_AudioInFormatConfig

{

int iBitRate; ///< bitrateЈ(unit:kbps)

int iSampleRate; ///< sample rate(unit:Hz)

int iSampleBit; ///< sample bit

int iEncodeType; ///< type of encodeЈsee refer to AudioEncodeTypes

};

 

/// alarm status

struct SDK_DVR_ALARMSTATE

{

int iVideoMotion; ///< motion detect status, bit mask for channel,bit0 means channel 1,and so on,1: alarming 0: normal

int iVideoBlind; ///< blind detect status, bit mask for channel,bit0 means channel 1,and so on,1: alarming 0: normal

int iVideoLoss; ///< loss detect status, bit mask for channel,bit0 means channel 1,and so on,1: alarming 0: normal

int iAlarmIn; ///< alarm in status, bit mask for channel,bit0 means channel 1,and so on,1: alarming 0: normal

int iAlarmOut; ///< alarm out status, bit mask for channel,bit0 means channel 1,and so on,1: alarming 0: normal

};

 

// channel status

struct SDK_DVR_CHANNELSTATE

{

bool bRecord; ///< is recording

int iBitrate; ///< bitrate

};

 

// device work status

struct SDK_DVR_WORKSTATE

{

SDK_DVR_CHANNELSTATE vChnState[NET_MAX_CHANNUM];

SDK_DVR_ALARMSTATE vAlarmState;

};

 

Network keyboard define

/// KEY VALUE

enum SDK_NetKeyBoardValue

{

SDK_NET_KEY_0, SDK_NET_KEY_1, SDK_NET_KEY_2, SDK_NET_KEY_3, SDK_NET_KEY_4, SDK_NET_KEY_5, SDK_NET_KEY_6, SDK_NET_KEY_7, SDK_NET_KEY_8, SDK_NET_KEY_9,

SDK_NET_KEY_10, SDK_NET_KEY_11, SDK_NET_KEY_12, SDK_NET_KEY_13, SDK_NET_KEY_14, SDK_NET_KEY_15, SDK_NET_KEY_16, SDK_NET_KEY_10PLUS,

SDK_NET_KEY_UP = 20, // UP

SDK_NET_KEY_DOWN, // DOWN

SDK_NET_KEY_LEFT, // LEFT

SDK_NET_KEY_RIGHT, // RIGHT

SDK_NET_KEY_SHIFT,

SDK_NET_KEY_PGUP, // PAGE UP

SDK_NET_KEY_PGDN, // PAGE DOWN

SDK_NET_KEY_RET, // ENTER

SDK_NET_KEY_ESC, // ESC

SDK_NET_KEY_FUNC, // FUNC

SDK_NET_KEY_PLAY, // PLAY/PAUSE

SDK_NET_KEY_BACK, // BACK

SDK_NET_KEY_STOP, // STOP

SDK_NET_KEY_FAST, // FAST

SDK_NET_KEY_SLOW, // SLOW

SDK_NET_KEY_NEXT, // NEXT FILE

SDK_NET_KEY_PREV, // PREV FILE

SDK_NET_KEY_REC = 40, // ENTER RECORD SETTING PAGE

SDK_NET_KEY_SEARCH, // ENTER RECORD SEARCH PAGE

SDK_NET_KEY_INFO, // ENTER SYSTEM INFO PAGE

SDK_NET_KEY_ALARM, // ENTER ALARM OUT PAGE

SDK_NET_KEY_ADDR, // ENTER REMOTE ADDRESS SETTING PAGE

SDK_NET_KEY_BACKUP, // ENTER BACKUP PAGE

SDK_NET_KEY_SPLIT, // NEXT SPLIT MODE

SDK_NET_KEY_SPLIT1, // SLPIT MODE 1

SDK_NET_KEY_SPLIT4, // SLPIT MODE 4

SDK_NET_KEY_SPLIT8, // SLPIT MODE 8

SDK_NET_KEY_SPLIT9, // SLPIT MODE 9

SDK_NET_KEY_SPLIT16, // SLPIT MODE 16

SDK_NET_KEY_SHUT, // SHUTDOWN

SDK_NET_KEY_MENU, // MENU

SDK_NET_KEY_PTZ = 60, // ENTER PTZ CONTROL PAGE

SDK_NET_KEY_TELE, // ZOOM -

SDK_NET_KEY_WIDE, // ZOOM +

SDK_NET_KEY_IRIS_SMALL, // APERTURE -

SDK_NET_KEY_IRIS_LARGE, // APERTURE +

SDK_NET_KEY_FOCUS_NEAR, // FOCUS -

SDK_NET_KEY_FOCUS_FAR, // FOCUS +

SDK_NET_KEY_BRUSH, // BRUSH

SDK_NET_KEY_LIGHT, // LIGHT

SDK_NET_KEY_SPRESET, // SET PRESET POINT

SDK_NET_KEY_GPRESET, // GOTO PRESET POINT

SDK_NET_KEY_DPRESET, // CLEAR PRESET POINT

SDK_NET_KEY_PATTERN, // PATTERN

SDK_NET_KEY_AUTOSCAN, // AUTO-SCAN ON/OFF

SDK_NET_KEY_AUTOTOUR, // AUTO-TOUR ON/OFF

SDK_NET_KEY_AUTOPAN, // AUTO-PAN ON/OFF

};

 

/// keyboard status

enum SDK_NetKeyBoardState

{

SDK_NET_KEYBOARD_KEYDOWN, // key down

SDK_NET_KEYBOARD_KEYUP, // key up

};

 

struct SDK_NetKeyBoardData

{

int iValue; // see refer to SDK_NetKeyBoardValue

int iState; // see refer to SDK_NetKeyBoardState

};


API Definition

SDK Initialization

1. H264_DVR_API long H264_DVR_GetLastError();;

n API description: It is to return function failure code. when you failed to call the following interface, you can call this fucntion to get error code.

n Parameter: none

n Return: Please see refer to error code

n Reference APIЈє

 

typedef void (__stdcall *fDisConnect)(long lLoginID, char *pchDVRIP, long nDVRPort, unsigned long dwUser);

2. H264_DVR_API long H264_DVR_Init(fDisConnect cbDisConnect, unsigned long dwUser);

n API descriptionЈєInitialize SDK, calling before all SDK function

n ParameterЈє

cbDisConnect

Disconnect callback function. It is to callback disconnect device excluding device logout successfully(call H264_DVR_Logout(), set it as 0 when forbid callbacking.

[in]dwUser

User data

› CallBack function ParametersЈє

lLoginID

Login handle

pchDVRIP

Device IP

nDVRPort

Port

dwUser

User data, just the same with the above user data you have input.

n ReturnЈєSucceeded: TRUE, Fail: FALSE

n Reference APIЈєH264_DVR_Cleanup

 

3. CLIENT_API void H264_DVR_Cleanup ();

n API descriptionЈєClean up SDK and release occupied resource, calling after all SDK function.

n ParameterЈєnone

n ReturnЈєnone

n Reference APIЈєH264_DVR_Init

 

Get alarm status

typedef bool (__stdcall *fMessCallBack)(long lLoginID, char *pBuf,

unsigned long dwBufLen, long dwUser);

H264_DVR_API bool H264_DVR_SetDVRMessCallBack(fMessCallBack cbAlarmcallback, unsigned long lUser);

n API descriptionЈєSet device message callback fuction to get device current state. Callback order does not matter here. SDK default setting is not to callback.You need to call alarm message subscription interface H264_DVR_SetupAlarmChan().It applies to current defined alarm status.Device state is callbacked every second.ГїМґОENT_Cleanup

n ParameterЈє

cbAlarmcallback

Message callback function.It is to callback device status (such as alarm status). When it is 0, system disables callback.

[in] lUser

user self-defined data

›Callback function parameters:

lLoginID

Return value of H264_DVR_Login

pBuf

Refer to see SDK_AlarmInfo

dwBufLen

pBuf length. Unit is byte.

dwUser

User self-defined data

n ReturnЈєSucceeded: TRUE, Fail: FALSE

n Reference APIЈєH264_DVR_SetupAlarmChanЎўH264_DVR_CloseAlarmChan

 

4. H264_DVR_API long H264_DVR_SetupAlarmChan(long lLoginID);

n API descriptionЈєStart listening device message. This function is to set callbacking device message or not. Message is callbacked from H264_DVR_SetDVRMessCallBack.

n ParameterЈє

[in]lLoginID

Return value of H264_DVR_Login

 

n ReturnЈєSucceeded: TRUE, Fail: FALSE

n Reference APIЈєH264_DVR_SetDVRMessCallBackЈH264_DVR_CloseAlarmChan

 

5. H264_DVR_API bool H264_DVR_CloseAlarmChan(long lLoginID);

n API descriptionЈєStop lisening one device

n ParameterЈє

[in]lLoginID

Return value of H264_DVR_Login

n ReturnЈєSucceeded: TRUE, Fail: FALSE

n Reference APIЈєH264_DVR_SetupAlarmChan

 


 

Device Registration

6. H264_DVR_API long H264_DVR_Login (char *sDVRIP, unsigned short wDVRPort, char *sUserName, char *sPassword, LPH264_DVR_DEVICEINFO lpDeviceInfo, int *error);

n API descriptionЈєLogin. When device set the user as reuse(device default user such as admin can be reused.). this account can registed several time.

n ParameterЈє

[in] sDVRIP

device IP

[in] wDVRPort

device port

[in] sUserName

user name

[in] sPassword

password

[out] lpDeviceInfo

device property. it is a output parameter.

[out] error

(when the function returned successfully, the parameter is null.Please refer to error code.

n ReturnЈєReturn o if failed. Return device ID if succeeded. Using this value(device handle)all operations after successfuly log in can corresponding to the device.

n Reference APIЈєH264_DVR_Logout

 

7. H264_DVR_API long H264_DVR_LoginEx(char *sDVRIP, unsigned short wDVRPort, char *sUserName, char *sPassword, LPH264_DVR_DEVICEINFO lpDeviceInfo, int nType, int *error);

n API descriptionЈєRegister a user to device extension port. support one user specify device.

n ParameterЈє

[in] sDVRIP

device IP

[in] wDVRPort

device port

[in] sUserName

user name

[in] sPassword

password

[out] lpDeviceInfo

device property. it is a output parameter.

[in] nType

the type as follows:

enum LoginType

{

LOGIN_TYPE_GUI, ///< Local GUI

LOGIN_TYPE_CONSOLE, ///< Console

LOGIN_TYPE_WEB, ///< WEB

LOGIN_TYPE_SNS, ///< SNS

LOGIN_TYPE_MOBIL, ///< Mobile terminal

LOGIN_TYPE_NETKEYBOARD, ///< Netkeyboard

LOGIN_TYPE_SERVER, ///< Center servers

LOGIN_TYPE_AUTOSEARCH, ///< IP search tool

LOGIN_TYPE_UPGRADE, ///< Upgrade tool

LOGIN_TYPE_MEGAEYE, ///< Megaeye

LOGIN_TYPE_NR,

};

[out] error

(when the function returned successfully, the parameter is null.Please refer to error code.

 

n Return: Return 0 if failed. Return device ID if succeeded.Using this value(device handle)all operations after successfully logged in can corresponding to the device.

n Reference API: H264_DVR_Logout

 

8. H264_DVR_API long H264_DVR_Logout(long lLoginID)

n API descriptionЈєLogout user

n ParameterЈє

[in]lLoginID

Return value of H264_DVR_Login

n ReturnЈєSucceeded: TRUE, Fail: FALSE

n Reference APIЈєH264_DVR_Login

 

Real-time Monitor

9. H264_DVR_API long H264_DVR_RealPlay(long lLoginID, LPH264_DVR_CLIENTINFO lpClientInfo);

n API descriptionЈєStart real-time monitor.

n ParameterЈє

[in]lLoginID

Return value of H264_DVR_Login

[in] lpClientInfo

Client information

n ReturnЈєReturn real-time monitor handle if succeeded, return 0 if failed.

n Reference APIЈєH264_DVR_StopRealPlayЈH264_DVR_SetRealDataCallBack

 

10.H264_DVR_API bool H264_DVR_StopRealPlay(long lRealHandle);

n API descriptionЈєStop real-time monitor

n ParameterЈє

[in]lRealHandle

Return value of H264_DVR_RealPlay

n ReturnЈєSucceeded: TRUE, Fail: FALSE

n Reference APIЈєH264_DVR_RealPlay

 

11.H264_DVR_API bool H264_DVR_SetRealDataCallBack(long lRealHandle,fRealDataCallBack cbRealData, long dwUser);

typedef int(__stdcall *fRealDataCallBack) (long lRealHandle, long dwDataType, unsigned char *pBuffer,long lbufsize,long dwUser);

n API descriptionЈєSet real-time monitor data callback and provides you with data from the device.When cbRealData is NULL, callback ends.

n ParameterЈє

[in]lRealHandle

Return value of H264_DVR_RealPlay

cbRealData

It is a callback function to output the current real-time data from the device.

[in]dwUser

User data

› Callback function parameters:

lRealHandle

Return value of H264_DVR_RealPlay

dwDataType

0: original data

1: Frame data

2: yuv data

3: pcm audio data

pBuffer

call-back data. Everytime calling back data of different lengths according to the different data types (except type 0). Other data types are based on frames, every time it calls back one frame.

dwBufSize

length of callback data.(Unit:byte).

dwUser

User self-defined

n ReturnЈєSucceeded: TRUE, Fail: FALSE

n Reference APIЈєH264_DVR_RealPlayЎўH264_DVR_StopRealPlay

 

Playback And Download

12. H264_DVR_API long H264_DVR_FindFile(long lLoginID, H264_DVR_FINDINFO* lpFindInfo, H264_DVR_FILE_DATA *lpFileData, int lMaxCount, int *findcount, int waittime = 2000);

n API descriptionЈєSearch record files

n ParameterЈє

[in]lLoginID

Return value of H264_DVR_Login

[in]lpFindInfo

Search condition H264_DVR_FINDINFO

[out]lpFileData

Returned record file information.It is a H264_DVR_FILE_DATA

structure array.

[in]lMaxCount

The length of lpFileDataЈЁUnit: BYTEЈThe value shall between 100~200*sizeof(H264_DVR_FILE_DATA)Ј©

[out]filecount

Returned file amount; It is an output max parameter. You can only search the video files before buffer is full

[in]waittime

Waitting time

n ReturnЈєSucceeded: TRUE, Fail: FALSE

n Reference APIЈє

H264_DVR_Login,H264_DVR_PlayBackByName,H264_DVR_StopPlayBack,

H264_DVR_PlayBackControl, H264_DVR_GetFileByName

typedef void(__stdcall *fDownLoadPosCallBack) (long lPlayHandle, long lTotalSize, long lDownLoadSize, long dwUser)

13. H264_DVR_API long H264_DVR_PlayBackByName(long lLoginID, H264_DVR_FILE_DATA *sPlayBackFile, fDownLoadPosCallBack cbDownLoadPos, fRealDataCallBack fDownLoadDataCallBack, long dwDataUser);

n API descriptionЈєNetwork playback. Please note, when you login one device, one channel can only play one record at one time, while multi-records of the same channel canЎЇt be opened simutaniously.

n ParameterЈє

[in]lLoginID

Return value of H264_DVR_Login

[in] sPlayBackFile

Recorded file information return by H264_DVR_FindFile

[in] cbDownLoadPos

Progress call-back function

[in] fDownLoadDataCallBack

Video data call-back function

[in]dwUserData

User self-defined data

› CallBack functionЈє

lPlayHandle

Return value of H264_DVR_PlayBackByName

dwTotalSize

Current total play size, unit is KB.

dwDownLoadSize

Played sizeЈunit is KB. When value is -1, it means cureent playback is over.

dwUser

User data, just the same with user data in the above.

n ReturnЈєReturn network playbackID if succeeded, return 0 if failed.

n Reference APIЈє

H264_DVR_Login,H264_DVR_FindFile,H264_DVR_StopPlayBack,

H264_DVR_PlayBackControl

 

14.H264_DVR_API bool H264_DVR_StopPlayBack(long lPlayHandle);

n API descriptionЈєStop playback

n ParameterЈє

[in]lPlayHandle

Playback handle, Such as the return value of H264_DVR_PlayBackByName

n ReturnЈєSucceeded: TRUE, Fail: FALSE

n Reference APIЈєH264_DVR_PlayBackByName

 

 

15. H264_DVR_API long H264_DVR_GetFileByName(long lLoginID,H264_DVR_FILE_DATA *sPlayBackFile,char *sSavedFileName, fDownLoadPosCallBack cbDownLoadPos = NULL, long dwDataUser = NULL);

n API descriptionЈєDownload recorded files via the searched information

n ParameterЈє

[in]lLoginID

The return value of H264_DVR_Login

[in] sPlayBackFile

Recorded file information pointer.

[in]sSavedFileName

The name of file to save(full path).

[in]cbDownLoadPos

Download process calls user self-defined data.For download process callback fucntion, please refer to H264_DVR_GetDownloadPos

[in]dwUserData

Download process calls user self-defined data.

› CallBack functionЈє

lPlayHandle

Return value of H264_DVR_PlayBackByName

dwTotalSize

Current total play size, unit is KB.

dwDownLoadSize

Played sizeЈunit is KB. When value is -1, it means cureent playback is over.

dwUser

User data, just the same with user data in the above.

n ReturnЈєReturn download ID if succeeded. Return 0 if failed.

n Reference APIЈєH264_DVR_StopGetFileЎўH264_DVR_GetDownloadPos

 

16.H264_DVR_API bool H264_DVR_StopGetFile(long lFileHandle);

n API descriptionЈєStop downloading files.

n ParameterЈє

[in]lFileHandle

The return value of H264_DVR_GetFileByName

n ReturnЈєSucceeded: TRUE, Fail: FALSE

n Reference APIЈєH264_DVR_GetFileByNameЎўH264_DVR_GetDownloadPos

 

17. H264_DVR_API int H264_DVR_GetDownloadPos(long lFileHandle);

n API descriptionЈєIt is to get current downloading place for interfaces that do not need to show real-time download progress. It is similar to the download callback function.

n ParameterЈє

[in]lFileHandle

The return value of H264_DVR_GetFileByName

n ReturnЈєposition(value between 0 to 100)

n Reference APIЈєH264_DVR_GetFileByNameЎўH264_DVR_StopGetFile

Playback Control

18. H264_DVR_API bool H264_DVR_PlayBackControl(long lPlayHandle, long lControlCode,long lCtrlValue);

n API descriptionЈєPause, Resume, Seek network playback

n ParameterЈє

[in]lPlayHandle

Play handle, return by H264_DVR_GetFileByName

[in] lControlCode

enum SEDK_PlayBackAction

{

SDK_PLAY_BACK_PAUSE, // Pause

SDK_PLAY_BACK_CONTINUE, // Resume

SDK_PLAY_BACK_SEEK, // Seek

};

n ReturnЈєSucceeded: TRUE, Fail: FALSE

n Reference APIЈєH264_DVR_PlayBackByNameЎўH264_DVR_StopPlayBack

 

PTZ Control

19. H264_DVR_API bool H264_DVR_PTZControl(long lLoginID,int nChannelNo, long lPTZCommand, bool bStop = false, long lSpeed = 4)

n API descriptionЈєPTZ control

n Parameter:

[in]lLoginID

Return value of H264_DVR_Login

[in] nChannelNo

Channel NO. start with 0

[out] lPTZCommand

Commands, see refer to PTZ_ControlType

[in] bStop

Whether stop or not. It applies to PTZ direction andlens operation. When you operate other functions, input this parameter as FALSE.

[out] lSpeed

Step/Speed. The value ranges from 1 to 8. 8 has the highest control capability(4 by default). dwStep is the preset value when you use preset function.

n Return: Succeeded: TRUE, Fail: FALSE

n Reference APIЈєH264_DVR_LoginЈH264_DVR_RealPlay

System Configuration

20. H264_DVR_API long H264_DVR_GetDevConfig(long lLoginID, unsigned long dwCommand, int nChannelNO, char * lpOutBuffer, unsigned long dwOutBufferSize, unsigned long* lpBytesReturned,int waittime = 1000);

n API description: Get device configuration information.

n Parameter:

[in]lLoginID

The return value of H264_DVR_Login

[in]dwCommand

Configuration type, Please refer to SDK_CONFIG_TYPE

[in]nChannelNO

Channel number. Set as -1 to configure all channels. The parameter is null if command does not need the channel number.

[out] lpOutBuffer

Receive data buffer pointer, buffer length depend on configuration structure size.

[in]dwOutBufferSize

Receive data buffer lenght(Unit:byte)

[out]lpBytesReturned

The data lenght actually received.

[in]waittime

Waiting time

n ReturnЈєSucceeded: TRUE, Fail: FALSE

n Reference APIЈєH264_DVR_SetDevConfig

 

21. H264_DVR_API long H264_DVR_SetDevConfig(long lLoginID, unsigned long dwCommand, int nChannelNO, char * lpInBuffer, unsigned long dwInBufferSize, int waittime = 1000);

n API description: Set device configuration information

n Parameter:

[in]lLoginID

The return value of H264_DVR_Login

[in]dwCommand

Configuration type, Please refer to SDK_CONFIG_TYPE

[in]nChannelNO

Channel number. Set as -1 to configure all channels. The parameter is null if command does not need the channel number.

[in]lpInBuffer

Data buffer pointer

[in]dwInBufferSize

Data buffer lenght(unit is byte).

[in]waittime

Waitting time

n ReturnЈєSucceeded: TRUE, Fail: FALSE

n Reference APIЈєH264_DVR_GetDevConfig

 

Log Management

22. H264_DVR_API bool H264_DVR_FindDVRLog(long lLoginID, SDK_LogSearchCondition *pFindParam, SDK_LogList *pRetBuffer, long lBufSize, int waittime = 2000);

n API descriptionЈєLog query

n ParameterЈє

[in]lLoginID

The return value of H264_DVR_Login

[in] pFindParam

Search condition, Please refer to SDK_LogSearchCondition

[in] pRetBuffer

The return of log information, Please refer to SDK_LogList

[in] lBufSize

The return length of log information

[in] waittime

Waiting time

n ReturnЈєSucceeded: TRUE, Fail: FALSE

n Reference APIЈєNone

 

Remote Control

23.H264_DVR_API bool H264_DVR_ControlDVR(long lLoginID, int type, int waittime = 2000)

n API descriptionЈєReboot device and clear log

n ParameterЈє

[in]lLoginID

The return value of H264_DVR_Login

[in] type

0: reboot deviceЈ1: clear log

n ReturnЈєSucceeded: TRUE, Fail: FALSE

n Reference APIЈєNone

Upgrade

typedef void(__stdcall *fUpgradeCallBack) (long lLoginID, long lUpgradechannel, int nTotalSize, int nSendSize, long dwUser);

24. H264_DVR_API long H264_DVR_Upgrade(long lLoginID, char *sFileName, int nType = 0, fUpgradeCallBack cbUpgrade = NULL, long dwUser = 0);

n API descriptionЈєUpgrade device

n ParameterЈє

[in]lLoginID

The return value of H264_DVR_Login

[in] sFileName

The name of upgrade file

[in] nType

The type of upgrade file

enum UpgradeTypes

{

UPGRADE_TYPES_SYSTEM, ///< System

UPGRADE_TYPES_NR,

};

› CallBack functionЈє

fUpgradeCallBack

Callback of upgrade progress, lUpgradechannel is the upgrade handle, return by H264_DVR_Upgrade

nTotalSize

Upgrade file lenght,(Unit: BYTE)

nSendSize

data length have been upgraded,(unit: BYTE)

[in]dwUser

User self-define data

n ReturnЈєSucceeded: return upgrade handle, Fail: FALSE

n Reference API:H264_DVR_GetUpgradeState,H264_DVR_CloseUpgradeHandle

 

25.H264_DVR_API long H264_DVR_CloseUpgradeHandle(long lUpgradeHandle);

n API descriptionЈєstop upgrade

n ParameterЈє

[in]lUpgradeID

The return value of H264_DVR_Upgrade

n ReturnЈєSucceeded: TRUE, Fail: FALSE

n Reference API: H264_DVR_Upgrade

 

26.H264_DVR_API int H264_DVR_GetUpgradeState(long lUpgradeHandle)

n API descriptionЈєget upgrade status

n ParameterЈє

[in] lUpgradeHandle

The return value of H264_DVR_Upgrade

n ReturnЈє1: Succeeded 2: Upgrading, 3: FALSE

n Reference API: H264_DVR_UpgradeЈH264_DVR_CloseUpgradeHand

 

27.H264_DVR_API bool H264_DVR_SearchDevice(char* szBuf, int nBufLen, int* pRetLen,

int nSearchTime);

n API descriptionЈєSearch device in LAN

n ParameterЈє

[in] szBuf

Buffer to receive structure SDK_CONFIG_NET_COMMON, return the a structure as long as it search a device.

[in] nBufLen

szBuf buffer length

[in] pRetLen

Return the structure total length of SDK_CONFIG_NET_COMMON

[in] nSearchTime

Waiting time

n ReturnЈєSucceeded: TRUE, Fail: FALSE

n Reference API:

 

Audio Talk

typedef void (__stdcall *pfAudioDataCallBack)(long lVoiceHandle, char *pDataBuf,

long dwBufSize, char byAudioFlag, long dwUser);

28.H264_DVR_API long H264_DVR_StartVoiceCom_MR (long lLoginID, pfAudioDataCallBack pVcb,

Long dwDataUser);

n API descriptionЈєSend audio talk request to device.

n ParameterЈє

[in] lLoginID

The return value of H264_DVR_Login

[in] pVcb

Self-defined data callback interface.

[in] dwDataUser

Self-defined data. Returned to you via callback function

n ReturnЈє>0 audio talk handle, <= FALSE

n Reference API:

H264_DVR_VoiceComSendData, H264_DVR_StopVoiceCom, H264_DVR_SetTalkMode

 

29.H264_DVR_API bool H264_DVR_VoiceComSendData (long lVoiceHandle, char *pSendBuf,

long lBufSize);

n API descriptionЈєSend user audio data to device.

n ParameterЈє

[in] lVoiceHandle

Return value of H264_DVR_StartVoiceCom_MR

[in] pSendBuf

The audio data to be sent out.

[in] lBufSize

Audio data length to be sent out.(Unit:byte)

n ReturnЈєSucceeded: TRUE, Fail: FALSE

n Reference API:

H264_DVR_StartVoiceCom_MR H264_DVR_StopVoiceCom H264_DVR_SetTalkMode

 

30.H264_DVR_API bool H264_DVR_StopVoiceCom (long lVoiceHandle);

n API descriptionЈєStop audio talk

n ParameterЈє

[in] lVoiceHandle

The return value of H264_DVR_StartVoiceCom_MR

n ReturnЈєSucceeded: TRUE, Fail: FALSE

n Reference API:

H264_DVR_StartVoiceCom_MR H264_DVR_VoiceComSendData H264_DVR_SetTalkMode

 

31.H264_DVR_API bool H264_DVR_SetTalkMode (long lLoginID, SDK_AudioInFormatConfig* pTalkMode);

n API descriptionЈєset audio talk mode

n ParameterЈє

0- [in] lLoginID

The return value of H264_DVR_Login

1- [in] pTalkMode

Mode of audio talk,see refer to SDK_AudioInFormatConfig

n ReturnЈєSucceeded: TRUE, Fail: FALSE

n Reference API:

H264_DVR_StartVoiceCom_MR H264_DVR_VoiceComSendData H264_DVR_StopVoiceCom

Record Mode

32.H264_DVR_API bool H264_DVR_StartDVRRecord(long lLoginID, int nChannelNo,long lRecordType);

n API descriptionЈєset record mode

n ParameterЈє

lLoginID

the return value of H264_DVR_Login

[in] nChannelNo

Channel No., -1 all of channel

[in] lRecordType

Record mode, see refer to SDK_RecordModeTypes

n ReturnЈєSucceeded: TRUE, Fail: FALSE

n Reference API: H264_DVR_StopDVRRecord

 

33.H264_DVR_API bool H264_DVR_StopDVRRecord(long lLoginID, int nChannelNo);

n API descriptionЈєstop record

n ParameterЈє

[in] lLoginID

The return value of H264_DVR_Login

[in] nChannelNo

Channel No., -1: all of channel

n ReturnЈєSucceeded: TRUE, Fail: FALSE

n Reference API: H264_DVR_StartDVRRecord

Set System Time

34.H264_DVR_API bool H264_DVR_SetSystemDateTime (long lLoginID, SDK_SYSTEM_TIME *pSysTime);

n API descriptionЈєset system time

n ParameterЈє

[in] lLoginID

The return value of H264_DVR_Login

[in] pSysTime

System time, see refer to SDK_SYSTEM_TIME

n ReturnЈєSucceeded: TRUE, Fail: FALSE

n Reference API: None

 

Get Device status

35.H264_DVR_API bool H264_DVR_GetDVRWorkState(long lLoginID, SDK_DVR_WORKSTATE *pWorkState);

n API descriptionЈєGet device working status

n ParameterЈє

[in] lLoginID

The return value of H264_DVR_Login

0- [in] pWorkState

Structure of work staus, see refer to SDK_DVR_WORKSTATE

n ReturnЈєSucceeded: TRUE, Fail: FALSE

n Reference API: None

 

Net Keyboard

36.H264_DVR_API bool H264_DVR_ClickKey (long lLoginID, SDK_NetKeyBoardData *pKeyBoardData);

n API descriptionЈєsend net keyboard message

n ParameterЈє

[in] lLoginID

The return value of H264_DVR_Login

0- [in] pKeyBoardData

Key value, see refer to SDK_NetKeyBoardData

n ReturnЈєSucceeded: TRUE, Fail: FALSE

n Reference API: None





Поделиться с друзьями:


Дата добавления: 2016-10-27; Мы поможем в написании ваших работ!; просмотров: 600 | Нарушение авторских прав


Поиск на сайте:

Лучшие изречения:

Самообман может довести до саморазрушения. © Неизвестно
==> читать все изречения...

2487 - | 2329 -


© 2015-2024 lektsii.org - Контакты - Последнее добавление

Ген: 0.01 с.