ua_services_subscription.c 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * ua_services_subscription.c
  3. *
  4. * Created on: 18.06.2014
  5. * Author: root
  6. */
  7. #include "ua_services.h"
  8. #include "ua_statuscodes.h"
  9. UA_Int32 Service_CreateSubscription(UA_Session *session, const UA_CreateSubscriptionRequest *request,
  10. UA_CreateSubscriptionResponse *response)
  11. {
  12. response->subscriptionId = 42;
  13. response->revisedPublishingInterval = 100000;
  14. response->revisedLifetimeCount = 120000;
  15. response->revisedMaxKeepAliveCount = 50;
  16. return UA_SUCCESS;
  17. }
  18. UA_Int32 Service_Publish(UA_Session *session, const UA_PublishRequest *request,
  19. UA_PublishResponse *response)
  20. {
  21. response->subscriptionId = 42;
  22. response->notificationMessage.sequenceNumber = 1;
  23. response->notificationMessage.publishTime = UA_DateTime_now();
  24. return UA_SUCCESS;
  25. }
  26. UA_Int32 Service_SetPublishingMode(UA_Session *session, const UA_SetPublishingModeRequest *request,
  27. UA_SetPublishingModeResponse *response)
  28. {
  29. response->diagnosticInfos = UA_NULL;
  30. response->results = UA_NULL;
  31. response->resultsSize = 0;
  32. return UA_SUCCESS;
  33. }