lumeohq / onvif-rs

A native Rust ONVIF client library.
MIT License
114 stars 61 forks source link

How to use create_pull_point_subscription and pull_messages #107

Open asuper0 opened 1 year ago

asuper0 commented 1 year ago

The method schema::event::create_pull_point_subscription() return a struct schema::event::CreatePullPointSubscriptionResponse

pub struct CreatePullPointSubscriptionResponse {
    // Endpoint reference of the subscription to be used for pulling the
    // messages.
    #[yaserde(prefix = "tev", rename = "SubscriptionReference")]
    pub subscription_reference: wsa::EndpointReferenceType,

    // Current time of the server for synchronization purposes.
    #[yaserde(prefix = "wsnt", rename = "CurrentTime")]
    pub current_time: wsnt::CurrentTime,

    // Date time when the PullPoint will be shut down without further pull
    // requests.
    #[yaserde(prefix = "wsnt", rename = "TerminationTime")]
    pub termination_time: wsnt::TerminationTime,
}

As described in the comment, the field is needed when pulling. However, arguments of schema::event::pull_messages() do not contain the subscription_reference. I've tried to use create_pull_point_subscription(), it's OK. But when I use pull_messages(), the camera response 500 Internal Server Error.

ozdoganoguzhan commented 1 year ago

Hi, I'm trying to do the same thing. Did you have any luck finding if it's possible?

ozdoganoguzhan commented 1 year ago

I have created this PR: #108