示例#1
0
        public DeviceInstance(DeviceConfig devconf, DeviceClass devd, DeviceProperty devp)
        {
            devconf_ = devconf;
            devd_    = devd;
            devp_    = devp;

            data_rate_timer_.Restart();

            /* イベント初期化 */
            device_poll_events_ = new WaitHandle[Enum.GetValues(typeof(DevicePollEventID)).Length];
            device_poll_events_[(int)DevicePollEventID.ActiveRequest]    = active_request_event_;
            device_poll_events_[(int)DevicePollEventID.DataRateSampling] = data_rate_sampling_request_event_;
        }
示例#2
0
        internal DeviceInstance CreateInstance(DeviceConfig devconf, DeviceProperty devp)
        {
            if (devp == null)
            {
                return(null);
            }
            if (devp.GetType() != GetPropertyType())
            {
                return(null);
            }

            return(OnCreateInstance(devconf, devp));
        }
示例#3
0
 protected virtual DeviceInstance OnCreateInstance(DeviceConfig devconf, DeviceProperty devp)
 {
     return(null);
 }
示例#4
0
 public DeviceInstance CreateDeviceObject(DeviceConfig devconf, Guid class_id, DeviceProperty devp)
 {
     return(CreateInstance(devconf, class_id, devp));
 }