예제 #1
0
 private static void EnqueueCounter(DeviceStateCountersQueue queue, WrappedCounter counter)
 {
     if (counter.DeviceStateCounter.PendingCommits <= 0)
     {
         return;
     }
     STrace.Debug(typeof(DeviceStateWrap).FullName, String.Format("EnqueueCounter: {0} value={1}", counter.DeviceStateCounter.Counter, counter.DeviceStateCounter.PartialValue));
     counter.DeviceStateCounter.Action = DeviceStateCounter.Actions.Increase;
     queue.Enqueue(counter.DeviceStateCounter);
 }
예제 #2
0
 public DeviceStateWrap(short device_id)
 {
     changes_to_commit = ChangesToCommit;
     id                         = device_id;
     qTreeState                 = new WrappedProperty <DeviceTypes.QTreeStates>("QTreeState");
     type                       = new WrappedProperty <DeviceTypes.Types>("Type");
     storageMediaFailure        = new WrappedProperty <bool>("HardwareEmergencyMode");
     transientDeviceNetworkPath = new WrappedProperty <string>("TransientDeviceNetworkPath");
     state                      = new WrappedProperty <DeviceState.States>("ServiceState");
     lastLoginGPSPoint          = new WrappedProperty <GPSPoint>("LastLoginGPSPoint");
     lastKnownGPSPoint          = new WrappedProperty <GPSPoint>("LastKnownGPSPoint");
     lastReceivedTrackingData   = new WrappedProperty <DateTime>("LastReceivedTrackingData");
     lastReceivedEventData      = new WrappedProperty <DateTime>("LastReceivedEventData");
     lastLogin                  = new WrappedProperty <DateTime>("LastLogin");
     clockSlice                 = new WrappedProperty <TimeSpan>("ClockSlice");
     qtreeRevision              = new WrappedProperty <int>("QTreeRevision");
     flashCounter               = new WrappedCounter("FlashCounter");
     crapReceivedCounter        = new WrappedCounter("CrapReceivedCounter");
     firmwareVersion            = new WrappedProperty <string>("FirmwareVersion");
     xbeeFirmware               = new WrappedProperty <string>("XBeeFirmware");
     haveDisplay                = new WrappedProperty <bool>("HaveDisplay");
 }