Go to documentation repository
...
Section | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
The export is described in the proto files ExportService.proto and Export.proto.
The following 6 methods are used for export:
Export tasks are performed not by gRPC channel, but by the export agent. Currently, it is impossible to create an export agent via gRPC API, only manually in the Client.
When at least one export agent is created, it can be used to perform operations. If there are several export agents and none of them is explicitly specified in the StartSession method, then the agent with index 1 will be used.
The export operation starts on the node where the camera is located. If the export is started for several cameras, then the first node is used. Note that it is not necessary to connect to each node − the tasks will be forwarded to them automatically.
Export results are generated on the local Axxon One Server and can be passed by downloading the files using the DownloadFile method, which supports downloading from an arbitrary location in the file.
내보내기는 proto 파일인 ExportService.proto와 Export.proto에 설명되어 있습니다.
내보내기에는 다음의 6가지 메소드가 사용됩니다.
내보내기 작업은 gRPC 채널이 아닌 내보내기 에이전트에 의해 수행됩니다. 현재 gRPC API를 통해 내보내기 에이전트를 생성하는 것은 불가능하며, 클라이언트에서 수동으로만 생성할 수 있습니다.
적어도 하나의 내보내기 에이전트가 생성되면 이를 사용하여 작업을 수행할 수 있습니다. 여러 개의 내보내기 에이전트가 있고 StartSession 메소드에서 특정 에이전트를 명시하지 않으면, 인덱스 1인 에이전트가 사용됩니다.
내보내기 작업은 카메라가 위치한 노드에서 시작됩니다. 여러 카메라에 대해 내보내기가 시작되면 첫 번째 노드가 사용됩니다. 각 노드에 연결할 필요는 없으며 작업은 자동으로 해당 노드로 전달됩니다.
내보내기 결과는 로컬 Axxon One 서버에서 생성되며 DownloadFile 메소드를 사용하여 파일을 다운로드함으로써 결과를 전달할 수 있습니다. 이 메소드는 파일의 임의 위치에서 다운로드를 지원합니다.
이 메소드는 옵션 메시지에 설명된 내보내기 옵션을 전달합니다The method passes the export options, which are described in the Options message.
Expand | ||
---|---|---|
| ||
|
where여기서,
Using the combination of mode and 와 output_type , you can create 4 export types:유형의 조합을 사용하여 4가지 내보내기 유형을 생성할 수 있습니다.
The LiveMode, ArchiveMode, SnapshotType and StreamType messages contain the parameters for this export type. The CommonSetting message is used to pass general settings for the export operation., StreamType 메시지에는 각 내보내기 유형에 대한 파라미터가 포함되어 있습니다. CommonSetting 메시지는 내보내기 작업에 대한 일반 설정을 전달하는 데 사용됩니다.
주요 내보내기 파라미터 목록The list of main export parameters:
Expand | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
For each export type, there are timeouts after which the operation is stopped if the GetSessionState method was not executed.
The timeout is counted from the moment the export operation was started and/or from the moment the GetSessionState method was last executed.
The timeout for exporting a video clip from live video is 5 minutes, for all other export types − 30 minutes.
The id of the export operation will be received as the response to this method.
The SessionInfo message for each export operation will be received as the response to this method. If one response does not fit all the operations, then there will also be the next_page_token for the next page.
The SessionInfo message contains:
|
각 내보내기 유형에는 GetSessionState 메서드가 실행되지 않은 경우 작업이 중지되는 시간 제한이 있습니다.
시간 제한은 내보내기 작업이 시작된 시점과/또는 마지막으로 GetSessionState 메서드가 실행된 시점부터 계산됩니다.
라이브 비디오에서 비디오 클립을 내보내는 경우 시간 제한은 5분이며, 다른 모든 내보내기 유형은 30분입니다.
내보내기 작업의 ID는 이 메서드에 대한 응답으로 받게 됩니다.
각 내보내기 작업에 대한 SessionInfo 메시지가 이 메서드의 응답으로 제공됩니다. 하나의 응답으로 모든 작업을 처리할 수 없는 경우, 다음 페이지를 위한 next_page_token도 함께 제공됩니다.
SessionInfo 메시지에는 다음 내용이 포함됩니다.
내보내기 상태
export status.
Code Block |
---|
enum EState { S_NONE = 0; S_RUNNING = 1; S_COMPLETED = 2; S_REMOVED = 3; } |
where the S_COMPLETED status does not guarantee that the export was successful.상태는 내보내기가 성공적이었음을 보장하지 않습니다.
내보내기 작업 결과가 있는 경우, Result 메시지가 응답으로 제공됩니다If there are export operation results, then a Result message will be received.
Code Block |
---|
message Result { message File { string path = 1; uint64 size = 2; string min_timestamp = 3; string max_timestamp = 4; string mime_type = 5; } repeated File files = 1; bool succeeded = 2; } |
where여기서,
succeeded − indicates that the export was successful;내보내기가 성공했음을 나타냅니다.
After the export operation status changes to S_COMPLETED, you have 1 hour to download the files from the Server. Note that the timeout is reset to zero after the GetSessionState and DownloadFile methods are executed.
If the timeout is exceeded, the files will be deleted from the Server.
The id of the export operation is passed in the method.
Its EState status will be received in response to this method.
If there are export operation results, then a Result message will be received.
The id of the export operation is passed in the method.
Its updated EState status will be received in response to this method.
The method can be used only after the export operation is completed.
The following data is passed in the method:
내보내기 작업 상태가 S_COMPLETED로 변경되면, 서버에서 파일을 다운로드할 수 있는 시간은 1시간입니다. GetSessionState와 DownloadFile 메서드가 실행되면 타임아웃은 다시 초기화됩니다.
타임아웃이 초과되면 파일은 서버에서 삭제됩니다.
내보내기 작업의 ID가 이 메서드에 전달됩니다.
응답으로 해당 EState 상태가 반환됩니다.
내보내기 작업 결과가 있는 경우, 결과 메시지가 반환됩니다.
내보내기 작업의 ID가 이 메서드에 전달됩니다.
응답으로 해당 EState 상태가 업데이트된 상태로 반환됩니다.
이 메서드는 내보내기 작업이 완료된 후에만 사용할 수 있습니다.
이 메서드에 전달되는 데이터는 다음과 같습니다.
In response to this method, FileChunk messages will be received with file data blocks, which will be coming until the entire file is downloaded.
이 메서드에 응답으로, 전체 파일이 다운로드될 때까지 파일 데이터 블록을 포함한 FileChunk 메시지가 전송됩니다.
내보내기 작업의 ID가 이 메서드에 전달됩니다.The id of the export operation is passed in the method.