Example #1
0
 public EntityGroundVehicle(INETWISEDriverSink2 WISE, DatabaseHandle databaseHandle, ObjectHandle objectHandle, TransactionHandle transactionHandle)
 {
     this.WISE = WISE;
     this.Database = databaseHandle;
     this.Object = objectHandle;
     this.Transaction = transactionHandle;
 }
 public EntityEquipmentSensorCBRNAP2Ce(INETWISEDriverSink2 WISE, DatabaseHandle databaseHandle, ObjectHandle objectHandle, TransactionHandle transactionHandle)
 {
     this.WISE = WISE;
     this.Database = databaseHandle;
     this.Object = objectHandle;
     this.Transaction = transactionHandle;
 }
Example #3
0
 public EntityEquipment(INETWISEDriverSink2 WISE, DatabaseHandle databaseHandle, ObjectHandle objectHandle)
 {
     this.WISE = WISE;
     this.Database = databaseHandle;
     this.Object = objectHandle;
     this.Transaction = TransactionHandle.None;
 }
Example #4
0
 public WISEObject(INETWISEDriverSink2 WISE, DatabaseHandle databaseHandle, ObjectHandle objectHandle, TransactionHandle transactionHandle)
 {
     this.WISE = WISE;
     this.Database = databaseHandle;
     this.Object = objectHandle;
     this.Transaction = transactionHandle;
 }
Example #5
0
        public static bool InitializeModel(INETWISEDriverSink2 wiseAccess)
        {
            bool bResult = false;
            INETWISEStringCache stringCache = wiseAccess as INETWISEStringCache;

            // The UnInitialize call is needed to clear string cache when WISE restarts

            Entity.UnInitialize();
            bResult = Entity.Initialize( stringCache );

            EntityGroundVehicle.UnInitialize();
            bResult = EntityGroundVehicle.Initialize( stringCache );

            EntityEquipment.UnInitialize();
            bResult = EntityEquipment.Initialize( stringCache );

            EntityEquipmentSensor.UnInitialize();
            bResult = EntityEquipmentSensor.Initialize( stringCache );

            EntityEquipmentSensorCBRN.UnInitialize();
            bResult = EntityEquipmentSensorCBRN.Initialize( stringCache );

            EntityEquipmentSensorCBRNAP2Ce.UnInitialize();
            bResult = EntityEquipmentSensorCBRNAP2Ce.Initialize( stringCache );

            EntityEquipmentSensorCBRNLCD.UnInitialize();
            bResult = EntityEquipmentSensorCBRNLCD.Initialize( stringCache );

            CBRNLCDControl.UnInitialize();
            bResult = CBRNLCDControl.Initialize( stringCache );

            return bResult;
        }
Example #6
0
        public static bool InitializeModel(INETWISEDriverSink2 wiseAccess)
        {
            bool bResult = false;
            INETWISEStringCache stringCache = wiseAccess as INETWISEStringCache;
            
            // The UnInitialize call is needed to clear string cache when WISE restarts

///#### BEGIN FOREACH_ENTITY            
            <#EntityClassMerged#>.UnInitialize();
            bResult = <#EntityClassMerged#>.Initialize( stringCache );
                
///#### END FOREACH_ENTITY            

            return bResult;
        }
Example #7
0
 public void Clear()
 {
     this.WISE = null;
     this.Database = WISEConstants.WISE_TRANSITION_CACHE_DATABASE;
     this.Object = WISEConstants.WISE_INVALID_HANDLE;
 }
Example #8
0
        public static bool IsTypeOf(INETWISEDriverSink2 WISE, DatabaseHandle hDatabase, ObjectHandle hObject)
        {
            uint result = WISEError.WISE_ERROR;
            AttributeHandle hAttr = WISEConstants.WISE_INVALID_HANDLE;
            string strEntityType = string.Empty;

            if ((WISE == null) || (hObject == WISEConstants.WISE_INVALID_HANDLE))
            {
                return false;
            }

            result = WISE.GetAttributeHandle(hDatabase, hObject, WISEConstants.WISE_TEMPLATE_OBJECT_TYPE, ref hAttr);
            if (WISEError.CheckCallFailed(result))
            {
                return false;
            }

            result = WISE.GetAttributeValue(hDatabase, hObject, hAttr, ref strEntityType);

            return WISEError.CheckCallSucceeded(result) && IsTypeOf(strEntityType);
        }
