using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.ServiceModel;

namespace UnifiedPOS.DeviceMonitor.V1_4
{
    [ServiceContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/")]
    public interface DeviceMonitor
    {
        #region Version 1.4

        //
        // Common Properties
        //

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetAutoDisable", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetAutoDisableResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        bool GetAutoDisable(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/SetAutoDisable", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/SetAutoDisableResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        void SetAutoDisable(string ConsumerID, bool AutoDisable);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetCapCompareFirmwareVersion", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetCapCompareFirmwareVersionResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        bool GetCapCompareFirmwareVersion(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetCapPowerReporting", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetCapPowerReportingResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        PowerReporting GetCapPowerReporting(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetCapStatisticsReporting", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetCapStatisticsReportingResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        bool GetCapStatisticsReporting(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetCapUpdateFirmware", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetCapUpdateFirmwareResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        bool GetCapUpdateFirmware(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetCapUpdateStatistics", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetCapUpdateStatisticsResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        bool GetCapUpdateStatistics(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetCheckHealthText", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetCheckHealthTextResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        string GetCheckHealthText(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetClaimed", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetClaimedResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        bool GetClaimed(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetDataCount", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetDataCountResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        int GetDataCount(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetDataEventEnabled", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetDataEventEnabledResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        bool GetDataEventEnabled(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/SetDataEventEnabled", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/SetDataEventEnabledResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        void SetDataEventEnabled(string ConsumerID, bool DataEventEnabled);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetDeviceEnabled", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetDeviceEnabledResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        bool GetDeviceEnabled(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/SetDeviceEnabled", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/SetDeviceEnabledResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        void SetDeviceEnabled(string ConsumerID, bool DeviceEnabled);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetFreezeEvents", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetFreezeEventsResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        bool GetFreezeEvents(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/SetFreezeEvents", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/SetFreezeEventsResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        void SetFreezeEvents(string ConsumerID, bool FreezeEvents);

        //[OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetOutputID", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetOutputIDResponse")]
        //[FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        //int GetOutputID(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetPowerNotify", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetPowerNotifyResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        PowerNotification GetPowerNotify(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/SetPowerNotify", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/SetPowerNotifyResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        void SetPowerNotify(string ConsumerID, PowerNotification PowerNotify);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetPowerState", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetPowerStateResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        PowerState GetPowerState(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetState", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetStateResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        ControlState GetState(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetDeviceControlDescription", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetDeviceControlDescriptionResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        string GetDeviceControlDescription(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetDeviceControlVersion", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetDeviceControlVersionResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        UposVersion GetDeviceControlVersion(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetDeviceServiceDescription", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetDeviceServiceDescriptionResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        string GetDeviceServiceDescription(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetDeviceServiceVersion", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetDeviceServiceVersionResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        UposVersion GetDeviceServiceVersion(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetPhysicalDeviceDescription", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetPhysicalDeviceDescriptionResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        string GetPhysicalDeviceDescription(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetPhysicalDeviceName", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetPhysicalDeviceNameResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        string GetPhysicalDeviceName(string ConsumerID);

        //
        // Specific Properties
        //

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetDeviceData", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetDeviceDataResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        DeviceDataValue GetDeviceData(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetDeviceList", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetDeviceListResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        DeviceInfoValueList GetDeviceList(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetMonitoringDeviceList", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetMonitoringDeviceListResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        MonitoringDeviceList GetMonitoringDeviceList(string ConsumerID);

        //
        // Common Methods
        //

        //[OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/Open", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/OpenResponse")]
        //[FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        //void Open(string ConsumerID, string EndpointAddress);

        //[OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/Close", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/CloseResponse")]
        //[FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        //void Close(string ConsumerID, string EndpointAddress);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/Claim", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/ClaimResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        void Claim(string ConsumerID, int Timeout);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/Release", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/ReleaseResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        void Release(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/CheckHealth", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/CheckHealthResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        void CheckHealth(string ConsumerID, HealthCheckLevel Level);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/ClearInput", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/ClearInputResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        void ClearInput(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/ClearInputProperties", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/ClearInputPropertiesResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        void ClearInputProperties(string ConsumerID);

        //[OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/ClearOutput", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/ClearOutputResponse")]
        //[FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        //void ClearOutput(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/DirectIO", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/DirectIOResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        DirectIOData DirectIO(string ConsumerID, int Command, int Data, object Obj);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/CompareFirmwareVersion", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/CompareFirmwareVersionResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        CompareFirmwareResult CompareFirmwareVersion(string ConsumerID, string FirmwareFileName);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/ResetStatistics", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/ResetStatisticsResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        void ResetStatistics(string ConsumerID, StatisticList StatisticsBuffer);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/RetrieveStatistics", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/RetrieveStatisticsResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        string RetrieveStatistics(string ConsumerID, StatisticList StatisticsBuffer);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UpdateFirmware", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UpdateFirmwareResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        void UpdateFirmware(string ConsumerID, string FirmwareFileName);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UpdateStatistics", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UpdateStatisticsResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        void UpdateStatistics(string ConsumerID, StatisticList StatisticsBuffer);

        //
        // Specific Methods
        //

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/AddMonitoringDevice", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/AddMonitoringDeviceResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        void AddMonitoringDevice(string ConsumerID, string DeviceID, MonitoringModeType MonitoringMode, int Boundary, int SubBoundary, int IntervalTime);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/ClearMonitoringDevice", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/ClearMonitoringDeviceResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        void ClearMonitoringDevice(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/DeleteMonitoringDevice", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/DeleteMonitoringDeviceResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        void DeleteMonitoringDevice(string ConsumerID, string DeviceID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetDeviceValue", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetDeviceValueResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        int GetDeviceValue(string ConsumerID, string DeviceID);

        //
        // Session Management
        //

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetWSPOSVersion", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetWSPOSVersionResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        UposVersion GetWSPOSVersion();

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GenerateConsumerID", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GenerateConsumerIDResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        string GenerateConsumerID();

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/OpenSession", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/OpenSessionResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        void OpenSession(string ConsumerID, string EndpointAddress);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/CloseSession", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/CloseSessionResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        void CloseSession(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetProviderSessionTimeout", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetProviderSessionTimeoutResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        int GetProviderSessionTimeout(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/KeepAlive", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/KeepAliveResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        void KeepAlive(string ConsumerID);

        //
        // Device Control
        //

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/OpenDevice", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/OpenDeviceResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        void OpenDevice(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/CloseDevice", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/CloseDeviceResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        void CloseDevice(string ConsumerID);

        //
        // Event Polling
        //

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/PollForUPOSEvent", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/PollForUPOSEventResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        DeviceMonitorEvent PollForUPOSEvent(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/SetEventResponse", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/SetEventResponseResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        void SetEventResponse(string ConsumerID, DeviceMonitorEventResponse EventResponse);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetEncryptedClaimedConsumerID", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/GetEncryptedClaimedConsumerIDResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        string GetEncryptedClaimedConsumerID();

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/SetEventRequestProperties", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/SetEventRequestPropertiesResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/UposException", Name = "UposException")]
        void SetEventRequestProperties(string ConsumerID, PropertyNameList list);

        #endregion Version 1.4
    }

    #region Version 1.4

    //
    // Common Data Types
    //

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/")]
    public class DirectIOData
    {
        [DataMember]
        public int Data { get; set; }

        [DataMember]
        public object Obj { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/")]
    public class UposException
    {
        [DataMember]
        public ErrorCode ErrorCode { get; set; }

        [DataMember]
        public int ErrorCodeExtended { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/")]
    public class UposVersion
    {
        [DataMember]
        public int Major { get; set; }

        [DataMember]
        public int Minor { get; set; }

        [DataMember]
        public int Build { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/")]
    public class Statistic
    {
        [DataMember]
        public string Name { get; set; }

        [DataMember]
        public string Value { get; set; }
    }

    [CollectionDataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/", ItemName = "Statistic")]
    public class StatisticList : List<Statistic>
    {
    }

    //
    // Common Enumerations
    //

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/")]
    public enum CompareFirmwareResult
    {
        [EnumMember]
        CFV_FIRMWARE_OLDER,

        [EnumMember]
        CFV_FIRMWARE_SAME,

        [EnumMember]
        CFV_FIRMWARE_NEWER,

        [EnumMember]
        CFV_FIRMWARE_DIFFERENT,

        [EnumMember]
        CFV_FIRMWARE_UNKNOWN,
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/")]
    public enum ControlState
    {
        [EnumMember]
        S_CLOSED,

        [EnumMember]
        S_IDLE,

        [EnumMember]
        S_BUSY,

        [EnumMember]
        S_ERROR,
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/")]
    public enum ErrorCode
    {
        [EnumMember]
        E_CLOSED,

        [EnumMember]
        E_CLAIMED,

        [EnumMember]
        E_NOTCLAIMED,

        [EnumMember]
        E_NOSERVICE,

        [EnumMember]
        E_DISABLED,

        [EnumMember]
        E_ILLEGAL,

        [EnumMember]
        E_NOHARDWARE,

        [EnumMember]
        E_OFFLINE,

        [EnumMember]
        E_NOEXIST,

        [EnumMember]
        E_EXISTS,

        [EnumMember]
        E_FAILURE,

        [EnumMember]
        E_TIMEOUT,

        [EnumMember]
        E_BUSY,

        [EnumMember]
        E_EXTENDED,

        [EnumMember]
        E_DEPRECATED,
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/")]
    public enum HealthCheckLevel
    {
        [EnumMember]
        CH_INTERNAL,

        [EnumMember]
        CH_EXTERNAL,

        [EnumMember]
        CH_INTERACTIVE,
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/")]
    public enum PowerNotification
    {
        [EnumMember]
        PN_DISABLED,

        [EnumMember]
        PN_ENABLED,
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/")]
    public enum PowerReporting
    {
        [EnumMember]
        PR_NONE,

        [EnumMember]
        PR_STANDARD,

        [EnumMember]
        PR_ADVANCED,
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/")]
    public enum PowerState
    {
        [EnumMember]
        PS_UNKNOWN,

        [EnumMember]
        PS_ONLINE,

        [EnumMember]
        PS_OFF,

        [EnumMember]
        PS_OFFLINE,

        [EnumMember]
        PS_OFF_OFFLINE,
    }

    /*
    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/")]
    public enum StatisticCategories
    {
        [EnumMember]
        All,
        [EnumMember]
        Manufacturer,
        [EnumMember]
        Upos,
    }
    */

    public class StatisticCategories
    {
        public const string All = "";
        public const string Manufacturer = "M_";
        public const string Upos = "U_";
    }

    //
    // Specific Data Types
    //

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/")]
    public class DeviceDataValue
    {
        [DataMember]
        public string Id { get; set; }

        [DataMember]
        public int Value { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/")]
    public class DeviceInfoValue
    {
        [DataMember]
        public string Id { get; set; }

        [DataMember]
        public string Type { get; set; }

        [DataMember]
        public string Unit { get; set; }

        [DataMember]
        public string Coefficient { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/")]
    public class MonitoringDeviceValue
    {
        [DataMember]
        public string Id { get; set; }

        [DataMember]
        public MonitoringModeType MonitoringMode { get; set; }

        [DataMember]
        public int Boundary { get; set; }

        [DataMember]
        public int SubBoundary { get; set; }

        [DataMember]
        public int Interval { get; set; }
    }

    [CollectionDataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/", ItemName = "DeviceInfoValue")]
    public class DeviceInfoValueList : List<DeviceInfoValue>
    {
    }

    [CollectionDataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/", ItemName = "MonitoringDeviceValue")]
    public class MonitoringDeviceList : List<MonitoringDeviceValue>
    {
    }

    //
    // Specific Enumerations
    //

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/")]
    public enum MonitoringModeType
    {
        [EnumMember]
        DMON_MMONDE_UPDATE,

        [EnumMember]
        DMON_MMONDE_STRADDLED,

        [EnumMember]
        DMON_MMONDE_HIGH,

        [EnumMember]
        DMON_MMONDE_LOW,

        [EnumMember]
        DMON_MMONDE_WITHIN,

        [EnumMember]
        DMON_MMONDE_OUTSIDE,

        [EnumMember]
        DMON_MMONDE_POLLING,
    }

    //
    // Constants
    //

    public class ExtendedError
    {
        public const int EFIRMWARE_BAD_FILE = 281;
        public const int ESTATS_ERROR = 280;
        public const int ESTATS_DEPENDENCY = 282;
    }

    public class StatisticProperties
    {
        public const string CommunicationErrorCount = "CommunicationErrorCount";
        public const string DeviceCategory = "DeviceCategory";
        public const string FirmwareRevision = "FirmwareRevision";
        public const string HoursPoweredCount = "HoursPoweredCount";
        public const string InstallationDate = "InstallationDate";
        public const string Interface = "Interface";
        public const string ManufactureDate = "ManufactureDate";
        public const string ManufacturerName = "ManufacturerName";
        public const string MechanicalRevision = "MechanicalRevision";
        public const string ModelName = "ModelName";
        public const string SerialNumber = "SerialNumber";
        public const string UnifiedPOSVersion = "UnifiedPOSVersion";
    }

    public class Wait
    {
        public const int FOREVER = -1;
    }

    //
    // Event Polling
    //

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/")]
    public class DeviceMonitorEvent
    {
        [DataMember]
        public DataEvent DataEvent { get; set; }

        [DataMember]
        public DirectIOEvent DirectIOEvent { get; set; }

        [DataMember]
        public ErrorEvent ErrorEvent { get; set; }

        //[DataMember]
        //public OutputCompleteEvent OutputCompleteEvent { get; set; }
        [DataMember]
        public StatusUpdateEvent StatusUpdateEvent { get; set; }

        [DataMember]
        public DataContainedEvent DataContainedEvent { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/")]
    public class DeviceMonitorEventResponse
    {
        [DataMember]
        public DataEventResponse DataEventResponse { get; set; }

        [DataMember]
        public DataContainedEventResponse DataContainedEventResponse { get; set; }

        [DataMember]
        public DirectIOEventResponse DirectIOEventResponse { get; set; }

        [DataMember]
        public ErrorEventResponse ErrorEventResponse { get; set; }

        //[DataMember]
        //public OutputCompleteEventResponse OutputCompleteEventResponse { get; set; }
        [DataMember]
        public StatusUpdateEventResponse StatusUpdateEventResponse { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/")]
    public class DataEvent
    {
        [DataMember]
        public string Source { get; set; }

        [DataMember]
        public int EventID { get; set; }

        [DataMember]
        public DateTime TimeStamp { get; set; }

        [DataMember]
        public int Status { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/")]
    public class DataEventResponse
    {
        [DataMember]
        public int EventID { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/")]
    public class DirectIOEvent
    {
        [DataMember]
        public string Source { get; set; }

        [DataMember]
        public int EventID { get; set; }

        [DataMember]
        public DateTime TimeStamp { get; set; }

        [DataMember]
        public int EventNumber { get; set; }

        [DataMember]
        public int Data { get; set; }

        [DataMember]
        public object Obj { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/")]
    public class DirectIOEventResponse
    {
        [DataMember]
        public int EventID { get; set; }

        [DataMember]
        public DirectIOData DirectIOData { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/")]
    public class ErrorEvent
    {
        [DataMember]
        public string Source { get; set; }

        [DataMember]
        public int EventID { get; set; }

        [DataMember]
        public DateTime TimeStamp { get; set; }

        [DataMember]
        public ErrorCode ErrorCode { get; set; }

        [DataMember]
        public int ErrorCodeExtended { get; set; }

        [DataMember]
        public ErrorLocus ErrorLocus { get; set; }

        [DataMember]
        public ErrorResponse ErrorResponse { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/")]
    public class ErrorEventResponse
    {
        [DataMember]
        public int EventID { get; set; }

        [DataMember]
        public ErrorResponse ErrorResponse { get; set; }
    }

    /*
    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/")]
    public class OutputCompleteEvent
    {
        [DataMember]
        public string Source { get; set; }
        [DataMember]
        public int EventID { get; set; }
        [DataMember]
        public DateTime TimeStamp { get; set; }
        [DataMember]
        public int OutputID { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/")]
    public class OutputCompleteEventResponse
    {
        [DataMember]
        public int EventID { get; set; }
    }
	*/

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/")]
    public class StatusUpdateEvent
    {
        [DataMember]
        public string Source { get; set; }

        [DataMember]
        public int EventID { get; set; }

        [DataMember]
        public DateTime TimeStamp { get; set; }

        [DataMember]
        public int Status { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/")]
    public class StatusUpdateEventResponse
    {
        [DataMember]
        public int EventID { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/")]
    public enum ErrorLocus
    {
        [EnumMember]
        EL_INPUT,

        [EnumMember]
        EL_INPUT_DATA,

        [EnumMember]
        EL_OUTPUT,
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/")]
    public enum ErrorResponse
    {
        [EnumMember]
        ER_CLEAR,

        [EnumMember]
        ER_CONTINUEINPUT,

        [EnumMember]
        ER_RETRY,
    }

    [CollectionDataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/", ItemName = "PropertyName")]
    public class PropertyNameList : List<string>
    {
    }

    [CollectionDataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/", ItemName = "Parameter")]
    public class ParameterList : Dictionary<string, object>
    {
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/")]
    public class DataContainedEvent
    {
        [DataMember]
        public string Source { get; set; }

        [DataMember]
        public int EventID { get; set; }

        [DataMember]
        public DateTime TimeStamp { get; set; }

        [DataMember]
        public int Status { get; set; }

        [DataMember]
        public ParameterList Parameters { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/")]
    public class DataContainedEventData
    {
        [DataMember]
        public int EventID { get; set; }

        [DataMember]
        public bool SetDataEventEnabled { get; set; }

        [DataMember]
        public bool CallClearInputProperties { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/DeviceMonitor/")]
    public class DataContainedEventResponse
    {
        [DataMember]
        public int EventID { get; set; }

        [DataMember]
        public bool SetDataEventEnabled { get; set; }

        [DataMember]
        public bool CallClearInputProperties { get; set; }
    }

    #endregion Version 1.4
}