fix: SubscribeEvents params
This commit is contained in:
parent
91cb8d7575
commit
23218acc18
2
main.go
2
main.go
@ -79,7 +79,7 @@ func deleteConnection(c *gin.Context) {
|
||||
|
||||
func eventsSubscribe(c *gin.Context) {
|
||||
xaddr := c.Param("xaddr")
|
||||
result, err := connections[xaddr].SubscribeEvents("http://172.16.19.230:8080/events/callback")
|
||||
result, err := connections[xaddr].SubscribeEvents("http://172.16.19.230:8080/events/callback", "PT60S")
|
||||
if err != nil {
|
||||
c.JSON(http.StatusServiceUnavailable, gin.H{
|
||||
"message": err.Error(),
|
||||
|
3
onvif.go
3
onvif.go
@ -86,9 +86,8 @@ func (c *Connection) GetDeviceInformation() (*device.GetDeviceInformationRespons
|
||||
|
||||
func (c *Connection) SubscribeEvents(
|
||||
consumerAddress event.AttributedURIType,
|
||||
terminationTime xsd.String,
|
||||
terminationTime xsd.String, // PT60S
|
||||
) (*event.SubscribeResponse, error) {
|
||||
//terminationTime := xsd.String("PT60S")
|
||||
resp, err := c.Device.CallMethod(event.Subscribe{
|
||||
ConsumerReference: &event.EndpointReferenceType{
|
||||
Address: consumerAddress,
|
||||
|
Loading…
x
Reference in New Issue
Block a user