Removes a view from a connection.
SMC_RETURN_CODE smc_drop_view (SMC_CONNECT_ID clientId, SMC_VIEW_ID viewId)
identifies the connection.
identifies a view created on 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 and have a clientId.
You have created a view on that connection and have a viewId.
if (smc_drop_view(clientId, viewId) != SMC_RET_SUCCESS) { printf("smc_drop_view_failed\n"); /* do some cleanup */ }
All alarms and filters associated with the data items in the view are dropped.
You cannot drop a view created on a Historical Server session (that is, when the connection mode is SMC_SERVER_M_HISTORICAL).
Mode |
Availability |
---|---|
SMC_SERVER_M_LIVE |
Yes |
SMC_SERVER_M_HISTORICAL |
No |
Error |
Indicates |
---|---|
SMC_RET_INVALID_VIEWID |
View does not exist. |
smc_create_view, smc_drop_alarm, smc_drop_filter