Completes the definition of a recording session against Historical Server, that is, an SMC_SERVER_M_HISTORICAL connection only.
SMC_RETURN_CODE smc_initiate_recording (SMC_CONNECT_ID clientId)
identifies the connection.
Return value |
Indicates |
---|---|
SMC_RET_SUCCESS |
Function succeeded. |
SMC_RET_FAILURE |
Function failed. |
SMC_RET_INVALID_CONNECT |
Connection does not exist. |
The following example assumes that:
You have created a connection to Historical Server and have a clientId.
You have successfully executed smc_create_recording_session.
You have created at least one view on the connection.
if (smc_initiate_recording(clientId) != SMC_RET_SUCCESS) { printf("smc_initiate_recording failed\n"); /* do some cleanup */ }
The data for the recording session is defined by calls to smc_create_view and smc_create_filter that are made after a call to smc_create_recording_session and before the call to smc_initiate_recording.
After a successful call to smc_initiate_recording, the Historical Server connection can be used to define another recording session, or to create a playback session.
Mode |
Availability |
---|---|
SMC_SERVER_M_LIVE |
No |
SMC_SERVER_M_HISTORICAL |
Yes |
Error |
Indicates |
---|---|
SMC_RET_INVALID_SVR_MODE |
Invalid server mode. |
SMC_RET_INTERNAL_ERROR |
Internal error. |
smc_create_alarm_ex, smc_create_filter, smc_create_view, smc_create_recording_session, smc_terminate_recording_session