Example #9
0
 public CBRNLCDControl(INETWISEDriverSink2 WISE, DatabaseHandle databaseHandle, EventHandle eventHandle)
 {
     this.WISE = WISE;
     this.Database = databaseHandle;
     this.Handle = eventHandle;
 }
Example #10
0
        public uint CreateInstance(INETWISEDriverSink2 WISE, DatabaseHandle hDatabase)
        {
            uint result = WISEError.WISE_ERROR;
            EventHandle eventHandle = this.Handle;

            if (WISE == null)
            {
                result = WISEError.WISE_E_INVALID_ARG;
                return result;
            }

            if (eventHandle == WISEConstants.WISE_INVALID_HANDLE)
            {
                // Create event from template, if none exist.
                Dictionary<string, AttributeHandle> attributes = new Dictionary<string, AttributeHandle>();
                result = WISE.CreateEventFromTemplate(hDatabase, CBRNLCDControl.ClassName, ref eventHandle, ref attributes);
            }

            if (WISEError.CheckCallSucceeded(result))
            {
                this.WISE = WISE;
                this.Database = WISEConstants.WISE_INVALID_HANDLE;
                this.Handle = eventHandle;
            }

            return result;
        }
Example #11
0
 public Service(INETWISEDriverSink2 sink, DatabaseHandle databaseHandle)
 {
     this._sink = sink;
     this._hDatabase = databaseHandle;
 }
Example #12
0
		public abstract WISE_RESULT CreateInstance(INETWISEDriverSink2 WISE, DatabaseHandle hDatabase, string objectName);
 public EntityEquipmentSensorCBRNLCD(INETWISEDriverSink2 WISE, DatabaseHandle databaseHandle, ObjectHandle objectHandle, TransactionHandle transactionHandle)
     : base(WISE, databaseHandle, objectHandle, transactionHandle)
 {
 }
Example #14
0
 public EntityGroundVehicle(INETWISEDriverSink2 WISE, DatabaseHandle databaseHandle, ObjectHandle objectHandle, TransactionHandle transactionHandle)
     : base(WISE, databaseHandle, objectHandle, transactionHandle)
 {
 }
 public EntityEquipmentSensorCBRNI28(INETWISEDriverSink2 WISE, DatabaseHandle databaseHandle, ObjectHandle objectHandle)
     : base(WISE, databaseHandle, objectHandle)
 {
 }
Example #16
0
 public uint CreateInstance(INETWISEDriverSink2 WISE, DatabaseHandle hDatabase)
 {
     return CreateInstance(WISE, hDatabase, "");
 }
Example #17
0
        public uint CreateInstance(INETWISEDriverSink2 WISE, DatabaseHandle hDatabase, string objectName)
        {
            uint result = WISEError.WISE_ERROR;
            ObjectHandle objectHandle = this.Object;

            if (WISE == null)
            {
                result = WISEError.WISE_E_INVALID_ARG;
                return result;
            }

            if (objectHandle == WISEConstants.WISE_INVALID_HANDLE)
            {
                // Create object from template, if none exist.
                Dictionary<string, AttributeHandle> attributes = new Dictionary<string, AttributeHandle>(); // it's set from Template
                result = WISE.CreateObjectFromTemplate(hDatabase, objectName, EntityGroundVehicle.ClassName, ref objectHandle, ref attributes);
            }

            if (WISEError.CheckCallSucceeded(result))
            {
                this.WISE = WISE;
                this.Database = WISEConstants.WISE_INVALID_HANDLE;
                this.Object = objectHandle;
            }

            return result;
        }
Example #18
0
 public WISEObjectFactory(INETWISEDriverSink2 sink, DatabaseHandle hDatabase)
 {
     _sink = sink;
     _hDatabase = hDatabase;
 }