ANSI C Based OPC UA Client/Server SDK  1.8.3.398
samplesubscription.h
/*****************************************************************************
* *
* Copyright (c) 2006-2018 Unified Automation GmbH. All rights reserved. *
* *
* Software License Agreement ("SLA") Version 2.7 *
* *
* Unless explicitly acquired and licensed from Licensor under another *
* license, the contents of this file are subject to the Software License *
* Agreement ("SLA") Version 2.7, or subsequent versions as allowed by the *
* SLA, and You may not copy or use this file in either source code or *
* executable form, except in compliance with the terms and conditions of *
* the SLA. *
* *
* All software distributed under the SLA is provided strictly on an "AS *
* IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, *
* AND LICENSOR HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT *
* LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR *
* PURPOSE, QUIET ENJOYMENT, OR NON-INFRINGEMENT. See the SLA for specific *
* language governing rights and limitations under the SLA. *
* *
* The complete license agreement can be found here: *
* http://unifiedautomation.com/License/SLA/2.7/ *
* *
* Project: Unified Automation ANSI C based OPC UA Server SDK *
* *
*****************************************************************************/
#ifndef _SAMPLESUBSCRIPTION_H_
#define _SAMPLESUBSCRIPTION_H_ 1
#include <uaclient_subscription.h>
OPCUA_BEGIN_EXTERN_C
typedef enum _SampleSubscriptionStateMachine
{
State_SampleSubscription_Idle,
State_SampleSubscription_SubscriptionCreate,
State_SampleSubscription_SubscriptionCreateDone,
State_SampleSubscription_MonitoredItemCreate,
State_SampleSubscription_MonitoredItemCreateDone,
State_SampleSubscription_MonitoredItemDelete,
State_SampleSubscription_MonitoredItemDeleteDone,
State_SampleSubscription_SubscriptionDelete,
State_SampleSubscription_SubscriptionDeleteDone,
State_SampleSubscription_Error
} SampleSubscriptionStateMachine;
typedef struct _SampleSubscription
{
SampleSubscriptionStateMachine State;
UaClient_Subscription *pSubscription;
OpcUa_UInt32 uMonitoredItemId;
OpcUa_UInt32 uDataCount;
} SampleSubscription;
SampleSubscription *SampleSubscription_Create(UaClient_Session *pSession);
OpcUa_Void SampleSubscription_Delete(SampleSubscription **ppSampleSubscription);
OpcUa_StatusCode SampleSubscription_CreateSubscription(SampleSubscription *pSampleSubscription);
OpcUa_StatusCode SampleSubscription_DeleteSubscription(SampleSubscription *pSampleSubscription);
OpcUa_StatusCode SampleSubscription_CreateMonitoredItem(SampleSubscription *pSampleSubscription);
OpcUa_StatusCode SampleSubscription_DeleteMonitoredItem(SampleSubscription *pSampleSubscription);
OPCUA_END_EXTERN_C
#endif /* _SAMPLESUBSCRIPTION_H_ */