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

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

        //
        // Common Properties
        //

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        //
        // Specific Properties
        //

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

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

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

        //
        // Common Methods
        //

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        //
        // Specific Methods
        //

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

        #endregion

        #region Version 1.2

        //
        // Session Management
        //

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

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

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

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

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

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

        //
        // Device Control
        // 

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

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

        //
        // Event Polling
        //

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

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

        #endregion

        #region Version 1.3

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

        #endregion

    }

    #region Version 1.1

    //
    // Common Data Types
    //

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

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

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MotionSensor/")]
    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/MotionSensor/")]
    public class Statistic
    {
        [DataMember]
        public string Name { get; set; }
        [DataMember]
        public string Value { get; set; }
    }

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

    //
    // Common Enumerations
    //

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MotionSensor/")]
    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/MotionSensor/")]
    public enum ControlState
    {
        [EnumMember]
        S_CLOSED,
        [EnumMember]
        S_IDLE,
        [EnumMember]
        S_BUSY,
        [EnumMember]
        S_ERROR,
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MotionSensor/")]
    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/MotionSensor/")]
    public enum HealthCheckLevel
    {
        [EnumMember]
        CH_INTERNAL,
        [EnumMember]
        CH_EXTERNAL,
        [EnumMember]
        CH_INTERACTIVE,
    }

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

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

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MotionSensor/")]
    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/MotionSensor/")]
    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
    //

    //
    // Specific Enumerations
    //

    //
    // 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 MotionEventCount = "MotionEventCount";
        public const string SerialNumber = "SerialNumber";
        public const string UnifiedPOSVersion = "UnifiedPOSVersion";
    }

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

    #endregion

    #region Version 1.2

    //
    // Event Polling
    //

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MotionSensor/")]
    public class MotionSensorEvent
    {
        //[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; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MotionSensor/")]
    public class MotionSensorEventResponse
    {
        //[DataMember]
        //public DataEventResponse DataEventResponse { 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/MotionSensor/")]
    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/MotionSensor/")]
    public class DataEventResponse
    {
        [DataMember]
        public int EventID { get; set; }
    }
    */
    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MotionSensor/")]
    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/MotionSensor/")]
    public class DirectIOEventResponse
    {
        [DataMember]
        public int EventID { get; set; }
        [DataMember]
        public DirectIOData DirectIOData { get; set; }
    }
    /*
    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MotionSensor/")]
    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/MotionSensor/")]
    public class ErrorEventResponse
    {
        [DataMember]
        public int EventID { get; set; }
        [DataMember]
        public ErrorResponse ErrorResponse { get; set; }
    }

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

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MotionSensor/")]
    public class OutputCompleteEventResponse
    {
        [DataMember]
        public int EventID { get; set; }
    }
    */
    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MotionSensor/")]
    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/MotionSensor/")]
    public class StatusUpdateEventResponse
    {
        [DataMember]
        public int EventID { get; set; }
    }
    /*
    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MotionSensor/")]
    public enum ErrorLocus
    {
        [EnumMember]
        EL_INPUT,
        [EnumMember]
        EL_INPUT_DATA,
        [EnumMember]
        EL_OUTPUT,
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MotionSensor/")]
    public enum ErrorResponse
    {
        [EnumMember]
        ER_CLEAR,
        [EnumMember]
        ER_CONTINUEINPUT,
        [EnumMember]
        ER_RETRY,
    }
    */
    #endregion

    #region Version 1.3

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



    #endregion
}
